From 9701b2fb0377d660f2f14a5a01676da761b02b5b Mon Sep 17 00:00:00 2001 From: MoltenCrystal Date: Mon, 16 Feb 2026 20:23:01 +0100 Subject: [PATCH] Scripts/Spells: Implement warrior talent Overpowering Finish (#31566) --- .../world/master/2026_02_16_03_world.sql | 3 ++ src/server/scripts/Spells/spell_warrior.cpp | 34 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 sql/updates/world/master/2026_02_16_03_world.sql diff --git a/sql/updates/world/master/2026_02_16_03_world.sql b/sql/updates/world/master/2026_02_16_03_world.sql new file mode 100644 index 0000000000..8329ffb726 --- /dev/null +++ b/sql/updates/world/master/2026_02_16_03_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_warr_overpowering_finish'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(7384,'spell_warr_overpowering_finish'); diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index 7f6b14aa35..be75955693 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -841,6 +841,39 @@ class spell_warr_frothing_berserker : public AuraScript } }; +// 400205 - Overpowering Finish (attached to 7384 - Overpower) +class spell_warr_overpowering_finish : public SpellScript +{ + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellEffect({ { SPELL_WARRIOR_OVERPOWERING_FINISH, EFFECT_1 } }); + } + + bool Load() override + { + return GetCaster()->HasAura(SPELL_WARRIOR_OVERPOWERING_FINISH); + } + + void CalculateDamage(SpellEffectInfo const& /*effectInfo*/, Unit const* victim, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) const + { + Aura const* talent = GetCaster()->GetAura(SPELL_WARRIOR_OVERPOWERING_FINISH); + if (!talent) + return; + + AuraEffect const* healthPct = talent->GetEffect(EFFECT_1); + if (!healthPct || !victim->HealthBelowPct(healthPct->GetAmount())) + return; + + if (AuraEffect const* dmgIncrease = talent->GetEffect(EFFECT_0)) + AddPct(pctMod, dmgIncrease->GetAmount()); + } + + void Register() override + { + CalcDamage += SpellCalcDamageFn(spell_warr_overpowering_finish::CalculateDamage); + } +}; + // 382551 - Pain and Gain (heal) class spell_warr_pain_and_gain_heal : public SpellScript { @@ -1890,6 +1923,7 @@ void AddSC_warrior_spell_scripts() RegisterSpellScript(spell_warr_invigorating_fury); RegisterSpellScript(spell_warr_item_t10_prot_4p_bonus); RegisterSpellScript(spell_warr_mortal_strike); + RegisterSpellScript(spell_warr_overpowering_finish); RegisterSpellScript(spell_warr_pain_and_gain_heal); RegisterSpellScript(spell_warr_powerful_enrage); RegisterSpellScript(spell_warr_raging_blow_cooldown_reset);