summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-07 17:00:59 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-07 17:00:59 +0300
commitcce1a905f8d798eb689956395daf6161f034ae6f (patch)
treeed8b9cce39c084c4d6506afa18abf85bacdbc8d6 /src
parentf6bd1332857b003d258fce4f12a14540208bea2c (diff)
downloadmanaverse-cce1a905f8d798eb689956395daf6161f034ae6f.tar.gz
manaverse-cce1a905f8d798eb689956395daf6161f034ae6f.tar.bz2
manaverse-cce1a905f8d798eb689956395daf6161f034ae6f.tar.xz
manaverse-cce1a905f8d798eb689956395daf6161f034ae6f.zip
fix deaddb loading.
Diffstat (limited to 'src')
-rw-r--r--src/resources/db/deaddb.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/db/deaddb.cpp b/src/resources/db/deaddb.cpp
index 078813583..870b77394 100644
--- a/src/resources/db/deaddb.cpp
+++ b/src/resources/db/deaddb.cpp
@@ -37,16 +37,17 @@ namespace
void DeadDB::load()
{
+ if (mLoaded)
+ unload();
+
loadXmlFile(paths.getStringValue("deadMessagesFile"));
loadXmlFile(paths.getStringValue("deadMessagesPatchFile"));
loadXmlDir("deadMessagesPatchDir", loadXmlFile);
+ mLoaded = true;
}
void DeadDB::loadXmlFile(const std::string &fileName)
{
- if (mLoaded)
- unload();
-
XML::Document *doc = new XML::Document(fileName);
const XmlNodePtr root = doc->rootNode();
@@ -78,7 +79,6 @@ void DeadDB::loadXmlFile(const std::string &fileName)
}
delete doc;
- mLoaded = true;
}
void DeadDB::unload()