Changed inheritance a bit

* cBlockEntityWithItems now inherits from cBlockEntityWindowOwner
This commit is contained in:
Tiger Wang
2014-02-12 22:01:22 +00:00
parent 91ebb6cef0
commit f97ce30151
8 changed files with 55 additions and 34 deletions
+7
View File
@@ -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;
}