summaryrefslogtreecommitdiff
path: root/src/game-server/attributemanager.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/attributemanager.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/attributemanager.cpp')
-rw-r--r--src/game-server/attributemanager.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/game-server/attributemanager.cpp b/src/game-server/attributemanager.cpp
index 6cbdae9f..31566bed 100644
--- a/src/game-server/attributemanager.cpp
+++ b/src/game-server/attributemanager.cpp
@@ -21,7 +21,6 @@
#include "game-server/attributemanager.h"
#include "common/defines.h"
-#include "common/resourcemanager.h"
#include "utils/string.h"
#include "utils/logger.h"
@@ -112,16 +111,9 @@ const std::string *AttributeManager::getTag(const ModifierLocation &location) co
void AttributeManager::readAttributesFile()
{
- std::string absPathFile = ResourceManager::resolve(mAttributeReferenceFile);
- if (absPathFile.empty())
- {
- LOG_FATAL("Attribute Manager: Could not find "
- << mAttributeReferenceFile << "!");
- exit(EXIT_XML_NOT_FOUND);
- }
-
- XML::Document doc(absPathFile, false);
+ XML::Document doc(mAttributeReferenceFile);
xmlNodePtr node = doc.rootNode();
+
if (!node || !xmlStrEqual(node->name, BAD_CAST "attributes"))
{
LOG_FATAL("Attribute Manager: " << mAttributeReferenceFile