summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()