Core/Maps: Improvements to terrain swap handling
* Fixed memory leak when unloading grids * Handle child maps being entered * Allow chaining more child maps (Draenor -> Tanaan Jungle -> Tanaan Jungle - No Hubs Phase)
This commit is contained in:
1 parent
8adca7637b
commit
40f80fc0ed
13 files changed
+185
-159
No files matched your search
@@ -242,7 +242,7 @@ public:
|
||||
else
|
||||
player->SaveRecallPosition();
|
||||
|
||||
Map const* map = sMapMgr->CreateBaseMap(mapId);
|
||||
Map* map = sMapMgr->CreateBaseMap(mapId);
|
||||
float z = std::max(map->GetHeight(PhasingHandler::GetEmptyPhaseShift(), x, y, MAX_HEIGHT), map->GetWaterLevel(PhasingHandler::GetEmptyPhaseShift(), x, y));
|
||||
|
||||
player->TeleportTo(mapId, x, y, z, player->GetOrientation());
|
||||
@@ -314,7 +314,7 @@ public:
|
||||
AreaTableEntry const* zoneEntry = areaEntry->ParentAreaID ? sAreaTableStore.LookupEntry(areaEntry->ParentAreaID) : areaEntry;
|
||||
ASSERT(zoneEntry);
|
||||
|
||||
Map const* map = sMapMgr->CreateBaseMap(zoneEntry->ContinentID);
|
||||
Map* map = sMapMgr->CreateBaseMap(zoneEntry->ContinentID);
|
||||
|
||||
if (map->Instanceable())
|
||||
{
|
||||
@@ -371,7 +371,7 @@ public:
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
Map const* map = sMapMgr->CreateBaseMap(mapId);
|
||||
Map* map = sMapMgr->CreateBaseMap(mapId);
|
||||
z = std::max(map->GetHeight(PhasingHandler::GetEmptyPhaseShift(), x, y, MAX_HEIGHT), map->GetWaterLevel(PhasingHandler::GetEmptyPhaseShift(), x, y));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user