diff --git a/src/engine/objects/Item.java b/src/engine/objects/Item.java index da96cb6e..dbe828d3 100644 --- a/src/engine/objects/Item.java +++ b/src/engine/objects/Item.java @@ -397,34 +397,45 @@ public class Item extends AbstractWorldObject { if (includeSlot) reader.getInt(); reader.getInt(); + int templateID = reader.getInt(); //itemBase int objectType = reader.getInt(); //object type; int UUID = reader.getInt(); - for (int i = 0; i < 14; i++) { + + for (int i = 0; i < 14; i++) reader.getInt(); // Pads and statics - } + int unknown = reader.getInt(); byte readString = reader.get(); + if (readString == 1) reader.getString(); + byte readDurability = reader.get(); + if (readDurability == 1) { reader.getInt(); reader.getInt(); } byte readEnchants = reader.get(); + if (readEnchants == 1) { reader.getInt(); reader.getInt(); reader.getInt(); reader.getInt(); + int enchantSize = reader.getInt(); + for (int i = 0; i < enchantSize; i++) { reader.getInt(); //effect token reader.getInt(); //trains + int type = reader.getInt(); + reader.get(); + if (type == 1) reader.getLong(); //item comp else @@ -432,13 +443,14 @@ public class Item extends AbstractWorldObject { reader.getString(); //name reader.getFloat(); //duration } - for (int i = 0; i < 5; i++) { + + for (int i = 0; i < 5; i++) reader.getInt(); - } } reader.get(); byte isContract = reader.get(); + if (isContract == 1) { reader.getInt(); reader.getInt(); @@ -448,8 +460,10 @@ public class Item extends AbstractWorldObject { if (UUID == 0 || objectType == 0) return null; + if (objectType == GameObjectType.MobLoot.ordinal()) return MobLoot.getFromCache(UUID); + return Item.getFromCache(UUID); }