Core/Spells: Fixed a crash on collection was modified.
This commit is contained in:
@@ -1531,7 +1531,7 @@ namespace Game.Spells
|
||||
|
||||
[AuraEffectHandler(AuraType.ModScale)]
|
||||
[AuraEffectHandler(AuraType.ModScale2)]
|
||||
public void HandleAuraModScale(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||
void HandleAuraModScale(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||
{
|
||||
if (!mode.HasAnyFlag(AuraEffectHandleModes.ChangeAmountSendForClientMask))
|
||||
return;
|
||||
@@ -5380,7 +5380,7 @@ namespace Game.Spells
|
||||
Log.outError(LogFilter.Spells, "AuraEffect.HandleProcTriggerSpellWithValueAuraProc: Could not trigger spell {0} from aura {1} proc, because the spell does not have an entry in Spell.dbc.", triggerSpellId, GetId());
|
||||
}
|
||||
|
||||
public void HandleProcTriggerDamageAuraProc(AuraApplication aurApp, ProcEventInfo eventInfo)
|
||||
void HandleProcTriggerDamageAuraProc(AuraApplication aurApp, ProcEventInfo eventInfo)
|
||||
{
|
||||
Unit target = aurApp.GetTarget();
|
||||
Unit triggerTarget = eventInfo.GetProcTarget();
|
||||
|
||||
@@ -3240,8 +3240,9 @@ namespace Game.Spells
|
||||
unitTarget.GetHostileRefManager().UpdateVisibility();
|
||||
|
||||
var attackers = unitTarget.GetAttackers();
|
||||
foreach (var unit in attackers)
|
||||
for (var i = 0; i < attackers.Count; ++i)
|
||||
{
|
||||
var unit = attackers[i];
|
||||
if (!unit.CanSeeOrDetect(unitTarget))
|
||||
unit.AttackStop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user