diff options
author | Gildor <gildor55@gmail.com> | 2024-02-13 14:54:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 14:54:24 +0100 |
commit | 1b878209354723138d2f5d969ee53255e6db94d4 (patch) | |
tree | e9e0f667fd87a060f2087abd8bd152f09abeddc5 /src | |
parent | 86551ba71669712cadf82f2dc1f0c5481f0fba1b (diff) |
Core/Spells: Implement visual aura duration of Rogue talents Overkill and Master of Subtlety (#29693)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_rogue.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index fc4d7ee5b1f..9a60d1816f1 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -433,6 +433,16 @@ class spell_rog_overkill_mos : public AuraScript return ValidateSpellInfo({ RemoveSpellId }); } + void AfterApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) + { + if (Aura* visualAura = GetTarget()->GetAura(RemoveSpellId)) + { + int32 duration = aurEff->GetBase()->GetDuration(); + visualAura->SetDuration(duration); + visualAura->SetMaxDuration(duration); + } + } + void PeriodicTick(AuraEffect const* /*aurEff*/) { GetTarget()->RemoveAurasDueToSpell(RemoveSpellId); @@ -440,6 +450,7 @@ class spell_rog_overkill_mos : public AuraScript void Register() override { + AfterEffectApply += AuraEffectApplyFn(spell_rog_overkill_mos::AfterApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_rog_overkill_mos::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); } }; |