Refactored cInventory to use cItemGrid for the actual Storage
This makes the API more orthogonal and is easier to use in the plugins. Also changes in the inventory are now propagated to the needed places (armor updates to BroadcastEntityEquipment etc.) even when the inventory is changed by a plugin. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1503 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -613,7 +613,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
|
||||
// a_SlotNum ranges from 0 to 35, map that to the player's inventory slots according to the internal offset
|
||||
return &a_Player.GetInventory().GetSlot(a_SlotNum + m_SlotOffset);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user