Core/Spells: rework part 4: iterate over effects first
Port From (https://github.com/TrinityCore/TrinityCore/commit/65dca120d34febdaa84a63e17f638ab0fa59b3df)
This commit is contained in:
@@ -2836,8 +2836,16 @@ namespace Game.Maps
|
||||
return _toggledSpawnGroupIds.Contains(groupId) != !data.flags.HasAnyFlag(SpawnGroupFlags.ManualSpawn);
|
||||
}
|
||||
|
||||
public void AddFarSpellCallback(FarSpellCallback callback)
|
||||
{
|
||||
_farSpellCallbacks.Enqueue(new FarSpellCallback(callback));
|
||||
}
|
||||
|
||||
public virtual void DelayedUpdate(uint diff)
|
||||
{
|
||||
while (_farSpellCallbacks.TryDequeue(out FarSpellCallback callback))
|
||||
callback(this);
|
||||
|
||||
for (var i = 0; i < _transports.Count; ++i)
|
||||
{
|
||||
Transport transport = _transports[i];
|
||||
@@ -4985,6 +4993,9 @@ namespace Game.Maps
|
||||
List<Corpse> _corpseBones = new();
|
||||
|
||||
List<WorldObject> _updateObjects = new();
|
||||
|
||||
delegate void FarSpellCallback(Map map);
|
||||
Queue<FarSpellCallback> _farSpellCallbacks = new();
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user