|
|
@ -38,7 +38,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
private int size; |
|
|
|
private int size; |
|
|
|
private int buildingUUID; |
|
|
|
private int buildingUUID; |
|
|
|
private int unknown01; |
|
|
|
private int unknown01; |
|
|
|
private int itemUUID; |
|
|
|
private int templateID; |
|
|
|
private int itemType; |
|
|
|
private int itemType; |
|
|
|
private int totalProduction; |
|
|
|
private int totalProduction; |
|
|
|
private int unknown03; |
|
|
|
private int unknown03; |
|
|
@ -61,7 +61,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
this.size = 0; |
|
|
|
this.size = 0; |
|
|
|
this.buildingUUID = 0; |
|
|
|
this.buildingUUID = 0; |
|
|
|
this.unknown01 = 0; |
|
|
|
this.unknown01 = 0; |
|
|
|
this.itemUUID = 0; |
|
|
|
this.templateID = 0; |
|
|
|
this.totalProduction = 0; |
|
|
|
this.totalProduction = 0; |
|
|
|
this.unknown03 = 0; |
|
|
|
this.unknown03 = 0; |
|
|
|
this.pToken = 0; |
|
|
|
this.pToken = 0; |
|
|
@ -81,7 +81,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
this.buildingUUID = building.getObjectUUID(); |
|
|
|
this.buildingUUID = building.getObjectUUID(); |
|
|
|
this.npcUUID = vendor.getObjectUUID(); |
|
|
|
this.npcUUID = vendor.getObjectUUID(); |
|
|
|
this.itemType = item.getObjectType().ordinal(); |
|
|
|
this.itemType = item.getObjectType().ordinal(); |
|
|
|
this.itemUUID = item.getObjectUUID(); |
|
|
|
this.templateID = item.getObjectUUID(); |
|
|
|
this.unknown01 = 0; |
|
|
|
this.unknown01 = 0; |
|
|
|
this.totalProduction = 0; |
|
|
|
this.totalProduction = 0; |
|
|
|
this.unknown03 = 0; |
|
|
|
this.unknown03 = 0; |
|
|
@ -139,7 +139,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
|
|
|
|
|
|
|
|
if (!add) { |
|
|
|
if (!add) { |
|
|
|
writer.put((byte) 1); |
|
|
|
writer.put((byte) 1); |
|
|
|
Item item = Item.getFromCache(this.itemUUID); |
|
|
|
Item item = Item.getFromCache(this.templateID); |
|
|
|
if (item != null) |
|
|
|
if (item != null) |
|
|
|
Item.serializeForClientMsgWithoutSlot(item, writer); |
|
|
|
Item.serializeForClientMsgWithoutSlot(item, writer); |
|
|
|
writer.putInt(building.getStrongboxValue()); |
|
|
|
writer.putInt(building.getStrongboxValue()); |
|
|
@ -154,9 +154,9 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
writer.put((byte) 1); |
|
|
|
writer.put((byte) 1); |
|
|
|
Item item; |
|
|
|
Item item; |
|
|
|
if (this.itemType == GameObjectType.Item.ordinal()) |
|
|
|
if (this.itemType == GameObjectType.Item.ordinal()) |
|
|
|
item = Item.getFromCache(this.itemUUID); |
|
|
|
item = Item.getFromCache(this.templateID); |
|
|
|
else |
|
|
|
else |
|
|
|
item = MobLoot.getFromCache(this.itemUUID); |
|
|
|
item = MobLoot.getFromCache(this.templateID); |
|
|
|
if (item != null) |
|
|
|
if (item != null) |
|
|
|
Item.serializeForClientMsgWithoutSlot(item, writer); |
|
|
|
Item.serializeForClientMsgWithoutSlot(item, writer); |
|
|
|
writer.putInt(building.getStrongboxValue()); |
|
|
|
writer.putInt(building.getStrongboxValue()); |
|
|
@ -166,7 +166,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
break; |
|
|
|
break; |
|
|
|
case ACTION_CONFIRM_TAKE: |
|
|
|
case ACTION_CONFIRM_TAKE: |
|
|
|
writer.putInt(this.itemType); |
|
|
|
writer.putInt(this.itemType); |
|
|
|
writer.putInt(this.itemUUID); |
|
|
|
writer.putInt(this.templateID); |
|
|
|
writer.putInt(1); |
|
|
|
writer.putInt(1); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
@ -178,7 +178,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
break; |
|
|
|
break; |
|
|
|
case ACTION_SETPRICE: |
|
|
|
case ACTION_SETPRICE: |
|
|
|
writer.putInt(this.itemType); |
|
|
|
writer.putInt(this.itemType); |
|
|
|
writer.putInt(this.itemUUID); |
|
|
|
writer.putInt(this.templateID); |
|
|
|
writer.putInt(1); |
|
|
|
writer.putInt(1); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
@ -191,7 +191,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
break; |
|
|
|
break; |
|
|
|
case ACTION_CONFIRM_SETPRICE: |
|
|
|
case ACTION_CONFIRM_SETPRICE: |
|
|
|
writer.putInt(this.itemType); |
|
|
|
writer.putInt(this.itemType); |
|
|
|
writer.putInt(this.itemUUID); |
|
|
|
writer.putInt(this.templateID); |
|
|
|
writer.putInt(1); |
|
|
|
writer.putInt(1); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
@ -205,7 +205,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
break; |
|
|
|
break; |
|
|
|
case ACTION_DEPOSIT: |
|
|
|
case ACTION_DEPOSIT: |
|
|
|
writer.putInt(this.itemType); |
|
|
|
writer.putInt(this.itemType); |
|
|
|
writer.putInt(this.itemUUID); |
|
|
|
writer.putInt(this.templateID); |
|
|
|
writer.putInt(1); |
|
|
|
writer.putInt(1); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
@ -246,7 +246,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(0); |
|
|
|
writer.putInt(1); |
|
|
|
writer.putInt(1); |
|
|
|
MobLoot toRoll = MobLoot.getFromCache(this.itemUUID); |
|
|
|
MobLoot toRoll = MobLoot.getFromCache(this.templateID); |
|
|
|
writer.putInt(-1497023830); |
|
|
|
writer.putInt(-1497023830); |
|
|
|
if (toRoll != null && toRoll.getPrefix() != null && !toRoll.getPrefix().isEmpty()) { |
|
|
|
if (toRoll != null && toRoll.getPrefix() != null && !toRoll.getPrefix().isEmpty()) { |
|
|
|
EffectsBase eb = PowersManager.getEffectByIDString(toRoll.getPrefix()); |
|
|
|
EffectsBase eb = PowersManager.getEffectByIDString(toRoll.getPrefix()); |
|
|
@ -273,7 +273,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
|
|
|
|
|
|
|
|
writer.putString(toRoll.name); |
|
|
|
writer.putString(toRoll.name); |
|
|
|
writer.putInt(GameObjectType.MobLoot.ordinal()); |
|
|
|
writer.putInt(GameObjectType.MobLoot.ordinal()); |
|
|
|
writer.putInt(this.itemUUID); |
|
|
|
writer.putInt(this.templateID); |
|
|
|
writer.putInt(0); //items left to produce?
|
|
|
|
writer.putInt(0); //items left to produce?
|
|
|
|
|
|
|
|
|
|
|
|
if (toRoll != null) { |
|
|
|
if (toRoll != null) { |
|
|
@ -322,7 +322,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
break; |
|
|
|
break; |
|
|
|
case ACTION_COMPLETE: |
|
|
|
case ACTION_COMPLETE: |
|
|
|
writer.putInt(this.itemType); |
|
|
|
writer.putInt(this.itemType); |
|
|
|
writer.putInt(this.itemUUID); |
|
|
|
writer.putInt(this.templateID); |
|
|
|
writer.putInt(this.totalProduction); |
|
|
|
writer.putInt(this.totalProduction); |
|
|
|
writer.putInt(this.unknown03); |
|
|
|
writer.putInt(this.unknown03); |
|
|
|
writer.putInt(this.pToken); |
|
|
|
writer.putInt(this.pToken); |
|
|
@ -334,7 +334,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
break; |
|
|
|
break; |
|
|
|
case ACTION_JUNK: |
|
|
|
case ACTION_JUNK: |
|
|
|
writer.putInt(this.itemType); |
|
|
|
writer.putInt(this.itemType); |
|
|
|
writer.putInt(this.itemUUID); |
|
|
|
writer.putInt(this.templateID); |
|
|
|
writer.putInt(this.totalProduction); |
|
|
|
writer.putInt(this.totalProduction); |
|
|
|
writer.putInt(this.unknown03); |
|
|
|
writer.putInt(this.unknown03); |
|
|
|
writer.putInt(this.pToken); |
|
|
|
writer.putInt(this.pToken); |
|
|
@ -372,7 +372,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
switch (this.actionType) { |
|
|
|
switch (this.actionType) { |
|
|
|
case ACTION_SETPRICE: |
|
|
|
case ACTION_SETPRICE: |
|
|
|
this.itemType = reader.getInt(); |
|
|
|
this.itemType = reader.getInt(); |
|
|
|
this.itemUUID = reader.getInt(); |
|
|
|
this.templateID = reader.getInt(); |
|
|
|
reader.getInt(); |
|
|
|
reader.getInt(); |
|
|
|
reader.getInt(); |
|
|
|
reader.getInt(); |
|
|
|
reader.getInt(); |
|
|
|
reader.getInt(); |
|
|
@ -397,15 +397,15 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
HashMap<Integer, Integer> tempIDs = new HashMap<>(); |
|
|
|
HashMap<Integer, Integer> tempIDs = new HashMap<>(); |
|
|
|
for (int i = 0; i < this.size; i++) { |
|
|
|
for (int i = 0; i < this.size; i++) { |
|
|
|
int type = reader.getInt(); // Item type padding
|
|
|
|
int type = reader.getInt(); // Item type padding
|
|
|
|
this.itemUUID = reader.getInt(); |
|
|
|
this.templateID = reader.getInt(); |
|
|
|
tempIDs.put(this.itemUUID, type); |
|
|
|
tempIDs.put(this.templateID, type); |
|
|
|
} |
|
|
|
} |
|
|
|
reader.getInt(); |
|
|
|
reader.getInt(); |
|
|
|
this.itemIDtoTypeMap = tempIDs; |
|
|
|
this.itemIDtoTypeMap = tempIDs; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case ACTION_DEPOSIT: |
|
|
|
case ACTION_DEPOSIT: |
|
|
|
this.itemType = reader.getInt(); |
|
|
|
this.itemType = reader.getInt(); |
|
|
|
this.itemUUID = reader.getInt(); |
|
|
|
this.templateID = reader.getInt(); |
|
|
|
reader.getInt(); |
|
|
|
reader.getInt(); |
|
|
|
reader.getInt(); |
|
|
|
reader.getInt(); |
|
|
|
reader.getInt(); |
|
|
|
reader.getInt(); |
|
|
@ -417,7 +417,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
break; |
|
|
|
break; |
|
|
|
case ACTION_JUNK: |
|
|
|
case ACTION_JUNK: |
|
|
|
this.itemType = reader.getInt(); |
|
|
|
this.itemType = reader.getInt(); |
|
|
|
this.itemUUID = reader.getInt(); |
|
|
|
this.templateID = reader.getInt(); |
|
|
|
this.totalProduction = reader.getInt(); |
|
|
|
this.totalProduction = reader.getInt(); |
|
|
|
this.unknown03 = reader.getInt(); |
|
|
|
this.unknown03 = reader.getInt(); |
|
|
|
this.pToken = reader.getInt(); |
|
|
|
this.pToken = reader.getInt(); |
|
|
@ -429,7 +429,7 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
this.itemType = reader.getInt(); |
|
|
|
this.itemType = reader.getInt(); |
|
|
|
this.itemUUID = reader.getInt(); |
|
|
|
this.templateID = reader.getInt(); |
|
|
|
this.totalProduction = reader.getInt(); |
|
|
|
this.totalProduction = reader.getInt(); |
|
|
|
this.unknown03 = reader.getInt(); |
|
|
|
this.unknown03 = reader.getInt(); |
|
|
|
this.pToken = reader.getInt(); |
|
|
|
this.pToken = reader.getInt(); |
|
|
@ -475,12 +475,12 @@ public class ItemProductionMsg extends ClientNetMsg { |
|
|
|
this.unknown03 = unknown03; |
|
|
|
this.unknown03 = unknown03; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int getItemUUID() { |
|
|
|
public int getTemplateID() { |
|
|
|
return itemUUID; |
|
|
|
return templateID; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setItemUUID(int itemUUID) { |
|
|
|
public void setTemplateID(int templateID) { |
|
|
|
this.itemUUID = itemUUID; |
|
|
|
this.templateID = templateID; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public int getpToken() { |
|
|
|
public int getpToken() { |
|
|
|