summaryrefslogtreecommitdiff
path: root/src/resources/chardb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-26 15:47:39 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-26 15:47:39 +0300
commit9fe86d302838c62034c0bf6c74d8ca47722bd40b (patch)
tree58aa24b936547f3489788d5afb1045c89d5029fa /src/resources/chardb.cpp
parent61e3fa8513c1bc2644348ac6052ab87785fb119d (diff)
downloadmv-9fe86d302838c62034c0bf6c74d8ca47722bd40b.tar.gz
mv-9fe86d302838c62034c0bf6c74d8ca47722bd40b.tar.bz2
mv-9fe86d302838c62034c0bf6c74d8ca47722bd40b.tar.xz
mv-9fe86d302838c62034c0bf6c74d8ca47722bd40b.zip
dehardcode client data configuration file names.
Now names stored in paths.xml
Diffstat (limited to 'src/resources/chardb.cpp')
-rw-r--r--src/resources/chardb.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/resources/chardb.cpp b/src/resources/chardb.cpp
index 4a9b35dbb..1111177e1 100644
--- a/src/resources/chardb.cpp
+++ b/src/resources/chardb.cpp
@@ -22,6 +22,7 @@
#include "resources/chardb.h"
#include "client.h"
+#include "configuration.h"
#include "logger.h"
#include "debug.h"
@@ -44,13 +45,14 @@ void CharDB::load()
if (mLoaded)
unload();
- XML::Document *doc = new XML::Document("charcreation.xml");
+ XML::Document *doc = new XML::Document(
+ paths.getStringValue("charCreationFile"));
const XmlNodePtr root = doc->rootNode();
if (!root || !xmlNameEqual(root, "chars"))
{
- logger->log1("CharDB: Failed to parse charcreation.xml.");
-
+ logger->log("CharDB: Failed to parse %s.",
+ paths.getStringValue("charCreationFile").c_str());
delete doc;
return;
}