diff --git a/Source/Framework/Constants/Spells/SpellAuraConst.cs b/Source/Framework/Constants/Spells/SpellAuraConst.cs index d7cf86a74..8915bcf7a 100644 --- a/Source/Framework/Constants/Spells/SpellAuraConst.cs +++ b/Source/Framework/Constants/Spells/SpellAuraConst.cs @@ -516,7 +516,7 @@ namespace Framework.Constants Unk492 = 492, Unk493 = 493, SetPowerPointCharge = 494, // NYI - TriggerSpellOnExpire = 495, // NYI + TriggerSpellOnExpire = 495, AllowChangingEquipmentInTorghast = 496, // NYI ModAnimaGain = 497, // NYI CurrencyLossPctOnDeath = 498, // NYI diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index a88338070..24281c98e 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -4711,6 +4711,15 @@ namespace Game.Spells target.CastSpell(target, triggerSpell, new CastSpellExtraArgs(this)); } + [AuraEffectHandler(AuraType.TriggerSpellOnExpire)] + void HandleTriggerSpellOnExpire(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply) + { + if (!mode.HasFlag(AuraEffectHandleModes.Real) || apply || aurApp.GetRemoveMode() != AuraRemoveMode.Expire) + return; + + aurApp.GetTarget().CastSpell(aurApp.GetTarget(), GetSpellEffectInfo().TriggerSpell, new CastSpellExtraArgs(this)); + } + [AuraEffectHandler(AuraType.OpenStable)] void HandleAuraOpenStable(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply) {