GiveItem() public method

public GiveItem ( ushort id, byte amount = 1 ) : InventoryStatus
id ushort
amount byte
return InventoryStatus
Ejemplo n.º 1
0
        private void ItemCommand(ZoneCharacter character, params string[] param)
        {
            ushort id = ushort.Parse(param[1]);
            byte amount = 1;
            if (param.Length > 2)
            {
                amount = byte.Parse(param[2]);
            }

            switch (character.GiveItem(id, amount))
            {
                case FiestaLib.InventoryStatus.FULL:
                    Handler12.InventoryFull(character);
                    return;
                case FiestaLib.InventoryStatus.NOT_FOUND:
                    character.DropMessage("Item not found.");
                    return;
            }
        }