diff options
author | Ira Rice <irarice@gmail.com> | 2009-01-15 11:06:32 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-15 11:06:32 -0700 |
commit | 10a9dbacd9334caede10f1b21d42cdf7e1efcd03 (patch) | |
tree | def2baead68de5a9ccc842e25b3cdcfe9a638c9b /src/resources/npcdb.cpp | |
parent | e7f4e78f76972ca3882b9d2763ae9cab31675d3a (diff) | |
download | mana-client-10a9dbacd9334caede10f1b21d42cdf7e1efcd03.tar.gz mana-client-10a9dbacd9334caede10f1b21d42cdf7e1efcd03.tar.bz2 mana-client-10a9dbacd9334caede10f1b21d42cdf7e1efcd03.tar.xz mana-client-10a9dbacd9334caede10f1b21d42cdf7e1efcd03.zip |
Style cleanups throughout most of the code. Splitting function type from
the function names should no longer be around.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/resources/npcdb.cpp')
-rw-r--r-- | src/resources/npcdb.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/resources/npcdb.cpp b/src/resources/npcdb.cpp index 3ae58067..bfa22214 100644 --- a/src/resources/npcdb.cpp +++ b/src/resources/npcdb.cpp @@ -25,6 +25,7 @@ #include "../log.h" #include "../utils/dtor.h" +#include "../utils/gettext.h" #include "../utils/xml.h" namespace @@ -44,14 +45,14 @@ void NPCDB::load() unknownSprite->variant = 0; mUnknown.sprites.push_back(unknownSprite); - logger->log("Initializing NPC database..."); + logger->log(_("Initializing NPC database...")); XML::Document doc("npcs.xml"); xmlNodePtr rootNode = doc.rootNode(); if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "npcs")) { - logger->error("NPC Database: Error while loading items.xml!"); + logger->error(_("NPC Database: Error while loading npcs.xml!")); } //iterate <monster>s @@ -63,7 +64,7 @@ void NPCDB::load() int id = XML::getProperty(npcNode, "id", 0); if (id == 0) { - logger->log("NPC Database: NPC with missing ID in npcs.xml!"); + logger->log(_("NPC Database: NPC with missing ID in npcs.xml!")); continue; } @@ -90,8 +91,7 @@ void NPCDB::load() mLoaded = true; } -void -NPCDB::unload() +void NPCDB::unload() { for ( NPCInfosIterator i = mNPCInfos.begin(); i != mNPCInfos.end(); @@ -116,14 +116,13 @@ NPCDB::unload() mLoaded = false; } -const NPCInfo& -NPCDB::get(int id) +const NPCInfo& NPCDB::get(int id) { NPCInfosIterator i = mNPCInfos.find(id); if (i == mNPCInfos.end()) { - logger->log("NPCDB: Warning, unknown NPC ID %d requested", id); + logger->log(_("NPCDB: Warning, unknown NPC ID %d requested"), id); return mUnknown; } else |