summaryrefslogtreecommitdiff
path: root/src/resources/colordb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/colordb.cpp')
-rw-r--r--src/resources/colordb.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/resources/colordb.cpp b/src/resources/colordb.cpp
index ef7706cab..a71e8c639 100644
--- a/src/resources/colordb.cpp
+++ b/src/resources/colordb.cpp
@@ -22,6 +22,7 @@
#include "resources/colordb.h"
#include "client.h"
+#include "configuration.h"
#include "logger.h"
#include "utils/xml.h"
@@ -60,18 +61,20 @@ void ColorDB::loadHair()
if (it != mColorLists.end())
colors = it->second;
- XML::Document *doc = new XML::Document("hair.xml");
+ XML::Document *doc = new XML::Document(
+ paths.getStringValue("hairColorFile"));
XmlNodePtr root = doc->rootNode();
bool hairXml = true;
if (!root || !xmlNameEqual(root, "colors"))
{
- logger->log1("Trying to fall back on colors.xml");
+ logger->log("Trying to fall back on "
+ + paths.getStringValue("hairColorFile2"));
hairXml = false;
delete doc;
- doc = new XML::Document("colors.xml");
+ doc = new XML::Document(paths.getStringValue("hairColorFile2"));
root = doc->rootNode();
if (!root || !xmlNameEqual(root, "colors"))
@@ -108,7 +111,8 @@ void ColorDB::loadHair()
void ColorDB::loadColorLists()
{
- XML::Document *doc = new XML::Document("itemcolors.xml");
+ XML::Document *doc = new XML::Document(
+ paths.getStringValue("itemColorsFile"));
const XmlNodePtr root = doc->rootNode();
if (!root)
{