diff options
| author | Cristian Vintila <127750549+cristianvnt@users.noreply.github.com> | 2025-12-20 22:27:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-20 21:27:41 +0100 |
| commit | cf922909f7d951e1c1083bf2169537d73fa0439c (patch) | |
| tree | c4734aa72ba27aa5ab51d3dfa0a77113f518bce3 /src/server/scripts | |
| parent | 3919b82a63c873b8632ef63d3af4b9d95eb8f87d (diff) | |
Scripts/Spells: Implement Eternal Flame heal increase on caster (#31431)
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
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); |
