Core/Spells: Fixed a crash on collection was modified.

This commit is contained in:
hondacrx
2021-03-18 12:20:56 -04:00
parent d20893944c
commit 62f554f2e0
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -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();
+2 -1
View File
@@ -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();
}