Core/Maps: Properly set initial spawn group state for groups that have conditions

Port From (https://github.com/TrinityCore/TrinityCore/commit/fb64d7fe8efe5ecba40123cdc96195d3ca52d7c0)
This commit is contained in:
hondacrx
2024-02-04 14:49:04 -05:00
parent 5ccf33eabc
commit 00de526f7d
2 changed files with 11 additions and 0 deletions
+4
View File
@@ -49,6 +49,7 @@ namespace Game.Entities
Map map = new Map(mapId, i_gridCleanUpDelay, instanceId, Difficulty.None);
map.LoadRespawnTimes();
map.LoadCorpseData();
map.InitSpawnGroupState();
if (WorldConfig.GetBoolValue(WorldCfg.BasemapLoadGrids))
map.LoadAllCells();
@@ -82,6 +83,7 @@ namespace Game.Entities
map.CreateInstanceData();
map.SetInstanceScenario(Global.ScenarioMgr.CreateInstanceScenario(map, team));
map.InitSpawnGroupState();
if (WorldConfig.GetBoolValue(WorldCfg.InstancemapLoadGrids))
map.LoadAllCells();
@@ -97,6 +99,7 @@ namespace Game.Entities
Cypher.Assert(map.IsBattlegroundOrArena());
map.SetBG(bg);
bg.SetBgMap(map);
map.InitSpawnGroupState();
if (WorldConfig.GetBoolValue(WorldCfg.BattlegroundMapLoadGrids))
map.LoadAllCells();
@@ -108,6 +111,7 @@ namespace Game.Entities
{
GarrisonMap map = new GarrisonMap(mapId, i_gridCleanUpDelay, instanceId, owner.GetGUID());
Cypher.Assert(map.IsGarrison());
map.InitSpawnGroupState();
return map;
}