From 18b04ab93f31e4701351dc35f847f2763d75c5e0 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 11 Aug 2012 19:54:57 +0000 Subject: Added partial shift+click handling to the survival inventory git-svn-id: http://mc-server.googlecode.com/svn/trunk@730 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cInventory.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/cInventory.h') 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; -- cgit v1.2.3