Ejemplo n.º 1
0
        /// <summary>
        /// Drops an item from the inventory onto the ground.
        /// </summary>
        /// <param name="slot">The slot of the item to drop.</param>
        /// <param name="amount">The amount of the item in the slot to drop.</param>
        public void Drop(InventorySlot slot, byte amount)
        {
            // Check for a valid item
            var item = this[slot];

            if (item == null)
            {
                return;
            }

            // Drop
            using (var pw = ClientPacket.DropInventoryItem(slot, amount))
            {
                _socket.Send(pw, ClientMessageType.GUIItems);
            }
        }