diff options
author | Ira Rice <irarice@gmail.com> | 2008-11-12 18:52:35 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-11-12 18:52:35 +0000 |
commit | 0436733dc9e412b12272fa7332831c9185c3d19b (patch) | |
tree | bdcfe187006b75e7f19038cd0fb0fd4eae6d4473 | |
parent | 2f01bff208bec2c2d5ffdb98b35b9398b88092a3 (diff) | |
download | mana-0436733dc9e412b12272fa7332831c9185c3d19b.tar.gz mana-0436733dc9e412b12272fa7332831c9185c3d19b.tar.bz2 mana-0436733dc9e412b12272fa7332831c9185c3d19b.tar.xz mana-0436733dc9e412b12272fa7332831c9185c3d19b.zip |
Applied a fix that fixes TMW loading.
-rw-r--r-- | src/resources/colordb.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/resources/colordb.cpp b/src/resources/colordb.cpp index d654762c..2340a8f2 100644 --- a/src/resources/colordb.cpp +++ b/src/resources/colordb.cpp @@ -47,19 +47,20 @@ void ColorDB::load() } XML::Document doc(HAIR_COLOR_FILE); + XML::Document doc2(TMW_COLOR_FILE); xmlNodePtr root = doc.rootNode(); bool TMWHair = false; if (!root || !xmlStrEqual(root->name, BAD_CAST "colors")) { - logger->log("Error loading Aethyra's color, %s, trying TMW's color file, %s.", - HAIR_COLOR_FILE, TMW_COLOR_FILE); + logger->log("Trying TMW's color file, %s.", TMW_COLOR_FILE); TMWHair = true; - XML::Document doc(TMW_COLOR_FILE); - root = doc.rootNode(); + root = doc2.rootNode(); if (!root || !xmlStrEqual(root->name, BAD_CAST "colors")) { + logger->log("ColorDB: Failed"); + mColors[0] = mFail; mLoaded = true; return; } @@ -75,8 +76,10 @@ void ColorDB::load() logger->log("ColorDB: Redefinition of dye ID %d", id); } - TMWHair ? mColors[id] = XML::getProperty(node, "value", "") : - mColors[id] = XML::getProperty(node, "dye", ""); + TMWHair ? mColors[id] = XML::getProperty(node, "value", "#FFFFFF") : + mColors[id] = XML::getProperty(node, "dye", "#FFFFFF"); + + logger->log("%d %s", id, mColors[id].c_str()); } } |