Fixed references to getEquipmentList - might fix crashing

This commit is contained in:
Seefo
2014-05-06 20:55:15 -04:00
parent 4e36321ca3
commit b714ea093d
3 changed files with 6 additions and 6 deletions
@@ -1063,7 +1063,7 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder {
buffer.putInt(1);
buffer.putInt(creature.getEquipmentListUpdateCounter());
buffer.put((byte) 1);
buffer.putShort((short) creature.getEquipmentList().indexOf(item));
buffer.putShort((short) creature.getEquipmentList().indexOf(item.getObjectId()));
if(item.getCustomization() == null || item.getCustomization().length == 0) {
buffer.putShort((short) 0);
} else {
@@ -1099,7 +1099,7 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder {
buffer.putInt(1);
buffer.putInt(creature.getEquipmentListUpdateCounter());
buffer.put((byte) 0);
buffer.putShort((short) creature.getEquipmentList().indexOf(item));
buffer.putShort((short) creature.getEquipmentList().indexOf(item.getObjectId()));
int size = buffer.position();
buffer.flip();