Added cItemGrid to represent an XY grid of items; converted chests to use cItemGrid.
http://forum.mc-server.org/showthread.php?tid=831 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1380 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -224,7 +224,7 @@ cSlotAreaChest::cSlotAreaChest(cChestEntity * a_Chest, cWindow & a_ParentWindow)
|
||||
const cItem * cSlotAreaChest::GetSlot(int a_SlotNum, cPlayer & a_Player)
|
||||
{
|
||||
// a_SlotNum ranges from 0 to 26, use that to index the chest entity's inventory directly:
|
||||
return m_Chest->GetSlot(a_SlotNum);
|
||||
return &(m_Chest->GetSlot(a_SlotNum));
|
||||
}
|
||||
|
||||
|
||||
@@ -259,11 +259,11 @@ const cItem * cSlotAreaDoubleChest::GetSlot(int a_SlotNum, cPlayer & a_Player)
|
||||
// a_SlotNum ranges from 0 to 53, use that to index the correct chest's inventory:
|
||||
if (a_SlotNum < 27)
|
||||
{
|
||||
return m_TopChest->GetSlot(a_SlotNum);
|
||||
return &(m_TopChest->GetSlot(a_SlotNum));
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_BottomChest->GetSlot(a_SlotNum - 27);
|
||||
return &(m_BottomChest->GetSlot(a_SlotNum - 27));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user