diff options
author | Philipp Sehmisch <mana@crushnet.org> | 2011-03-15 20:51:38 +0100 |
---|---|---|
committer | Philipp Sehmisch <mana@crushnet.org> | 2011-03-16 08:36:52 +0100 |
commit | 05ad0a28aa4bada4569417c0d292d6960a8af5a2 (patch) | |
tree | a618fb12b92a575f50a942746880c65b80f2cf49 /src/game-server/itemmanager.h | |
parent | b6e7feedc82c3c549af0d3cd53be1a981945f42d (diff) | |
download | manaserv-05ad0a28aa4bada4569417c0d292d6960a8af5a2.tar.gz manaserv-05ad0a28aa4bada4569417c0d292d6960a8af5a2.tar.bz2 manaserv-05ad0a28aa4bada4569417c0d292d6960a8af5a2.tar.xz manaserv-05ad0a28aa4bada4569417c0d292d6960a8af5a2.zip |
Allowed item names instead of IDs in @commands
The @drop and @item commands can now accept an item name instead of an
item ID. In addition the amount can be omitted to create a single item.
Diffstat (limited to 'src/game-server/itemmanager.h')
-rw-r--r-- | src/game-server/itemmanager.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game-server/itemmanager.h b/src/game-server/itemmanager.h index ea0641c7..00739785 100644 --- a/src/game-server/itemmanager.h +++ b/src/game-server/itemmanager.h @@ -55,6 +55,14 @@ class ItemManager ItemClass *getItem(int itemId) const; /** + * Gets the first item type with a specific name. + * (comparison is case-insensitive). + * Returns null when there is no item with such + * a name. + */ + ItemClass *getItemByName(std::string name) const; + + /** * Gets the version of the loaded item database. */ unsigned int getDatabaseVersion() const; |