summaryrefslogtreecommitdiff
path: root/src/game-server/inventory.h
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-12-02 23:51:07 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2012-01-18 12:39:23 +0100
commit8cd2c43afe043a85451d9e3e5aba71b8b7c6e0e9 (patch)
tree5e32e30dd6771fdb5ccc2630a55f9e967ba00457 /src/game-server/inventory.h
parent79be5133dcda12d20934faf32a7f71e6c7de0e78 (diff)
downloadmanaserv-8cd2c43afe043a85451d9e3e5aba71b8b7c6e0e9.tar.gz
manaserv-8cd2c43afe043a85451d9e3e5aba71b8b7c6e0e9.tar.bz2
manaserv-8cd2c43afe043a85451d9e3e5aba71b8b7c6e0e9.tar.xz
manaserv-8cd2c43afe043a85451d9e3e5aba71b8b7c6e0e9.zip
Fixed the chr_inv_count function to handle equipment.
the function can now count in the inventory and/or the player's equipment. I also fixed the script function and added a use case in the example map. + Fixes after Ablu's review. + 2nd fix after Ablu's review: Fix the inventory remove behaviour. Resolves: Mana-Mantis #288 Reviewed-by: Ablu
Diffstat (limited to 'src/game-server/inventory.h')
-rw-r--r--src/game-server/inventory.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game-server/inventory.h b/src/game-server/inventory.h
index 812c142d..4593add1 100644
--- a/src/game-server/inventory.h
+++ b/src/game-server/inventory.h
@@ -112,8 +112,11 @@ class Inventory
/**
* Counts number of items with given Id.
+ * @param inInventory Search in player's inventory.
+ * @param inEquipment Search in player's equipment.
*/
- unsigned int count(unsigned int itemId) const;
+ unsigned int count(unsigned int itemId, bool inInventory = true,
+ bool inEquipment = true) const;
/**
* Gets the ID of the items in a given slot.