Browse Source

Serialization work

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

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

@ -17,7 +17,6 @@ import engine.net.*; @@ -17,7 +17,6 @@ import engine.net.*;
import engine.objects.Building;
import engine.objects.Item;
import engine.objects.NPC;
import org.pmw.tinylog.Logger;
import java.util.HashMap;
@ -129,9 +128,7 @@ public class ItemProductionMsg extends ClientNetMsg { @@ -129,9 +128,7 @@ public class ItemProductionMsg extends ClientNetMsg {
Item item;
item = Item.getFromCache(this.itemUUID); // If sent to rolling window adds a new slot.
if (item == null)
Logger.error("Null item serialized");
else
if (item != null)
Item.serializeForClientMsgWithoutSlot(item, writer);
writer.putInt(building.getStrongboxValue());
@ -151,9 +148,7 @@ public class ItemProductionMsg extends ClientNetMsg { @@ -151,9 +148,7 @@ public class ItemProductionMsg extends ClientNetMsg {
else
item = ForgeManager.inMemoryItemLookup.get(this.itemUUID);
if (item == null)
Logger.error("Null item serialized");
else
if (item != null)
Item.serializeForClientMsgWithoutSlot(item, writer);
writer.putInt(building.getStrongboxValue());

Loading…
Cancel
Save