/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ package net.sf.l2j.gameserver.serverpackets; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; /** * Format: (ch)ddddddd * d: Number of Inventory Slots * d: Number of Warehouse Slots * d: Number of Freight Slots (unconfirmed) (200 for a low level dwarf) * d: Private Sell Store Slots (unconfirmed) (4 for a low level dwarf) * d: Private Buy Store Slots (unconfirmed) (5 for a low level dwarf) * d: Dwarven Recipe Book Slots * d: Normal Recipe Book Slots * @author -Wooden- * format from KenM */ public class ExStorageMaxCount extends L2GameServerPacket { private static final String _S__FE_2E_EXSTORAGEMAXCOUNT = "[S] FE:2f ExStorageMaxCount"; private L2PcInstance _activeChar; private int _inventory; private int _warehouse; private int _freight; private int _privateSell; private int _privateBuy; private int _receipeD; private int _recipe; public ExStorageMaxCount(L2PcInstance character) { _activeChar = character; _inventory = _activeChar.getInventoryLimit(); _warehouse = _activeChar.getWareHouseLimit(); _privateSell = _activeChar.getPrivateSellStoreLimit(); _privateBuy = _activeChar.getPrivateBuyStoreLimit(); _freight = _activeChar.getFreightLimit(); _receipeD = _activeChar.getDwarfRecipeLimit(); _recipe = _activeChar.getCommonRecipeLimit(); } /* (non-Javadoc) * @see net.sf.l2j.gameserver.serverpackets.ServerBasePacket#writeImpl() */ @Override protected void writeImpl() { writeC(0xfe); writeH(0x2f); writeD(_inventory); writeD(_warehouse); writeD(_freight); writeD(_privateSell); writeD(_privateBuy); writeD(_receipeD); writeD(_recipe); } /* (non-Javadoc) * @see net.sf.l2j.gameserver.BasePacket#getType() */ @Override public String getType() { return _S__FE_2E_EXSTORAGEMAXCOUNT; } }