fix(Core/Grids): Grid improvements (#20955)
This commit is contained in:
@@ -203,6 +203,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save,
|
||||
|
||||
InstanceMap* map = new InstanceMap(GetId(), InstanceId, difficulty, this);
|
||||
ASSERT(map->IsDungeon());
|
||||
m_InstancedMaps[InstanceId] = map;
|
||||
|
||||
map->LoadRespawnTimes();
|
||||
map->LoadCorpseData();
|
||||
@@ -212,10 +213,11 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save,
|
||||
else
|
||||
map->CreateInstanceScript(false, "", 0);
|
||||
|
||||
map->OnCreateMap();
|
||||
|
||||
if (!save) // this is for sure a dungeon (assert above), no need to check here
|
||||
sInstanceSaveMgr->AddInstanceSave(GetId(), InstanceId, difficulty);
|
||||
|
||||
m_InstancedMaps[InstanceId] = map;
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -237,10 +239,13 @@ BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battlegroun
|
||||
|
||||
BattlegroundMap* map = new BattlegroundMap(GetId(), InstanceId, this, spawnMode);
|
||||
ASSERT(map->IsBattlegroundOrArena());
|
||||
m_InstancedMaps[InstanceId] = map;
|
||||
|
||||
map->SetBG(bg);
|
||||
bg->SetBgMap(map);
|
||||
|
||||
m_InstancedMaps[InstanceId] = map;
|
||||
map->OnCreateMap();
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user