sendInventoryItemAdd() публичный Метод

public sendInventoryItemAdd ( UInt16 freeSlot, UInt32 itemId, ushort amount, UInt16 type, WorldClient client ) : void
freeSlot System.UInt16
itemId System.UInt32
amount ushort
type System.UInt16
client WorldClient
Результат void
Пример #1
0
        public void processItemAdd(UInt32 itemID, UInt16 type)
        {
            // ToDo: Get free slot, add item to Inventory
            // This method is called from looting and vendor buy (so vendor buy must care about money decrease)
            UInt16 freeSlot = Store.dbManager.WorldDbHandler.getFirstNewSlot();

            Store.dbManager.WorldDbHandler.addItemToInventory(freeSlot, itemID);

            ServerPackets pak    = new ServerPackets();
            ushort        amount = 0; // ToDo : make this dynamic lol

            pak.sendInventoryItemAdd(freeSlot, itemID, amount, type, Store.currentClient);
        }