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:
@@ -2374,6 +2374,13 @@ namespace Game.Maps
|
||||
return _toggledSpawnGroupIds.Contains(groupId) != !data.flags.HasAnyFlag(SpawnGroupFlags.ManualSpawn);
|
||||
}
|
||||
|
||||
public void InitSpawnGroupState()
|
||||
{
|
||||
var spawnGroups = Global.ObjectMgr.GetSpawnGroupsForMap(GetId());
|
||||
foreach (uint spawnGroupId in spawnGroups)
|
||||
SetSpawnGroupActive(spawnGroupId, Global.ConditionMgr.IsMapMeetingNotGroupedConditions(ConditionSourceType.SpawnGroup, spawnGroupId, this));
|
||||
}
|
||||
|
||||
public void UpdateSpawnGroupConditions()
|
||||
{
|
||||
var spawnGroups = Global.ObjectMgr.GetSpawnGroupsForMap(GetId());
|
||||
|
||||
Reference in New Issue
Block a user