aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.cpp
diff options
context:
space:
mode:
authorSubv <s.v.h21@hotmail.com>2012-09-05 16:05:26 -0500
committerSubv <s.v.h21@hotmail.com>2012-09-05 16:05:26 -0500
commitccdca7774023e7570f17cf15456384b316322420 (patch)
tree12f83e3388776cb47ba6f3938b8baf03c006dfc4 /src/server/game/Maps/Map.cpp
parent593f08609fa474c9aa881898e23e256e6e55c06e (diff)
Core/Mmaps: Fixed unloading mmap tiles, the x and y were swapped. thanks to MaNGOS for original implementation, and thanks to @Chevron for noticing.
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rwxr-xr-xsrc/server/game/Maps/Map.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index af139568ece..7e5a2ebb220 100755
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -123,8 +123,7 @@ bool Map::ExistVMap(uint32 mapid, int gx, int gy)
void Map::LoadMMap(int gx, int gy)
{
- // DONT CHANGE "gy" and "gx" - Its necessary !
- bool mmapLoadResult = MMAP::MMapFactory::createOrGetMMapManager()->loadMap((sWorld->GetDataPath() + "mmaps").c_str(), GetId(), gy, gx);
+ bool mmapLoadResult = MMAP::MMapFactory::createOrGetMMapManager()->loadMap((sWorld->GetDataPath() + "mmaps").c_str(), GetId(), gx, gy);
if (mmapLoadResult)
sLog->outInfo(LOG_FILTER_MAPS, "MMAP loaded name:%s, id:%d, x:%d, y:%d (mmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx, gy, gx, gy);
@@ -1011,7 +1010,6 @@ bool Map::UnloadGrid(NGridType& ngrid, bool unloadAll)
GridMaps[gx][gy]->unloadData();
delete GridMaps[gx][gy];
}
- // x and y are swapped
VMAP::VMapFactory::createOrGetVMapManager()->unloadMap(GetId(), gx, gy);
MMAP::MMapFactory::createOrGetMMapManager()->unloadMap(GetId(), gx, gy);
}