Core/Maps: Properly set initial spawn group state for groups that have conditions (#29509)

This commit is contained in:
Jeremy
2023-12-29 14:02:37 +01:00
committed by GitHub
parent a2be97414b
commit fb64d7fe8e
3 changed files with 15 additions and 0 deletions

View File

@@ -74,6 +74,7 @@ Map* MapManager::CreateWorldMap(uint32 mapId, uint32 instanceId)
Map* map = new Map(mapId, i_gridCleanUpDelay, instanceId, DIFFICULTY_NONE);
map->LoadRespawnTimes();
map->LoadCorpseData();
map->InitSpawnGroupState();
if (sWorld->getBoolConfig(CONFIG_BASEMAP_LOAD_GRIDS))
map->LoadAllCells();
@@ -107,6 +108,7 @@ InstanceMap* MapManager::CreateInstance(uint32 mapId, uint32 instanceId, Instanc
map->CreateInstanceData();
map->SetInstanceScenario(sScenarioMgr->CreateInstanceScenario(map, team));
map->InitSpawnGroupState();
if (sWorld->getBoolConfig(CONFIG_INSTANCEMAP_LOAD_GRIDS))
map->LoadAllCells();
@@ -122,6 +124,7 @@ BattlegroundMap* MapManager::CreateBattleground(uint32 mapId, uint32 instanceId,
ASSERT(map->IsBattlegroundOrArena());
map->SetBG(bg);
bg->SetBgMap(map);
map->InitSpawnGroupState();
if (sWorld->getBoolConfig(CONFIG_BATTLEGROUNDMAP_LOAD_GRIDS))
map->LoadAllCells();
@@ -133,6 +136,7 @@ GarrisonMap* MapManager::CreateGarrison(uint32 mapId, uint32 instanceId, Player*
{
GarrisonMap* map = new GarrisonMap(mapId, i_gridCleanUpDelay, instanceId, owner->GetGUID());
ASSERT(map->IsGarrison());
map->InitSpawnGroupState();
return map;
}