summaryrefslogtreecommitdiffstats
path: root/source/cInventory.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/cInventory.h7
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;