Browse Source

Serialization update

combat-2
MagicBot 7 months ago
parent
commit
6cbcef00aa
  1. 6
      src/engine/net/client/msg/ItemProductionMsg.java

6
src/engine/net/client/msg/ItemProductionMsg.java

@ -10,6 +10,8 @@
package engine.net.client.msg; package engine.net.client.msg;
import engine.gameManager.BuildingManager; import engine.gameManager.BuildingManager;
import engine.gameManager.ForgeManager;
import engine.loot.WorkOrder;
import engine.mbEnums; import engine.mbEnums;
import engine.mbEnums.GameObjectType; import engine.mbEnums.GameObjectType;
import engine.net.*; import engine.net.*;
@ -235,10 +237,12 @@ public class ItemProductionMsg extends ClientNetMsg {
Item toRoll = Item.getFromCache(this.itemUUID); Item toRoll = Item.getFromCache(this.itemUUID);
writer.putInt(-1497023830); writer.putInt(-1497023830);
WorkOrder workOrder = ForgeManager.itemWorkOrderLookup.get(toRoll);
this.pToken = toRoll.prefixToken; this.pToken = toRoll.prefixToken;
this.sToken = toRoll.suffixToken; this.sToken = toRoll.suffixToken;
if (toRoll.isComplete()) { if (toRoll.isComplete() || (workOrder.prefixToken != 0 && workOrder.suffixToken != 0)) {
writer.putInt(this.pToken); writer.putInt(this.pToken);
writer.putInt(this.sToken); writer.putInt(this.sToken);
} else { } else {

Loading…
Cancel
Save