From f692e91e1050548925e5064c7d0eab9270719efc Mon Sep 17 00:00:00 2001 From: MoltenCrystal Date: Sat, 14 Feb 2026 00:22:19 +0100 Subject: [PATCH] Scripts/Spells: Fix warrior talent Pain and Gain proc and heal amount (#31535) --- sql/updates/world/master/2026_02_13_01_world.sql | 7 +++++++ src/server/scripts/Spells/spell_warrior.cpp | 15 +++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 sql/updates/world/master/2026_02_13_01_world.sql diff --git a/sql/updates/world/master/2026_02_13_01_world.sql b/sql/updates/world/master/2026_02_13_01_world.sql new file mode 100644 index 0000000000..dd339f16a3 --- /dev/null +++ b/sql/updates/world/master/2026_02_13_01_world.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_warr_pain_and_gain_heal'; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(382551,'spell_warr_pain_and_gain_heal'); + +DELETE FROM `spell_proc` WHERE `SpellId`=382549; +INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES +(382549,0x00,4,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0,0,0,0); -- Pain and Gain diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index a33d917a93..fbeab164e1 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -798,6 +798,20 @@ class spell_warr_frothing_berserker : public AuraScript } }; +// 382551 - Pain and Gain (heal) +class spell_warr_pain_and_gain_heal : public SpellScript +{ + static void CalculateHeal(SpellScript const&, SpellEffectInfo const& /*effInfo*/, Unit const* /*victim*/, int32& /*healing*/, int32& /*flatMod*/, float& pctMod) + { + pctMod *= 0.1f; + } + + void Register() override + { + CalcHealing += SpellCalcDamageFn(spell_warr_pain_and_gain_heal::CalculateHeal); + } +}; + // 440277 - Powerful Enrage (attached to 184362 - Enrage) class spell_warr_powerful_enrage : public SpellScript { @@ -1754,6 +1768,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_pain_and_gain_heal); RegisterSpellScript(spell_warr_powerful_enrage); RegisterSpellScript(spell_warr_raging_blow_cooldown_reset); RegisterSpellScript(spell_warr_rallying_cry);