diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2011-03-18 00:50:15 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2011-03-20 15:08:47 +0100 |
commit | e503901c3a7cc07b409ed8bc3209908f0091652d (patch) | |
tree | dae97a15e50c43c9e0f493a116a270b6140400e9 /src/game-server | |
parent | 9d6a1f4c881d8a77d7bde3244a6543b0cbe31718 (diff) | |
download | manaserv-e503901c3a7cc07b409ed8bc3209908f0091652d.tar.gz manaserv-e503901c3a7cc07b409ed8bc3209908f0091652d.tar.bz2 manaserv-e503901c3a7cc07b409ed8bc3209908f0091652d.tar.xz manaserv-e503901c3a7cc07b409ed8bc3209908f0091652d.zip |
General cleanups and code style fixes
A bunch of variables that were continuously requested from the
configuration are now members of the AccountHandler.
Reviewed-by: Freeyorp
Diffstat (limited to 'src/game-server')
-rw-r--r-- | src/game-server/attributemanager.cpp | 12 | ||||
-rw-r--r-- | src/game-server/itemmanager.cpp | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/game-server/attributemanager.cpp b/src/game-server/attributemanager.cpp index d6cdeae1..50cced31 100644 --- a/src/game-server/attributemanager.cpp +++ b/src/game-server/attributemanager.cpp @@ -46,7 +46,7 @@ void AttributeManager::reload() exit(EXIT_XML_NOT_FOUND); } - XML::Document doc(absPathFile, int()); + XML::Document doc(absPathFile, false); xmlNodePtr node = doc.rootNode(); if (!node || !xmlStrEqual(node->name, BAD_CAST "attributes")) { @@ -209,8 +209,8 @@ void AttributeManager::reload() LOG_INFO("Loaded '" << mAttributeMap.size() << "' attributes with '" << count << "' modifier layers."); - for(TagMap::const_iterator i = mTagMap.begin(), i_end = mTagMap.end(); - i != i_end; ++i) + for (TagMap::const_iterator i = mTagMap.begin(), i_end = mTagMap.end(); + i != i_end; ++i) { LOG_DEBUG("Tag '" << i->first << "': '" << i->second.first << "', '" << i->second.second << "'."); @@ -222,7 +222,8 @@ void AttributeManager::reload() const std::vector<struct AttributeInfoType> *AttributeManager::getAttributeInfo(unsigned int id) const { AttributeMap::const_iterator ret = mAttributeMap.find(id); - if (ret == mAttributeMap.end()) return 0; + if (ret == mAttributeMap.end()) + return 0; return &ret->second.second; } @@ -234,7 +235,8 @@ const AttributeScopes &AttributeManager::getAttributeInfoForType(SCOPE_TYPES typ bool AttributeManager::isAttributeDirectlyModifiable(unsigned int id) const { AttributeMap::const_iterator ret = mAttributeMap.find(id); - if (ret == mAttributeMap.end()) return false; + if (ret == mAttributeMap.end()) + return false; return ret->second.first; } diff --git a/src/game-server/itemmanager.cpp b/src/game-server/itemmanager.cpp index 0fe464ee..6549618b 100644 --- a/src/game-server/itemmanager.cpp +++ b/src/game-server/itemmanager.cpp @@ -55,7 +55,7 @@ void ItemManager::reload() return; } - XML::Document doc(absPathFile, int()); + XML::Document doc(absPathFile, false); rootNode = doc.rootNode(); if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "equip-slots")) @@ -109,7 +109,7 @@ void ItemManager::reload() return; } - XML::Document doc2(absPathFile, int()); + XML::Document doc2(absPathFile, false); rootNode = doc2.rootNode(); if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "items")) |