diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-06 15:14:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-06 15:14:57 +0300 |
commit | 17919a843d9b20595651b712e664a6d796b59898 (patch) | |
tree | 9ca30c809df6826befb1c795684c108dd411ff69 /src/resources | |
parent | 9c83e992d7f7b0a53e102df6265066fc25141dfa (diff) | |
download | manaverse-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/resources')
-rw-r--r-- | src/resources/db/colordb.cpp | 25 |
1 files changed, 5 insertions, 20 deletions
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() |