diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2008-02-06 22:15:39 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2008-02-06 22:15:39 +0000 |
commit | d4ad5de48f7f1e2a84bccd68b2584ce78fed05a4 (patch) | |
tree | 488cee232ba62465fb200814bca1514e97fa9667 /src/game-server/monstermanager.cpp | |
parent | 402484c66f2cb4036e1af4bbda6345d8d79ecb41 (diff) | |
download | manaserv-d4ad5de48f7f1e2a84bccd68b2584ce78fed05a4.tar.gz manaserv-d4ad5de48f7f1e2a84bccd68b2584ce78fed05a4.tar.bz2 manaserv-d4ad5de48f7f1e2a84bccd68b2584ce78fed05a4.tar.xz manaserv-d4ad5de48f7f1e2a84bccd68b2584ce78fed05a4.zip |
Exp reward for killing monsters is now read from monster database.
Diffstat (limited to 'src/game-server/monstermanager.cpp')
-rw-r--r-- | src/game-server/monstermanager.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game-server/monstermanager.cpp b/src/game-server/monstermanager.cpp index 58c146c3..f613969d 100644 --- a/src/game-server/monstermanager.cpp +++ b/src/game-server/monstermanager.cpp @@ -154,12 +154,23 @@ void MonsterManager::reload() if (!attributesComplete) LOG_WARN(monsterReferenceFile <<": Attributes incomplete for monster #"<<id); } + else if (xmlStrEqual(subnode->name, BAD_CAST "exp")) + { + xmlChar *exp = subnode->xmlChildrenNode->content; + monster->setExp(atoi((const char*)exp)); + } } monster->setDrops(drops); if (!attributesSet) LOG_WARN(monsterReferenceFile <<": No attributes defined for monster #" <<id); + if (monster->getExp() == -1) + { + LOG_WARN(monsterReferenceFile + <<": No experience defined for monster #"<<id); + monster->setExp(0); + } ++nbMonsters; } |