Browse Source

Serialization update

combat-2
MagicBot 8 months ago
parent
commit
e195d86fb6
  1. 23
      src/engine/net/client/msg/ItemProductionMsg.java

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

@ -11,15 +11,12 @@ package engine.net.client.msg; @@ -11,15 +11,12 @@ package engine.net.client.msg;
import engine.gameManager.BuildingManager;
import engine.gameManager.ForgeManager;
import engine.gameManager.PowersManager;
import engine.mbEnums;
import engine.mbEnums.GameObjectType;
import engine.net.*;
import engine.objects.Building;
import engine.objects.Item;
import engine.objects.MobLoot;
import engine.objects.NPC;
import engine.powers.EffectsBase;
import java.util.HashMap;
@ -237,25 +234,13 @@ public class ItemProductionMsg extends ClientNetMsg { @@ -237,25 +234,13 @@ public class ItemProductionMsg extends ClientNetMsg {
writer.putInt(0);
writer.putInt(0);
writer.putInt(1);
MobLoot toRoll = MobLoot.getFromCache(this.itemUUID);
Item toRoll = ForgeManager.inMemoryItemLookup.get(this.itemUUID);
writer.putInt(-1497023830);
if (toRoll != null && toRoll.getPrefix() != null && !toRoll.getPrefix().isEmpty()) {
EffectsBase eb = PowersManager.getEffectByIDString(toRoll.getPrefix());
if (eb == null)
this.pToken = 0;
else
this.pToken = eb.getToken();
}
this.pToken = toRoll.prefixToken;
this.sToken = toRoll.suffixToken;
if (toRoll != null && toRoll.getSuffix() != null && !toRoll.getSuffix().isEmpty()) {
EffectsBase eb = PowersManager.getEffectByIDString(toRoll.getSuffix());
if (eb == null)
this.sToken = 0;
else
this.sToken = eb.getToken();
}
if (toRoll.isRandom() == false || (toRoll != null && toRoll.isComplete())) {
if (toRoll.isComplete()) {
writer.putInt(this.pToken);
writer.putInt(this.sToken);
} else {

Loading…
Cancel
Save