diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-12-02 19:09:18 +0100 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2012-01-10 01:12:51 +0100 |
commit | 4c9db4a20aad649f80c9db8379f372de7361096b (patch) | |
tree | 317b817b830140a07970549995ed683b90856d22 /src/game-server/inventory.h | |
parent | 1c40074d28676ec996ec91f1719cff43077f15f6 (diff) | |
download | manaserv-4c9db4a20aad649f80c9db8379f372de7361096b.tar.gz manaserv-4c9db4a20aad649f80c9db8379f372de7361096b.tar.bz2 manaserv-4c9db4a20aad649f80c9db8379f372de7361096b.tar.xz manaserv-4c9db4a20aad649f80c9db8379f372de7361096b.zip |
Added equip lua script functions.
One per inventory slot, one per item id or name.
+ Fixes from 2 Ablu's reviews.
Reviewed-by: Ablu.
1st part of Mana-Mantis #339, 350.
Diffstat (limited to 'src/game-server/inventory.h')
-rw-r--r-- | src/game-server/inventory.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game-server/inventory.h b/src/game-server/inventory.h index 547abdf0..84981ea3 100644 --- a/src/game-server/inventory.h +++ b/src/game-server/inventory.h @@ -96,7 +96,7 @@ class Inventory unsigned int removeFromSlot(unsigned int slot, unsigned int amount); /** - * Counts number of items with given ID. + * Counts number of items with given Id. */ unsigned int count(unsigned int itemId) const; @@ -105,6 +105,12 @@ class Inventory */ unsigned int getItem(unsigned int slot) const; + /** + * Returns the first inventory slot with the given item Id. + * Returns -1 otherwise. + */ + int getFirstSlot(unsigned int itemId); + private: /** * Tell whether the equipment slot has enough room in an equipment slot. |