From e33e9111abe5bb7968f48bd2801bf182754e554c Mon Sep 17 00:00:00 2001 From: "sebi.noreply@gmail.com" Date: Wed, 24 Oct 2012 12:48:25 +0000 Subject: Fixed issues with pickups. * Now when picking up max. stack amount is checked. * Added cInventory::AddItemAnyAmount() which will not fail if it cannot add all items (it will just modify amount) * If there is no space in inventory and picking up stacked items, it will try to fill stacks already in inventory, partially picking up the item. * When closing inventory player will drop any items it's currently 'dragging' git-svn-id: http://mc-server.googlecode.com/svn/trunk@1008 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Inventory.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/Inventory.h') diff --git a/source/Inventory.h b/source/Inventory.h index 1dd22deec..bc6cb27f3 100644 --- a/source/Inventory.h +++ b/source/Inventory.h @@ -31,6 +31,7 @@ public: int GetSlotCountForType( int a_Type ); bool AddItem( cItem & a_Item ); //tolua_export + bool AddItemAnyAmount( cItem & a_Item ); //tolua_export bool RemoveItem( cItem & a_Item ); //tolua_export void SaveToJson(Json::Value & a_Value); -- cgit v1.2.3