summaryrefslogtreecommitdiff
path: root/src/game-server/mapreader.cpp
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2009-07-20 17:46:18 -0400
committerChuck Miller <shadowmil@gmail.com>2009-07-20 17:46:18 -0400
commit575282d29ac181c990dc76de48c68d86ebd64efe (patch)
tree71430be3751dc84dbf5681f668099efec09cbcb6 /src/game-server/mapreader.cpp
parent5c3f23831986dda46d1c41b8316dd901f1bf3164 (diff)
downloadmanaserv-575282d29ac181c990dc76de48c68d86ebd64efe.tar.gz
manaserv-575282d29ac181c990dc76de48c68d86ebd64efe.tar.bz2
manaserv-575282d29ac181c990dc76de48c68d86ebd64efe.tar.xz
manaserv-575282d29ac181c990dc76de48c68d86ebd64efe.zip
Have the game server reconnect with the account-server if account-server is restarted
Diffstat (limited to 'src/game-server/mapreader.cpp')
-rw-r--r--src/game-server/mapreader.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game-server/mapreader.cpp b/src/game-server/mapreader.cpp
index fdf8e997..a1183cae 100644
--- a/src/game-server/mapreader.cpp
+++ b/src/game-server/mapreader.cpp
@@ -40,7 +40,8 @@
static std::vector< int > tilesetFirstGids;
-void MapReader::readMap(const std::string &filename, MapComposite *composite)
+bool MapReader::readMap(const std::string &filename, MapComposite
+*composite)
{
int fileSize;
char *buffer = ResourceManager::loadFile(filename, fileSize);
@@ -48,7 +49,7 @@ void MapReader::readMap(const std::string &filename, MapComposite *composite)
if (buffer == NULL)
{
LOG_ERROR("Error: Map file not found (" << filename.c_str() << ")");
- return;
+ return false;
}
xmlDocPtr doc = NULL;
@@ -75,7 +76,7 @@ void MapReader::readMap(const std::string &filename, MapComposite *composite)
if (!doc)
{
LOG_ERROR("Error while parsing map file '" << filename << "'!");
- return;
+ return false;
}
Map *map = NULL;
@@ -112,6 +113,7 @@ void MapReader::readMap(const std::string &filename, MapComposite *composite)
s->execute();
}
}
+ return true;
}
Map* MapReader::readMap(xmlNodePtr node, const std::string &path,