Core/MMaps: MMaps are now correctly loaded into TC

P.S: They do behave better in some places, but are still a bit weird in some others, will have to look into that.
P.P.S: I'll have to re-implement all the previous PathGenerator code
This commit is contained in:
Sebastian Valle committed 2013-10-04 22:23:17 -05:00
1 parent e62f64b591
commit a27237dedd
10 files changed
+129 -777

No files matched your search

+5 -1
View File
@@ -121,7 +121,11 @@ bool Map::ExistVMap(uint32 mapid, int gx, int gy)
void Map::LoadMMap(int gx, int gy)
{
bool mmapLoadResult = MMAP::MMapFactory::CreateOrGetMMapManager()->LoadMapTile(GetId(), gx, gy);
bool mmapLoadResult = false;
if (GetEntry()->Instanceable())
mmapLoadResult = MMAP::MMapFactory::CreateOrGetMMapManager()->LoadMapTile(GetId(), 0, 0); // Ignore the tile entry for instances, as they only have 1 tile.
else
mmapLoadResult = MMAP::MMapFactory::CreateOrGetMMapManager()->LoadMapTile(GetId(), gx, gy);
if (mmapLoadResult)
TC_LOG_INFO(LOG_FILTER_MAPS, "MMAP loaded name: %s, id: %d, x: %d, y: %d", GetMapName(), GetId(), gx, gy);