Scripts/Spells: Fix warrior talent Pain and Gain proc and heal amount (#31535)

This commit is contained in:
MoltenCrystal
2026-02-14 00:22:19 +01:00
committed by GitHub
parent 404ebf8e9c
commit f692e91e10
2 changed files with 22 additions and 0 deletions

View File

@@ -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

View File

@@ -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);