summaryrefslogtreecommitdiff
path: root/src/game-server/monstermanager.h
diff options
context:
space:
mode:
authorPhilipp Sehmisch <mana@crushnet.org>2011-03-15 20:27:33 +0100
committerPhilipp Sehmisch <mana@crushnet.org>2011-03-16 08:36:52 +0100
commitb6e7feedc82c3c549af0d3cd53be1a981945f42d (patch)
tree5890776fa8f1c70e7d94ac1e1fed6c554f269371 /src/game-server/monstermanager.h
parent24f2b307f089558276d1d526f1288d229af11678 (diff)
downloadmanaserv-b6e7feedc82c3c549af0d3cd53be1a981945f42d.tar.gz
manaserv-b6e7feedc82c3c549af0d3cd53be1a981945f42d.tar.bz2
manaserv-b6e7feedc82c3c549af0d3cd53be1a981945f42d.tar.xz
manaserv-b6e7feedc82c3c549af0d3cd53be1a981945f42d.zip
Allowed monster names in @spawn command
I rewrote the @spawn command to allow two new things: 1. The monster ID can be replaced with the name of the monster. 2. The amount of monsters can be omitted. In that case a single monster is spawned. Reviewed by: Jaxad and Thorbjorn
Diffstat (limited to 'src/game-server/monstermanager.h')
-rw-r--r--src/game-server/monstermanager.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game-server/monstermanager.h b/src/game-server/monstermanager.h
index 36d11e35..acdb9cad 100644
--- a/src/game-server/monstermanager.h
+++ b/src/game-server/monstermanager.h
@@ -49,6 +49,14 @@ class MonsterManager
*/
MonsterClass *getMonster(int id);
+ /**
+ * Gets the first monster type with a specific name.
+ * (comparison is case-insensitive).
+ * Returns null when there is no monster with such
+ * a name.
+ */
+ MonsterClass *getMonsterByName(std::string name) const;
+
private:
typedef std::map< int, MonsterClass * > MonsterClasses;