summaryrefslogtreecommitdiff
path: root/src/game-server/monstermanager.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-09-17 22:18:59 +0200
committerPhilipp Sehmisch <crush@themanaworld.org>2009-09-17 22:18:59 +0200
commit5ae62661c90389d6456e5be75d240fb95b68b2cb (patch)
tree5bc079a53df86dc308ce0e7d439ba0c4fa8b1eb4 /src/game-server/monstermanager.cpp
parent1702f4fe35a59d6fbeb6864902da168e2138a592 (diff)
downloadmanaserv-5ae62661c90389d6456e5be75d240fb95b68b2cb.tar.gz
manaserv-5ae62661c90389d6456e5be75d240fb95b68b2cb.tar.bz2
manaserv-5ae62661c90389d6456e5be75d240fb95b68b2cb.tar.xz
manaserv-5ae62661c90389d6456e5be75d240fb95b68b2cb.zip
Added the possibility to define a monster script for a whole monster class in monsters.xml
Diffstat (limited to 'src/game-server/monstermanager.cpp')
-rw-r--r--src/game-server/monstermanager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game-server/monstermanager.cpp b/src/game-server/monstermanager.cpp
index 426a2249..080dcbfc 100644
--- a/src/game-server/monstermanager.cpp
+++ b/src/game-server/monstermanager.cpp
@@ -259,6 +259,12 @@ void MonsterManager::reload()
}
}
+ else if (xmlStrEqual(subnode->name, BAD_CAST "script"))
+ {
+ xmlChar *filename = subnode->xmlChildrenNode->content;
+ std::string val = (char *)filename;
+ monster->setScript(val);
+ }
}
monster->setDrops(drops);