Core/Spells: Implement AURA_REMOVE_BY_INTERRUPT to provide aura scripts with more information when removing by Unit::RemoveAurasWithInterruptFlags

This commit is contained in:
hondacrx
2018-07-25 12:25:53 -04:00
parent 75619e833f
commit 943e858ccf
5 changed files with 12 additions and 8 deletions
+3 -3
View File
@@ -2563,7 +2563,7 @@ namespace Game.Entities
Aura aura = app.Value.GetBase();
if (!aura.IsPassive() && !aura.IsDeathPersistent())
_UnapplyAura(app, AuraRemoveMode.ByDeath);
_UnapplyAura(app, AuraRemoveMode.Death);
}
foreach (var pair in GetOwnedAuras())
@@ -2573,7 +2573,7 @@ namespace Game.Entities
continue;
if (!aura.IsPassive() && !aura.IsDeathPersistent())
RemoveOwnedAura(pair, AuraRemoveMode.ByDeath);
RemoveOwnedAura(pair, AuraRemoveMode.Death);
}
}
public void RemoveMovementImpairingAuras()
@@ -3193,7 +3193,7 @@ namespace Game.Entities
&& !(Convert.ToBoolean(flag & (uint)SpellAuraInterruptFlags.Move) && HasAuraTypeWithAffectMask(AuraType.CastWhileWalking, aura.GetSpellInfo())))
{
uint removedAuras = m_removedAurasCount;
RemoveAura(aura);
RemoveAura(aura, AuraRemoveMode.Interrupt);
if (m_removedAurasCount > removedAuras + 1)
i = 0;
}