From cf922909f7d951e1c1083bf2169537d73fa0439c Mon Sep 17 00:00:00 2001 From: Cristian Vintila <127750549+cristianvnt@users.noreply.github.com> Date: Sat, 20 Dec 2025 22:27:41 +0200 Subject: Scripts/Spells: Implement Eternal Flame heal increase on caster (#31431) --- src/server/scripts/Spells/spell_paladin.cpp | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 4ab419b1067..3bbf48b8d47 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -71,6 +71,7 @@ enum PaladinSpells SPELL_PALADIN_DIVINE_STORM_DAMAGE = 224239, SPELL_PALADIN_ENDURING_LIGHT = 40471, SPELL_PALADIN_ENDURING_JUDGEMENT = 40472, + SPELL_PALADIN_ETERNAL_FLAME = 156322, SPELL_PALADIN_EXECUTION_SENTENCE_DAMAGE = 387113, SPELL_PALADIN_EXECUTION_SENTENCE_11_SECONDS = 406919, SPELL_PALADIN_EXECUTION_SENTENCE_8_SECONDS = 386579, @@ -693,6 +694,47 @@ class spell_pal_divine_storm : public SpellScript } }; +// 156322 - Eternal Flame +class spell_pal_eternal_flame : public SpellScript +{ + bool Validate(SpellInfo const* spellInfo) override + { + return ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } }); + } + + void CalculateHealing(SpellEffectInfo const& /*effectInfo*/, Unit const* victim, int32& /*healing*/, int32& /*flatMod*/, float& pctMod) const + { + Unit* caster = GetCaster(); + if (victim == caster) + AddPct(pctMod, GetEffectInfo(EFFECT_2).CalcValue(caster)); + } + + void Register() override + { + CalcHealing += SpellCalcHealingFn(spell_pal_eternal_flame::CalculateHealing); + } +}; + +class spell_pal_eternal_flame_aura : public AuraScript +{ + bool Validate(SpellInfo const* spellInfo) override + { + return ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } }); + } + + void CalculateHealing(AuraEffect const* /*aurEff*/, Unit const* victim, int32& /*healing*/, int32& /*flatMod*/, float& pctMod) const + { + Unit* caster = GetCaster(); + if (victim == caster) + AddPct(pctMod, GetEffectInfo(EFFECT_2).CalcValue(caster)); + } + + void Register() override + { + DoEffectCalcDamageAndHealing += AuraEffectCalcHealingFn(spell_pal_eternal_flame_aura::CalculateHealing, EFFECT_0, SPELL_AURA_PERIODIC_HEAL); + } +}; + // 343527 - Execution Sentence class spell_pal_execution_sentence : public SpellScript { @@ -1806,6 +1848,7 @@ void AddSC_paladin_spell_scripts() RegisterSpellScript(spell_pal_divine_shield); RegisterSpellScript(spell_pal_divine_steed); RegisterSpellScript(spell_pal_divine_storm); + RegisterSpellAndAuraScriptPair(spell_pal_eternal_flame, spell_pal_eternal_flame_aura); RegisterSpellAndAuraScriptPair(spell_pal_execution_sentence, spell_pal_execution_sentence_aura); RegisterSpellScript(spell_pal_eye_for_an_eye); RegisterSpellScript(spell_pal_final_verdict); -- cgit v1.2.3