Minor item packet cleanup.
This commit is contained in:
parent
c7bb990be4
commit
bc4502146b
@ -53,9 +53,6 @@ public class InventoryUpdate extends GameServerPacket
|
||||
_items = new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param items
|
||||
*/
|
||||
public InventoryUpdate(List<ItemInfo> items)
|
||||
{
|
||||
_items = items;
|
||||
@ -111,8 +108,7 @@ public class InventoryUpdate extends GameServerPacket
|
||||
protected final void writeImpl()
|
||||
{
|
||||
writeC(0x27);
|
||||
final int count = _items.size();
|
||||
writeH(count);
|
||||
writeH(_items.size());
|
||||
for (ItemInfo item : _items)
|
||||
{
|
||||
writeH(item.getChange()); // Update type : 01-add, 02-modify,
|
||||
|
@ -47,33 +47,25 @@ public class ItemList extends GameServerPacket
|
||||
{
|
||||
writeC(0x1b);
|
||||
writeH(_showWindow ? 0x01 : 0x00);
|
||||
final int count = _items.length;
|
||||
writeH(count);
|
||||
writeH(_items.length);
|
||||
for (ItemInstance temp : _items)
|
||||
{
|
||||
if ((temp == null) || (temp.getItem() == null))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
writeH(temp.getItem().getType1()); // item type1
|
||||
writeH(temp.getItem().getType1());
|
||||
writeD(temp.getObjectId());
|
||||
writeD(temp.getItemId());
|
||||
writeD(temp.getCount());
|
||||
writeH(temp.getItem().getType2()); // item type2
|
||||
writeH(temp.getCustomType1()); // item type3
|
||||
writeH(temp.getItem().getType2());
|
||||
writeH(temp.getCustomType1());
|
||||
writeH(temp.isEquipped() ? 0x01 : 0x00);
|
||||
writeD(temp.getItem().getBodyPart());
|
||||
writeH(temp.getEnchantLevel()); // enchant level
|
||||
writeH(temp.getEnchantLevel());
|
||||
// race tickets
|
||||
writeH(temp.getCustomType2()); // item type3
|
||||
if (temp.isAugmented())
|
||||
{
|
||||
writeD(temp.getAugmentation().getAugmentationId());
|
||||
}
|
||||
else
|
||||
{
|
||||
writeD(0x00);
|
||||
}
|
||||
writeH(temp.getCustomType2());
|
||||
writeD((temp.isAugmented()) ? temp.getAugmentation().getAugmentationId() : 0x00);
|
||||
writeD(temp.getMana());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user