diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-11 21:54:57 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-11 21:54:57 +0200 |
commit | 18b04ab93f31e4701351dc35f847f2763d75c5e0 (patch) | |
tree | 577ee0332b3ae8778443dc6af4ee0f24c7ca1011 /source/cInventory.h | |
parent | Updated Bindings to match the new armor categories and torch metas (diff) | |
download | cuberite-18b04ab93f31e4701351dc35f847f2763d75c5e0.tar cuberite-18b04ab93f31e4701351dc35f847f2763d75c5e0.tar.gz cuberite-18b04ab93f31e4701351dc35f847f2763d75c5e0.tar.bz2 cuberite-18b04ab93f31e4701351dc35f847f2763d75c5e0.tar.lz cuberite-18b04ab93f31e4701351dc35f847f2763d75c5e0.tar.xz cuberite-18b04ab93f31e4701351dc35f847f2763d75c5e0.tar.zst cuberite-18b04ab93f31e4701351dc35f847f2763d75c5e0.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cInventory.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/cInventory.h b/source/cInventory.h index 2336df57f..6f824f0f5 100644 --- a/source/cInventory.h +++ b/source/cInventory.h @@ -41,6 +41,7 @@ public: bool LoadFromJson(Json::Value & a_Value); void SendWholeInventory( cClientHandle* a_Client ); + void SendWholeInventoryToAll(void); cItem* GetSlot( int a_SlotNum ); //tolua_export cItem* GetSlots() { return m_Slots; } @@ -53,6 +54,12 @@ public: virtual void Clicked( cPacket* a_ClickPacket ) = 0; void SendSlot( int a_SlotNum ); //tolua_export + + /// Returns how many items of the specified type would fit into the slot range specified + int HowManyCanFit(ENUM_ITEM_ID a_ItemType, short a_ItemDamage, int a_BeginSlot, int a_EndSlot); + + /// Moves items, fitting them into the slot range specified, up to a_Count items. Returns the number of items moved + int MoveItem(ENUM_ITEM_ID a_ItemType, short a_ItemDamage, int a_Count, int a_BeginSlot, int a_EndSlot); static const unsigned int c_NumSlots = 45; static const unsigned int c_MainSlots = 27; |