From 7e801595f42be692fcbd8cbfd3cf6652c75e5db6 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 9 May 2015 00:10:56 +0200 Subject: Core/Maps: Restored DataDir functionality accidendally removed earlier --- src/server/game/Maps/Map.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/game') diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index d65682dc6ce..7398da99a06 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -78,7 +78,7 @@ Map::~Map() bool Map::ExistMap(uint32 mapid, int gx, int gy) { - std::string fileName = Trinity::StringFormat("maps/%04u_%02u_%02u.map", mapid, gx, gy); + std::string fileName = Trinity::StringFormat("%smaps/%04u_%02u_%02u.map", sWorld->GetDataPath().c_str(), mapid, gx, gy); bool ret = false; FILE* file = fopen(fileName.c_str(), "rb"); @@ -187,7 +187,7 @@ void Map::LoadMap(int gx, int gy, bool reload) } // map file name - std::string fileName = Trinity::StringFormat("maps/%04u_%02u_%02u.map", GetId(), gx, gy); + std::string fileName = Trinity::StringFormat("%smaps/%04u_%02u_%02u.map", sWorld->GetDataPath().c_str(), GetId(), gx, gy); TC_LOG_DEBUG("maps", "Loading map %s", fileName.c_str()); // loading data GridMaps[gx][gy] = new GridMap(); -- cgit v1.2.3