summaryrefslogtreecommitdiffstats
path: root/source/UI/Window.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-11-08 21:32:14 +0100
committermadmaxoft <github@xoft.cz>2013-11-08 21:32:14 +0100
commit07fa8313b184e2a9d7666cf6f7b10d5def8dc928 (patch)
tree386d2e6ef3a5251e4ab2972b6620e5092a0ae546 /source/UI/Window.h
parentFixed code style. (diff)
downloadcuberite-07fa8313b184e2a9d7666cf6f7b10d5def8dc928.tar
cuberite-07fa8313b184e2a9d7666cf6f7b10d5def8dc928.tar.gz
cuberite-07fa8313b184e2a9d7666cf6f7b10d5def8dc928.tar.bz2
cuberite-07fa8313b184e2a9d7666cf6f7b10d5def8dc928.tar.lz
cuberite-07fa8313b184e2a9d7666cf6f7b10d5def8dc928.tar.xz
cuberite-07fa8313b184e2a9d7666cf6f7b10d5def8dc928.tar.zst
cuberite-07fa8313b184e2a9d7666cf6f7b10d5def8dc928.zip
Diffstat (limited to 'source/UI/Window.h')
-rw-r--r--source/UI/Window.h6
1 files changed, 6 insertions, 0 deletions
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