diff options
Diffstat (limited to 'source/UI')
-rw-r--r-- | source/UI/Window.cpp | 2 | ||||
-rw-r--r-- | source/UI/Window.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/source/UI/Window.cpp b/source/UI/Window.cpp index 1318cbca8..1f023cb03 100644 --- a/source/UI/Window.cpp +++ b/source/UI/Window.cpp @@ -245,7 +245,7 @@ void cWindow::OpenedByPlayer(cPlayer & a_Player) } // for itr - m_SlotAreas[] } - a_Player.GetClientHandle()->SendWindowOpen(m_WindowID, m_WindowType, m_WindowTitle, GetNumSlots() - c_NumInventorySlots); + a_Player.GetClientHandle()->SendWindowOpen(*this); } diff --git a/source/UI/Window.h b/source/UI/Window.h index 2d5e81e9e..6927cd3ac 100644 --- a/source/UI/Window.h +++ b/source/UI/Window.h @@ -60,6 +60,8 @@ public: wtBeacon = 7, wtAnvil = 8, wtHopper = 9, + // Unknown: 10 + wtAnimalChest = 11, }; // tolua_end @@ -75,8 +77,12 @@ public: cWindowOwner * GetOwner(void) { return m_Owner; } void SetOwner( cWindowOwner * a_Owner ) { m_Owner = a_Owner; } + /// Returns the total number of slots int GetNumSlots(void) const; + /// Returns the number of slots, excluding the player's inventory (used for network protocols) + int GetNumNonInventorySlots(void) const { return GetNumSlots() - c_NumInventorySlots; } + // tolua_begin /// Returns the item at the specified slot for the specified player. Returns NULL if invalid SlotNum requested |