diff options
author | Philipp Sehmisch <mana@crushnet.org> | 2011-03-15 20:27:33 +0100 |
---|---|---|
committer | Philipp Sehmisch <mana@crushnet.org> | 2011-03-16 08:36:52 +0100 |
commit | b6e7feedc82c3c549af0d3cd53be1a981945f42d (patch) | |
tree | 5890776fa8f1c70e7d94ac1e1fed6c554f269371 /src/game-server/monstermanager.h | |
parent | 24f2b307f089558276d1d526f1288d229af11678 (diff) | |
download | manaserv-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.h | 8 |
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; |