From b6e7feedc82c3c549af0d3cd53be1a981945f42d Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Tue, 15 Mar 2011 20:27:33 +0100 Subject: 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 --- src/game-server/monstermanager.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/game-server/monstermanager.h') 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; -- cgit v1.2.3-70-g09d2