Changed inheritance a bit
* cBlockEntityWithItems now inherits from cBlockEntityWindowOwner
This commit is contained in:
@@ -369,6 +369,13 @@ int cItemGrid::ChangeSlotCount(int a_SlotNum, int a_AddToCount)
|
||||
}
|
||||
|
||||
m_Slots[a_SlotNum].m_ItemCount += a_AddToCount;
|
||||
|
||||
cItemHandler * Handler = cItemHandler::GetItemHandler(m_Slots[a_SlotNum].m_ItemType);
|
||||
if (m_Slots[a_SlotNum].m_ItemCount > Handler->GetMaxStackSize())
|
||||
{
|
||||
m_Slots[a_SlotNum].m_ItemCount = Handler->GetMaxStackSize();
|
||||
}
|
||||
|
||||
TriggerListeners(a_SlotNum);
|
||||
return m_Slots[a_SlotNum].m_ItemCount;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user