0x21 InventoryUpdate (ch) h dddQhhhdhhhhddhhhhhhhhhhhh
[src=java]
protected final void writeImpl()
{
writeC(0x21);
writeH(_items.size());
for (ItemInfo item : _items)
{
writeH(item.getChange());
writeD(item.getObjectId());
writeD(item.getItem().getItemId());
writeD(item.getLocation());
writeQ(item.getCount());
writeH(item.getItem().getType2());
writeH(item.getCustomType1());
writeH(item.getEquipped());
writeD(item.getItem().getBodyPart());
writeH(item.getEnchant());
writeH(item.getCustomType2());
writeH(0x00);
writeH(0x00);
writeD(item.getMana());
writeD(item.getTime());
writeH(0x01);
writeH(item.getAttackElementType());
writeH(item.getAttackElementPower());
for (byte b = 0; b < 6; b++)
{
writeH(item.getElementDefAttr(b));
}
writeH(0x00);
writeH(0x00);
writeH(0x00);
}
_items.clear();
_items = null;
}
[/src]
fe:c6 ExQuestItemList (chh) dddQhhhdhhhhddhhhhhhhhhhhh
[src=java]
protected void writeImpl()
{
writeC(0xfe);
writeH(0xc6);
writeH(_items.size());
for (L2ItemInstance item : _items)
{
if (item == null || item.getItem() == null)
{
continue;
}
writeD(item.getObjectId());
writeD(item.getItem().getItemId());
writeD(item.getLocationSlot());
writeQ(item.getCount());
writeH(item.getItem().getType2());
writeH(item.getCustomType1());
writeH(0x00);
writeD(item.getItem().getBodyPart());
writeH(item.getEnchantLevel());
writeH(item.getCustomType2());
writeH(0x00);
writeH(0x00);
writeD(item.getMana());
writeD(item.isTimeLimitedItem() ? (int) (item.getRemainingTime() / 1000) : -9999);
writeH(0x01);
writeH(item.getAttackElementType());
writeH(item.getAttackElementPower());
for (byte b = 0; b < 6; b++)
{
writeH(item.getElementDefAttr(b));
}
writeH(0x00);
writeH(0x00);
writeH(0x00);
}
if (_inventory.hasInventoryBlock())
{
writeH(_inventory.getBlockItems().length);
writeC(_inventory.getBlockMode());
for (int i : _inventory.getBlockItems())
{
writeD(i);
}
}
else
{
writeH(0x00);
}
FastList.recycle(_items);
}
[/src]
0x11 ItemList (chh) dddQhhhdhhhhddhhhhhhhhhhhh
[src=java]
protected final void writeImpl()
{
writeC(0x11);
writeH(_showWindow ? 0x01 : 0x00);
writeH(_items.length);
for (L2ItemInstance item : _items)
{
if (item == null || item.getItem() == null)
{
continue;
}
writeD(item.getObjectId());
writeD(item.getItemId());
writeD(item.getLocationSlot());
writeQ(item.getCount());
writeH(item.getItem().getType2());
writeH(item.getCustomType1());
writeH(item.isEquipped() ? 0x01 : 0x00);
writeD(item.getItem().getBodyPart());
writeH(item.getEnchantLevel());
writeH(item.getCustomType2());
writeH(0x00);
writeH(0x00);
writeD(item.getMana());
writeD(item.isTimeLimitedItem() ? (int) (item.getRemainingTime() / 1000) : -9999);
writeH(0x01);
writeH(item.getAttackElementType());
writeH(item.getAttackElementPower());
for (byte b = 0; b < 6; b++)
{
writeH(item.getElementDefAttr(b));
}
writeH(0x00);
writeH(0x00);
writeH(0x00);
}
if (_inventory.hasInventoryBlock())
{
writeH(_inventory.getBlockItems().length);
writeC(_inventory.getBlockMode());
for(int i : _inventory.getBlockItems())
{
writeD(i);
}
}
else
{
writeH(0x00);
}
}
[/src]