mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Maps: Properly set initial spawn group state for groups that have conditions (#29509)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user