summaryrefslogtreecommitdiff
path: root/src/game-server/statusmanager.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-03-23 22:06:33 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-03-24 19:08:09 +0100
commita3dc6e19b1cb7eec1dcbbcef5d370f4ab55a9ade (patch)
tree91b7bd840756eff88d59617054854d55bb5910d2 /src/game-server/statusmanager.cpp
parent94d97450bc3a52cd90baa696320bd08d91ac301f (diff)
downloadmanaserv-a3dc6e19b1cb7eec1dcbbcef5d370f4ab55a9ade.tar.gz
manaserv-a3dc6e19b1cb7eec1dcbbcef5d370f4ab55a9ade.tar.bz2
manaserv-a3dc6e19b1cb7eec1dcbbcef5d370f4ab55a9ade.tar.xz
manaserv-a3dc6e19b1cb7eec1dcbbcef5d370f4ab55a9ade.zip
Rely more on the functionality in XML::Document
By default XML::Document will use the ResourceManager to resolve the file name you pass to it. There is no point in disabling that functionality only to resolve it manually. Reviewed-by: Jared Adams
Diffstat (limited to 'src/game-server/statusmanager.cpp')
-rw-r--r--src/game-server/statusmanager.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/game-server/statusmanager.cpp b/src/game-server/statusmanager.cpp
index 3d79d892..77519754 100644
--- a/src/game-server/statusmanager.cpp
+++ b/src/game-server/statusmanager.cpp
@@ -42,23 +42,17 @@ void StatusManager::initialize(const std::string &file)
void StatusManager::reload()
{
- std::string absPathFile = ResourceManager::resolve(statusReferenceFile);
- if (absPathFile.empty()) {
- LOG_ERROR("Status Manager: Could not find " << statusReferenceFile << "!");
- return;
- }
-
- XML::Document doc(absPathFile, false);
+ XML::Document doc(statusReferenceFile);
xmlNodePtr rootNode = doc.rootNode();
if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "status-effects"))
{
LOG_ERROR("Status Manager: Error while parsing status database ("
- << absPathFile << ")!");
+ << statusReferenceFile << ")!");
return;
}
- LOG_INFO("Loading status reference: " << absPathFile);
+ LOG_INFO("Loading status reference: " << statusReferenceFile);
for_each_xml_child_node(node, rootNode)
{
if (!xmlStrEqual(node->name, BAD_CAST "status-effect"))