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/petdb.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/petdb.cpp')
-rw-r--r-- | src/resources/petdb.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/resources/petdb.cpp b/src/resources/petdb.cpp index 055779d9d..806e20e72 100644 --- a/src/resources/petdb.cpp +++ b/src/resources/petdb.cpp @@ -46,12 +46,13 @@ void PETDB::load() logger->log1("Initializing PET database..."); - XML::Document doc("pets.xml"); + XML::Document doc(paths.getStringValue("petsFile")); const XmlNodePtr rootNode = doc.rootNode(); if (!rootNode || !xmlNameEqual(rootNode, "pets")) { - logger->log1("PET Database: Error while loading pets.xml!"); + logger->log("PET Database: Error while loading %s!", + paths.getStringValue("petsFile").c_str()); mLoaded = true; return; } @@ -65,7 +66,8 @@ void PETDB::load() const int id = XML::getProperty(petNode, "id", 0); if (id == 0) { - logger->log1("PET Database: PET with missing ID in pets.xml!"); + logger->log("PET Database: PET with missing ID in %s!", + paths.getStringValue("petsFile").c_str()); continue; } |