diff options
Diffstat (limited to 'src/resources/monsterdb.cpp')
-rw-r--r-- | src/resources/monsterdb.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp index 13f3a7ee..b1965989 100644 --- a/src/resources/monsterdb.cpp +++ b/src/resources/monsterdb.cpp @@ -44,14 +44,14 @@ void MonsterDB::load() mUnknown.addSprite("error.xml"); mUnknown.setName(_("unnamed")); - logger->log(_("Initializing monster database...")); + logger->log("Initializing monster database..."); XML::Document doc(_("monsters.xml")); xmlNodePtr rootNode = doc.rootNode(); if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "monsters")) { - logger->error(_("Monster Database: Error while loading monster.xml!")); + logger->error("Monster Database: Error while loading monster.xml!"); } //iterate <monster>s @@ -64,7 +64,7 @@ void MonsterDB::load() MonsterInfo *currentInfo = new MonsterInfo(); - currentInfo->setName (XML::getProperty(monsterNode, "name", "unnamed")); + currentInfo->setName(XML::getProperty(monsterNode, "name", _("unnamed"))); std::string targetCursor; targetCursor = XML::getProperty(monsterNode, "targetCursor", "medium"); @@ -82,7 +82,8 @@ void MonsterDB::load() } else { - logger->log(_("MonsterDB: Unknown target cursor type \"%s\" for %s - using medium sized one"), + logger->log("MonsterDB: Unknown target cursor type \"%s\" for %s -" + "using medium sized one", targetCursor.c_str(), currentInfo->getName().c_str()); currentInfo->setTargetCursorSize(Being::TC_MEDIUM); } @@ -92,7 +93,8 @@ void MonsterDB::load() { if (xmlStrEqual(spriteNode->name, BAD_CAST "sprite")) { - currentInfo->addSprite((const char*) spriteNode->xmlChildrenNode->content); + currentInfo->addSprite( + (const char*) spriteNode->xmlChildrenNode->content); } if (xmlStrEqual(spriteNode->name, BAD_CAST "sound")) @@ -119,14 +121,17 @@ void MonsterDB::load() } else { - logger->log(_("MonsterDB: Warning, sound effect %s for unknown event %s of monster %s"), - filename, event.c_str(), currentInfo->getName().c_str()); + logger->log("MonsterDB: Warning, sound effect %s for " + "unknown event %s of monster %s", + filename, event.c_str(), + currentInfo->getName().c_str()); } } if (xmlStrEqual(spriteNode->name, BAD_CAST "attack")) { - std::string event = XML::getProperty(spriteNode, "particle-effect", ""); + std::string event = XML::getProperty( + spriteNode, "particle-effect", ""); currentInfo->addAttackParticleEffect(event); } @@ -157,7 +162,7 @@ const MonsterInfo &MonsterDB::get(int id) if (i == mMonsterInfos.end()) { - logger->log(_("MonsterDB: Warning, unknown monster ID %d requested"), id); + logger->log("MonsterDB: Warning, unknown monster ID %d requested", id); return mUnknown; } else |