summaryrefslogtreecommitdiff
path: root/src/resources/itemdb.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/itemdb.cpp
parent61e3fa8513c1bc2644348ac6052ab87785fb119d (diff)
downloadmanaplus-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/itemdb.cpp')
-rw-r--r--src/resources/itemdb.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index 4643b5d76..cce475ae1 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -176,7 +176,7 @@ void ItemDB::load()
mUnknown->setSprite(errFile, GENDER_FEMALE, 0);
mUnknown->setSprite(errFile, GENDER_OTHER, 0);
mUnknown->addTag(mTags["All"]);
- loadXmlFile("items.xml", tagNum);
+ loadXmlFile(paths.getStringValue("itemsFile"), tagNum);
}
void ItemDB::loadXmlFile(const std::string &fileName, int &tagNum)
@@ -186,7 +186,7 @@ void ItemDB::loadXmlFile(const std::string &fileName, int &tagNum)
if (!rootNode || !xmlNameEqual(rootNode, "items"))
{
- logger->log("ItemDB: Error while loading items.xml!");
+ logger->log("ItemDB: Error while loading %s!", fileName.c_str());
mLoaded = true;
return;
}
@@ -207,7 +207,8 @@ void ItemDB::loadXmlFile(const std::string &fileName, int &tagNum)
if (id == 0)
{
- logger->log1("ItemDB: Invalid or missing item ID in items.xml!");
+ logger->log("ItemDB: Invalid or missing item ID in %s!",
+ fileName.c_str());
continue;
}
else if (mItemInfos.find(id) != mItemInfos.end())