Browse Source

More itembase refactor

combat-2
MagicBot 8 months ago
parent
commit
a109e9864f
  1. 4
      src/engine/net/client/msg/ManageNPCMsg.java
  2. 3
      src/engine/objects/Item.java

4
src/engine/net/client/msg/ManageNPCMsg.java

@ -443,15 +443,13 @@ public class ManageNPCMsg extends ClientNetMsg { @@ -443,15 +443,13 @@ public class ManageNPCMsg extends ClientNetMsg {
for (Item item : itemList) {
ItemBase ib = item.getItemBase();
ItemTemplate template = ItemTemplate.templates.get(ib);
writer.put((byte) 0); // ? Unknown45
writer.putInt(item.getObjectType().ordinal());
writer.putInt(item.getObjectUUID());
writer.putInt(0);
writer.putInt(item.getTemplateID());
writer.putInt(template.item_value);
writer.putInt(item.template.item_value);
long timeLife = item.getDateToUpgrade() - System.currentTimeMillis();

3
src/engine/objects/Item.java

@ -192,7 +192,7 @@ public class Item extends AbstractWorldObject { @@ -192,7 +192,7 @@ public class Item extends AbstractWorldObject {
if (includeSlot)
writer.putInt(item.equipSlot.ordinal());
writer.putInt(0); // Pad
writer.putInt(item.getItemBase().getUUID());
writer.putInt(item.templateID);
writer.putInt(item.getObjectType().ordinal());
writer.putInt(item.getObjectUUID());
@ -397,7 +397,6 @@ public class Item extends AbstractWorldObject { @@ -397,7 +397,6 @@ public class Item extends AbstractWorldObject {
if (includeSlot)
reader.getInt();
reader.getInt();
int itemBase = reader.getInt(); //itemBase
int objectType = reader.getInt(); //object type;
int UUID = reader.getInt();
for (int i = 0; i < 14; i++) {

Loading…
Cancel
Save