diff options
Diffstat (limited to 'src/resources/settingsmanager.cpp')
-rw-r--r-- | src/resources/settingsmanager.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/resources/settingsmanager.cpp b/src/resources/settingsmanager.cpp index 28c08617..eceedcf4 100644 --- a/src/resources/settingsmanager.cpp +++ b/src/resources/settingsmanager.cpp @@ -68,7 +68,7 @@ namespace SettingsManager loadFile("npcs.xml"); loadFile("emotes.xml"); loadFile("status-effects.xml"); - loadFile("hair.xml"); + loadFile("itemcolors.xml"); loadFile("units.xml"); } @@ -194,6 +194,20 @@ namespace SettingsManager { hairDB.readHairColorNode(childNode, filename); } + else if (xmlStrEqual(childNode->name, BAD_CAST "list")) + { + // todo: consider if we need a "color DB", but in tmwa clientdata + // I only see hair colors in the itemcolors.xml file. + const std::string name = XML::getProperty(childNode, "name", std::string()); + if (name == "hair") + { + for_each_xml_child_node(hairColorNode, childNode) + { + if (xmlStrEqual(hairColorNode->name, BAD_CAST "color")) + hairDB.readHairColorNode(hairColorNode, filename); + } + } + } else if (xmlStrEqual(childNode->name, BAD_CAST "item")) { itemDb->readItemNode(childNode, filename); |