fix(Core/Grids): Grid improvements (#20955)

This commit is contained in:
Takenbacon
2025-02-14 13:11:27 -08:00
committed by GitHub
parent 10183efd51
commit ee69a569c4
67 changed files with 1955 additions and 2026 deletions

View File

@@ -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;
}