public void ConsumeGridItem(GridItem item) { if (item is StackableGridItem) { StackableGridItem stkRef = item as StackableGridItem; int currentNumber = item.GetCurrentNumber(); currentNumber -= 1; stkRef.SetCurrentNubmber(currentNumber); ConsumeItem(item.GetItemReference()); if (currentNumber == 0) { RemoveItemFromInventory(item, true); } } else { ConsumeItem(item.GetItemReference()); RemoveItemFromInventory(item, true); } }