1
0

Inventory code cleanup, players can now see each other's armor

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1493 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2013-05-19 18:22:37 +00:00
parent 8311ee5ec6
commit 90c398a392
22 changed files with 409 additions and 222 deletions

View File

@@ -614,7 +614,7 @@ void cSlotAreaInventoryBase::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAc
const cItem * cSlotAreaInventoryBase::GetSlot(int a_SlotNum, cPlayer & a_Player)
{
// a_SlotNum ranges from 0 to 35, map that to the player's inventory slots 9 to 44
return a_Player.GetInventory().GetSlot(a_SlotNum + m_SlotOffset);
return &a_Player.GetInventory().GetSlot(a_SlotNum + m_SlotOffset);
}
@@ -623,7 +623,7 @@ const cItem * cSlotAreaInventoryBase::GetSlot(int a_SlotNum, cPlayer & a_Player)
void cSlotAreaInventoryBase::SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item)
{
*(a_Player.GetInventory().GetSlot(a_SlotNum + m_SlotOffset)) = a_Item;
a_Player.GetInventory().SetSlot(a_SlotNum + m_SlotOffset, a_Item);
}