diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-26 15:47:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-26 15:47:39 +0300 |
commit | 9fe86d302838c62034c0bf6c74d8ca47722bd40b (patch) | |
tree | 58aa24b936547f3489788d5afb1045c89d5029fa /src/resources/npcdb.cpp | |
parent | 61e3fa8513c1bc2644348ac6052ab87785fb119d (diff) | |
download | manaplus-9fe86d302838c62034c0bf6c74d8ca47722bd40b.tar.gz manaplus-9fe86d302838c62034c0bf6c74d8ca47722bd40b.tar.bz2 manaplus-9fe86d302838c62034c0bf6c74d8ca47722bd40b.tar.xz manaplus-9fe86d302838c62034c0bf6c74d8ca47722bd40b.zip |
dehardcode client data configuration file names.
Now names stored in paths.xml
Diffstat (limited to 'src/resources/npcdb.cpp')
-rw-r--r-- | src/resources/npcdb.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/resources/npcdb.cpp b/src/resources/npcdb.cpp index 3f110d9d2..7b991e7d8 100644 --- a/src/resources/npcdb.cpp +++ b/src/resources/npcdb.cpp @@ -46,12 +46,13 @@ void NPCDB::load() logger->log1("Initializing NPC database..."); - XML::Document doc("npcs.xml"); + XML::Document doc(paths.getStringValue("npcsFile")); const XmlNodePtr rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "npcs")) { - logger->log1("NPC Database: Error while loading npcs.xml!"); + logger->log("NPC Database: Error while loading %s!", + paths.getStringValue("npcsFile").c_str()); mLoaded = true; return; } @@ -65,7 +66,8 @@ void NPCDB::load() const int id = XML::getProperty(npcNode, "id", 0); if (id == 0) { - logger->log1("NPC Database: NPC with missing ID in npcs.xml!"); + logger->log("NPC Database: NPC with missing ID in %s!", + paths.getStringValue("npcsFile").c_str()); continue; } |