Core/GameObjects: Update spawn group conditions immediately after battleground capture point changes state
Port From (https://github.com/TrinityCore/TrinityCore/commit/8023daabef52d401cf361282f32c0bbbaf206702)
This commit is contained in:
@@ -3478,6 +3478,8 @@ namespace Game.Entities
|
|||||||
bg.UpdateWorldState((int)GetGoInfo().CapturePoint.worldState1, (byte)m_goValue.CapturePoint.State);
|
bg.UpdateWorldState((int)GetGoInfo().CapturePoint.worldState1, (byte)m_goValue.CapturePoint.State);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GetMap().UpdateSpawnGroupConditions();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanInteractWithCapturePoint(Player target)
|
public bool CanInteractWithCapturePoint(Player target)
|
||||||
|
|||||||
@@ -2382,7 +2382,7 @@ namespace Game.Maps
|
|||||||
return _toggledSpawnGroupIds.Contains(groupId) != !data.flags.HasAnyFlag(SpawnGroupFlags.ManualSpawn);
|
return _toggledSpawnGroupIds.Contains(groupId) != !data.flags.HasAnyFlag(SpawnGroupFlags.ManualSpawn);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateSpawnGroupConditions()
|
public void UpdateSpawnGroupConditions()
|
||||||
{
|
{
|
||||||
var spawnGroups = Global.ObjectMgr.GetSpawnGroupsForMap(GetId());
|
var spawnGroups = Global.ObjectMgr.GetSpawnGroupsForMap(GetId());
|
||||||
foreach (uint spawnGroupId in spawnGroups)
|
foreach (uint spawnGroupId in spawnGroups)
|
||||||
|
|||||||
Reference in New Issue
Block a user