Core/Auras: Implemented SPELL_AURA_TRIGGER_SPELL_ON_EXPIRE
Port From (https://github.com/TrinityCore/TrinityCore/commit/792dab8f052f7cfb018ba2bafb68a3fe8154b764)
This commit is contained in:
@@ -516,7 +516,7 @@ namespace Framework.Constants
|
|||||||
Unk492 = 492,
|
Unk492 = 492,
|
||||||
Unk493 = 493,
|
Unk493 = 493,
|
||||||
SetPowerPointCharge = 494, // NYI
|
SetPowerPointCharge = 494, // NYI
|
||||||
TriggerSpellOnExpire = 495, // NYI
|
TriggerSpellOnExpire = 495,
|
||||||
AllowChangingEquipmentInTorghast = 496, // NYI
|
AllowChangingEquipmentInTorghast = 496, // NYI
|
||||||
ModAnimaGain = 497, // NYI
|
ModAnimaGain = 497, // NYI
|
||||||
CurrencyLossPctOnDeath = 498, // NYI
|
CurrencyLossPctOnDeath = 498, // NYI
|
||||||
|
|||||||
@@ -4711,6 +4711,15 @@ namespace Game.Spells
|
|||||||
target.CastSpell(target, triggerSpell, new CastSpellExtraArgs(this));
|
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)]
|
[AuraEffectHandler(AuraType.OpenStable)]
|
||||||
void HandleAuraOpenStable(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
void HandleAuraOpenStable(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user