summaryrefslogtreecommitdiff
path: root/src/game-server/monstermanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/monstermanager.cpp')
-rw-r--r--src/game-server/monstermanager.cpp11
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;
}