summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-06 22:02:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-06 22:02:03 +0300
commita55ff67c4595d4a18fc36ffed90cbde3797498a3 (patch)
treec406aa1c95f9559bf331a3c872d5d4e5d1209b4d
parent463d5c603ea95f478dff4b12fbca3c7dd05cc8b9 (diff)
downloadmanaplus-a55ff67c4595d4a18fc36ffed90cbde3797498a3.tar.gz
manaplus-a55ff67c4595d4a18fc36ffed90cbde3797498a3.tar.bz2
manaplus-a55ff67c4595d4a18fc36ffed90cbde3797498a3.tar.xz
manaplus-a55ff67c4595d4a18fc36ffed90cbde3797498a3.zip
fix loading monsters with id 0.
-rw-r--r--src/resources/db/monsterdb.cpp8
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];