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:
Shauren
2020-05-24 22:34:25 +02:00
parent ebb6f12db8
commit eba31dea27
12 changed files with 187 additions and 152 deletions

View File

@@ -144,7 +144,7 @@ void WorldSession::HandleQueryCorpseLocation(WorldPackets::Query::QueryCorpseLoc
if (corpseMapEntry->IsDungeon() && corpseMapEntry->CorpseMapID >= 0)
{
// if corpse map have entrance
if (Map const* entranceMap = sMapMgr->CreateBaseMap(corpseMapEntry->CorpseMapID))
if (Map* entranceMap = sMapMgr->CreateBaseMap(corpseMapEntry->CorpseMapID))
{
mapID = corpseMapEntry->CorpseMapID;
x = corpseMapEntry->Corpse.X;