forked from MagicBane/Server
Serialization update
This commit is contained in:
@@ -59,8 +59,6 @@ public class ItemProductionMsg extends ClientNetMsg {
|
||||
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
public ItemProductionMsg(Building building, NPC vendor, Item item, mbEnums.ProductionActionType actionType, boolean add) {
|
||||
super(Protocol.ITEMPRODUCTION);
|
||||
this.actionType = actionType;
|
||||
@@ -126,9 +124,14 @@ public class ItemProductionMsg extends ClientNetMsg {
|
||||
|
||||
if (!add) {
|
||||
writer.put((byte) 1);
|
||||
Item item = Item.getFromCache(this.itemUUID);
|
||||
if (item != null)
|
||||
Item.serializeForClientMsgWithoutSlot(item, writer);
|
||||
|
||||
Item item;
|
||||
if (this.itemUUID > 0)
|
||||
item = Item.getFromCache(this.itemUUID);
|
||||
else
|
||||
item = ForgeManager.inMemoryItemLookup.get(this.itemUUID);
|
||||
|
||||
Item.serializeForClientMsgWithoutSlot(item, writer);
|
||||
writer.putInt(building.getStrongboxValue());
|
||||
writer.putInt(0);
|
||||
writer.putInt(0);
|
||||
@@ -139,6 +142,7 @@ public class ItemProductionMsg extends ClientNetMsg {
|
||||
writer.putInt(0);
|
||||
writer.putInt(0);
|
||||
writer.put((byte) 1);
|
||||
|
||||
Item item;
|
||||
if (this.itemUUID > 0)
|
||||
item = Item.getFromCache(this.itemUUID);
|
||||
|
||||
Reference in New Issue
Block a user