diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-06 22:02:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-06 22:02:03 +0300 |
commit | a55ff67c4595d4a18fc36ffed90cbde3797498a3 (patch) | |
tree | c406aa1c95f9559bf331a3c872d5d4e5d1209b4d /src/resources/db | |
parent | 463d5c603ea95f478dff4b12fbca3c7dd05cc8b9 (diff) | |
download | plus-a55ff67c4595d4a18fc36ffed90cbde3797498a3.tar.gz plus-a55ff67c4595d4a18fc36ffed90cbde3797498a3.tar.bz2 plus-a55ff67c4595d4a18fc36ffed90cbde3797498a3.tar.xz plus-a55ff67c4595d4a18fc36ffed90cbde3797498a3.zip |
fix loading monsters with id 0.
Diffstat (limited to 'src/resources/db')
-rw-r--r-- | src/resources/db/monsterdb.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/resources/db/monsterdb.cpp b/src/resources/db/monsterdb.cpp index ee6ec3a22..1fc767a2b 100644 --- a/src/resources/db/monsterdb.cpp +++ b/src/resources/db/monsterdb.cpp @@ -92,13 +92,7 @@ void MonsterDB::loadXmlFile(const std::string &fileName) const int id = XML::getProperty(monsterNode, "id", 0); BeingInfo *currentInfo = nullptr; - if (id == 0) - { - logger->log("MonsterDB: monster with missing ID in %s!", - fileName.c_str()); - continue; - } - else if (mMonsterInfos.find(id + offset) != mMonsterInfos.end()) + if (mMonsterInfos.find(id + offset) != mMonsterInfos.end()) { logger->log("MonsterDB: Redefinition of monster ID %d", id); currentInfo = mMonsterInfos[id + offset]; |