diff options
author | Andrew <47818697+Nyeriah@users.noreply.github.com> | 2025-09-16 06:53:49 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-16 06:53:49 -0300 |
commit | add49b7723a07141b3157b7d3e2476851aef9330 (patch) | |
tree | 6d1b7995ba772b2c1e33182d0ca600373d2f5374 /src | |
parent | 5b493a476779f8cf4180bd58d711d4bb2b1ae14e (diff) |
fix(Scripts/Dragonblight): Script Wyrmrest Vanquisher Flame Fury spell (#22940)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Northrend/zone_dragonblight.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp index 9cf0cb7c0a..982f5bf967 100644 --- a/src/server/scripts/Northrend/zone_dragonblight.cpp +++ b/src/server/scripts/Northrend/zone_dragonblight.cpp @@ -2261,6 +2261,41 @@ class spell_handover_reins : public SpellScript } }; +enum FlameFurySpells +{ + SPELL_FLAME_FURY_1 = 50351, + SPELL_FLAME_FURY_2 = 50353, + SPELL_FLAME_FURY_3 = 50354, + SPELL_FLAME_FURY_4 = 50355, + SPELL_FLAME_FURY_5 = 50357 +}; + +// 50348 - Flame Fury +class spell_dragonblight_flame_fury : public AuraScript +{ + PrepareAuraScript(spell_dragonblight_flame_fury); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo(spellIds); + } + + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (Unit* owner = GetUnitOwner()) + if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE && !owner->IsAlive()) + owner->CastSpell(owner, Acore::Containers::SelectRandomContainerElement(spellIds), true); + } + +private: + std::array<uint32, 5> const spellIds = { SPELL_FLAME_FURY_1, SPELL_FLAME_FURY_2, SPELL_FLAME_FURY_3, SPELL_FLAME_FURY_4, SPELL_FLAME_FURY_5 }; + + void Register() override + { + OnEffectRemove += AuraEffectRemoveFn(spell_dragonblight_flame_fury::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); + } +}; + void AddSC_dragonblight() { new npc_conversing_with_the_depths_trigger(); @@ -2289,4 +2324,5 @@ void AddSC_dragonblight() new npc_torturer_lecraft(); RegisterSpellScript(spell_dragonblight_corrosive_spit); RegisterSpellScript(spell_handover_reins); + RegisterSpellScript(spell_dragonblight_flame_fury); } |