summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-06 15:14:57 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-06 15:14:57 +0300
commit17919a843d9b20595651b712e664a6d796b59898 (patch)
tree9ca30c809df6826befb1c795684c108dd411ff69 /src
parent9c83e992d7f7b0a53e102df6265066fc25141dfa (diff)
downloadmanaverse-17919a843d9b20595651b712e664a6d796b59898.tar.gz
manaverse-17919a843d9b20595651b712e664a6d796b59898.tar.bz2
manaverse-17919a843d9b20595651b712e664a6d796b59898.tar.xz
manaverse-17919a843d9b20595651b712e664a6d796b59898.zip
delete legacy config file loading (colors.xml).
For now always loaded only hair.xml.
Diffstat (limited to 'src')
-rw-r--r--src/defaults.cpp1
-rw-r--r--src/resources/db/colordb.cpp25
2 files changed, 5 insertions, 21 deletions
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 5e55ff98b..89ecae779 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -484,7 +484,6 @@ DefaultsData* getPathsDefaults()
AddDEF("equipmentWindowFile", "equipmentwindow.xml");
AddDEF("emotesFile", "emotes.xml");
AddDEF("hairColorFile", "hair.xml");
- AddDEF("hairColorFile2", "colors.xml");
AddDEF("itemColorsFile", "itemcolors.xml");
AddDEF("charCreationFile", "charcreation.xml");
AddDEF("soundsFile", "sounds.xml");
diff --git a/src/resources/db/colordb.cpp b/src/resources/db/colordb.cpp
index 759226e84..e3ab56672 100644
--- a/src/resources/db/colordb.cpp
+++ b/src/resources/db/colordb.cpp
@@ -52,6 +52,7 @@ void ColorDB::load()
mHairColorsSize = static_cast<int>((*it).second.size());
else
mHairColorsSize = 0;
+ mLoaded = true;
}
void ColorDB::loadHair()
@@ -69,25 +70,11 @@ void ColorDB::loadHair()
if (!root || !xmlNameEqual(root, "colors"))
{
- logger->log("Trying to fall back on "
- + paths.getStringValue("hairColorFile2"));
-
- hairXml = false;
-
- delete doc;
- doc = new XML::Document(paths.getStringValue("hairColorFile2"));
- root = doc->rootNode();
-
- if (!root || !xmlNameEqual(root, "colors"))
- {
- logger->log1("ColorDB: Failed to find any color files.");
+ logger->log("ColorDB: Failed to find hair colors file.");
+ if (colors.find(0) == colors.end())
colors[0] = ItemColor(0, "", "");
- mLoaded = true;
-
- delete doc;
-
- return;
- }
+ delete doc;
+ return;
}
for_each_xml_child_node(node, root)
@@ -105,9 +92,7 @@ void ColorDB::loadHair()
}
delete doc;
-
mColorLists["hair"] = colors;
- mLoaded = true;
}
void ColorDB::loadColorLists()