From 231d6aed354737b01ff2f9f53a6c41c53cbee137 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 21 Dec 2012 11:02:31 +0000 Subject: Extended player inventory by direct r/o access to armor slots git-svn-id: http://mc-server.googlecode.com/svn/trunk@1086 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Inventory.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source') diff --git a/source/Inventory.h b/source/Inventory.h index bc6cb27f3..0ac839ac2 100644 --- a/source/Inventory.h +++ b/source/Inventory.h @@ -48,6 +48,13 @@ public: const cItem & GetEquippedItem(void) const; void SetEquippedSlot(int a_SlotNum); //tolua_export short GetEquippedSlot(void) { return m_EquippedSlot; } //tolua_export + + // tolua_begin + const cItem & GetEquippedHelmet (void) const { return m_Slots[c_ArmorOffset]; } + const cItem & GetEquippedChestplate(void) const { return m_Slots[c_ArmorOffset + 1]; } + const cItem & GetEquippedLeggings (void) const { return m_Slots[c_ArmorOffset + 2]; } + const cItem & GetEquippedBoots (void) const { return m_Slots[c_ArmorOffset + 3]; } + // tolua_end void SendSlot( int a_SlotNum ); //tolua_export -- cgit v1.2.3