Показать сообщение отдельно
Непрочитано 20.05.2011, 06:18   #2
Аватар для PROGRAMMATOR
Администратор

По умолчанию Re: Работа над Godess of Destruction (part 2)

0x21 InventoryUpdate (ch) h dddQhhhdhhhhddhhhhhhhhhhhh




 
	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;
	}
 
Code: Java

fe:c6 ExQuestItemList (chh) dddQhhhdhhhhddhhhhhhhhhhhh




 
	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);
	}
 
Code: Java

0x11 ItemList (chh) dddQhhhdhhhhddhhhhhhhhhhhh

 
	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);
		}
	}
 
Code: Java
__________________
composer require laravel/framework
yarn add vue
PROGRAMMATOR вне форума Отправить сообщение для PROGRAMMATOR с помощью ICQ Отправить сообщение для PROGRAMMATOR с помощью Skype™
Сказали спасибо: