diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-04-12 17:07:02 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-04-12 17:07:02 +0200 |
commit | cfda2d8f300c672b4d73ad79df3f20888965815d (patch) | |
tree | 15e86c0374907a4d954d4ad94ea87d475a00b11e /core/src/ch/asynk/rustanddust/game | |
parent | 12b78170ade6ae3381d1f1dfa7b9453322047799 (diff) | |
download | RustAndDust-cfda2d8f300c672b4d73ad79df3f20888965815d.zip RustAndDust-cfda2d8f300c672b4d73ad79df3f20888965815d.tar.gz |
Map5Marshal: dump orderId before other attributes
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java b/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java index 4214d7e..f13951d 100644 --- a/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java +++ b/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java @@ -157,8 +157,8 @@ public abstract class Map5Marshal extends Map4Orders implements Marshal json.writeArrayStart("orders"); for (Order o : orders) { json.writeObjectStart(); - json.writeValue("type", o.type); json.writeValue("oId", o.orderId); + json.writeValue("type", o.type); json.writeValue("cost", o.cost); switch(o.type) { case MOVE: @@ -366,6 +366,7 @@ public abstract class Map5Marshal extends Map4Orders implements Marshal for (int i = 0; i < v.size; i++) { JsonValue o = v.get(i); Order order = null; + order.orderId = o.getInt("oId"); switch(Order.OrderType.valueOf(o.getString("type"))) { case MOVE: order = loadMoveOrder(o); @@ -378,7 +379,6 @@ public abstract class Map5Marshal extends Map4Orders implements Marshal break; } order.cost = o.getInt("cost"); - order.orderId = o.getInt("oId"); JsonValue a = o.get("a"); if (a != null) { for (int j = 0; j < a.size; j++) { |