vitlikbash, вот как описан в яве ItemList
java Код:
protected final void writeImpl()
{
writeC(0x11);
writeH(_showWindow ? 1 : 0);
writeH(_items.length);
for(L2ItemInstance temp : _items)
{
writeH(temp.getItem().getType1()); // item type1
writeD(temp.getObjectId());
writeD(temp.getItemId());
writeD(temp.getEquipSlot()); //order
writeQ(temp.getCount());
writeH(temp.getItem().getType2ForPackets()); // item type2
writeH(temp.getCustomType1()); // item type3
writeH(temp.isEquipped() ? 1 : 0);
writeD(temp.getBodyPart()); // rev 415 slot 0006-lr.ear 0008-neck 0030-lr.finger 0040-head 0080-?? 0100-l.hand 0200-gloves 0400-chest 0800-pants 1000-feet 2000-?? 4000-r.hand 8000-r.hand
writeH(temp.getEnchantLevel()); // enchant level
writeH(temp.getCustomType2()); // item type3
writeD(temp.getAugmentationId());
writeD(temp.isShadowItem() ? temp.getLifeTimeRemaining() : -1);
writeItemElements(temp);
writeD(temp.isTemporalItem() ? temp.getLifeTimeRemaining() : 0x00); // limited time item life remaining
writeItemRev152(temp);
}
//?? GraciaEpilogue
short some_count = 0; // кол-во хз чего
writeH(some_count);
if(some_count > 0)
{
writeC(0); //?
for(int i = 0; i < some_count; i++)
writeD(0); //?
}
}
InventoryUpdate
Java Код:
/**
* sample
*
* 21 // packet type
* 01 00 // item count
*
* 03 00 // update type 01-added?? 02-modified 03-removed
* 04 00 // itemType1 0-weapon/ring/earring/necklace 1-armor/shield 4-item/questitem/adena
* c6 37 50 40 // objectId
* cd 09 00 00 // itemId
* 05 00 00 00 // count
* 05 00 // itemType2 0-weapon 1-shield/armor 2-ring/earring/necklace 3-questitem 4-adena 5-item
* 00 00 // always 0 ??
* 00 00 // equipped 1-yes
* 00 00 00 00 // slot 0006-lr.ear 0008-neck 0030-lr.finger 0040-head 0080-?? 0100-l.hand 0200-gloves 0400-chest 0800-pants 1000-feet 2000-?? 4000-r.hand 8000-r.hand
* 00 00 // enchant level
* 00 00 // always 0 ??
* 00 00 00 00 // augmentation id
* ff ff ff ff // shadow weapon time remaining
*
* format h (hh dddhhhd hh dd) revision 740
* format h (hhdddQhhhdhhhhdddddddddd) Gracia Final
*/
protected final void writeImpl()
{
writeC(0x21);
writeH(_items.size());
for(ItemInfo temp : _items)
{
writeH(temp.getLastChange());
writeH(temp.getType1()); // item type1
writeD(temp.getObjectId());
writeD(temp.getItemId());
writeD(temp.getEquipSlot()); //order
writeQ(temp.getCount());
writeH(temp.getType2()); // item type2
writeH(temp.getCustomType1());
writeH(temp.isEquipped() ? 1 : 0);
writeD(temp.getBodyPart()); // rev 415 slot 0006-lr.ear 0008-neck 0030-lr.finger 0040-head 0080-?? 0100-l.hand 0200-gloves 0400-chest 0800-pants 1000-feet 2000-?? 4000-r.hand 8000-r.hand
writeH(temp.getEnchantLevel()); // enchant level or pet level
writeH(temp.getCustomType2()); // Pet name exists or not shown in control item
writeD(temp.getAugmentationId());
writeD(temp.getShadowLifeTime()); //interlude FF FF FF FF
writeH(temp.getAttackElement()[0]);
writeH(temp.getAttackElement()[1]);
writeH(temp.getDefenceFire());
writeH(temp.getDefenceWater());
writeH(temp.getDefenceWind());
writeH(temp.getDefenceEarth());
writeH(temp.getDefenceHoly());
writeH(temp.getDefenceUnholy());
writeD(temp.getTemporalLifeTime()); // limited time item life remaining
if(getClient().getRevision() >= 152) //FIXME
{
writeH(0);
writeH(0);
writeH(0);
}
}
}