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 -2
View File
@@ -37,10 +37,11 @@ namespace Game.Spells
{
None = 0,
Default = 1, // scripted remove, remove by stack with aura with different ids and sc aura remove
Interrupt,
Cancel,
EnemySpell, // dispel and absorb aura destroy
Expire, // aura duration has ended
ByDeath
Death
}
public enum AuraFlags
{
@@ -1162,7 +1163,7 @@ namespace Game.Spells
{
if (spell < 0)
target.RemoveAurasDueToSpell((uint)-spell);
else if (removeMode != AuraRemoveMode.ByDeath)
else if (removeMode != AuraRemoveMode.Death)
target.CastSpell(target, (uint)spell, true, null, null, GetCasterGUID());
}
}
+1 -1
View File
@@ -4468,7 +4468,7 @@ namespace Game.Spells
if (!mode.HasAnyFlag(AuraEffectHandleModes.Real))
return;
if (apply || aurApp.GetRemoveMode() != AuraRemoveMode.ByDeath)
if (apply || aurApp.GetRemoveMode() != AuraRemoveMode.Death)
return;
Unit caster = GetCaster();