Mooege.Core.GS.Common.InventoryGrid.RemoveItem C# (CSharp) Method

RemoveItem() public method

Removes an item from the backpack
public RemoveItem ( Item item ) : void
item Item
return void
        public void RemoveItem(Item item)
        {
            for (int r = 0; r < Rows; r++)
            {
                for (int c = 0; c < Columns; c++)
                {
                    if (_backpack[r, c] == item.DynamicID)
                    {
                        _backpack[r, c] = 0;
                        item.SetInventoryLocation(-1, -1, -1); // client doesn't like this
                        item.Owner = null;
                    }
                }
            }
        }