Core/Auras: Implemented SPELL_AURA_TRIGGER_SPELL_ON_EXPIRE

Port From (https://github.com/TrinityCore/TrinityCore/commit/792dab8f052f7cfb018ba2bafb68a3fe8154b764)
This commit is contained in:
hondacrx
2022-01-09 14:14:29 -05:00
parent 860bf84280
commit f8cd5846fc
2 changed files with 10 additions and 1 deletions
@@ -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
+9
View File
@@ -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)
{