summaryrefslogtreecommitdiffstats
path: root/src/game-server/mapmanager.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-01-05 20:12:51 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-01-05 20:12:51 +0000
commit593e65eef0d43f2ff61dc1b4f3160c0a16b5f015 (patch)
tree8e0a1ca0c73778f0e4d71f4da4d5c47f272915b9 /src/game-server/mapmanager.cpp
parentf96ca90ba90da3175be96ff7ed34efb78ea5dfed (diff)
downloadmanaserv-593e65eef0d43f2ff61dc1b4f3160c0a16b5f015.tar.gz
manaserv-593e65eef0d43f2ff61dc1b4f3160c0a16b5f015.tar.xz
manaserv-593e65eef0d43f2ff61dc1b4f3160c0a16b5f015.zip
Simplified handling of verbosity levels. Optimized code by generating only needed messages.
Diffstat (limited to 'src/game-server/mapmanager.cpp')
-rw-r--r--src/game-server/mapmanager.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game-server/mapmanager.cpp b/src/game-server/mapmanager.cpp
index accf7ca..1bceb8e 100644
--- a/src/game-server/mapmanager.cpp
+++ b/src/game-server/mapmanager.cpp
@@ -37,7 +37,7 @@ MapManager::MapManager(std::string const &mapReferenceFile)
char *data = (char *)resman->loadFile(mapReferenceFile, size);
if (!data) {
- LOG_ERROR("Map Manager: Could not find " << mapReferenceFile << "!", 0);
+ LOG_ERROR("Map Manager: Could not find " << mapReferenceFile << "!");
free(data);
return;
}
@@ -48,7 +48,7 @@ MapManager::MapManager(std::string const &mapReferenceFile)
if (!doc)
{
LOG_ERROR("Map Manager: Error while parsing map database ("
- << mapReferenceFile << ")!", 0);
+ << mapReferenceFile << ")!");
return;
}
@@ -56,12 +56,12 @@ MapManager::MapManager(std::string const &mapReferenceFile)
if (!node || !xmlStrEqual(node->name, BAD_CAST "maps"))
{
LOG_ERROR("Map Manager: " << mapReferenceFile
- << " is not a valid database file!", 0);
+ << " is not a valid database file!");
xmlFreeDoc(doc);
return;
}
- LOG_INFO("Loading map reference...", 0);
+ LOG_INFO("Loading map reference...");
for (node = node->xmlChildrenNode; node != NULL; node = node->next)
{
if (!xmlStrEqual(node->name, BAD_CAST "map")) {
@@ -99,10 +99,10 @@ Map *MapManager::getMap(int mapId)
map = MapReader::readMap("maps/" + file);
if (!map)
{
- LOG_ERROR("Unable to load map \"" << file << "\" (id " << mapId << ")", 0);
+ LOG_ERROR("Unable to load map \"" << file << "\" (id " << mapId << ")");
return NULL;
}
- LOG_INFO("Loaded map \"" << file << "\" (id " << mapId << ")", 0);
+ LOG_INFO("Loaded map \"" << file << "\" (id " << mapId << ")");
}
return map;
}
@@ -119,7 +119,7 @@ void MapManager::raiseActive(int mapId)
Maps::iterator i = maps.find(mapId);
assert(i != maps.end());
i->second.isActive = true;
- LOG_INFO("Activating map \"" << i->second.fileName << "\" (id " << i->first << ")", 0);
+ LOG_INFO("Activating map \"" << i->second.fileName << "\" (id " << i->first << ")");
}
bool MapManager::isActive(int mapId) const