diff options
| author | Cristian Vintila <127750549+cristianvnt@users.noreply.github.com> | 2026-01-02 20:58:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-02 19:58:01 +0100 |
| commit | 91d02c0443770d29b7f011b7e9ae3ab1e4577475 (patch) | |
| tree | 959ac90611cce432c1a2572438708c58f5bd41ee /src/server | |
| parent | 4ba5e27055c1a67e11128ef62b5ae4a8070e3a65 (diff) | |
Scripts/Spells: Implement priest talent Lasting Words (#31461)
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 57d9dc94fbe..a241c417261 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -134,6 +134,7 @@ enum PriestSpells SPELL_PRIEST_HOLY_10_1_CLASS_SET_4P_EFFECT = 409479, SPELL_PRIEST_INDEMNITY = 373049, SPELL_PRIEST_ITEM_EFFICIENCY = 37595, + SPELL_PRIEST_LASTING_WORDS = 471504, SPELL_PRIEST_LEAP_OF_FAITH_EFFECT = 92832, SPELL_PRIEST_LEVITATE_EFFECT = 111759, SPELL_PRIEST_LIGHT_ERUPTION = 196812, @@ -2075,6 +2076,47 @@ class spell_pri_item_t6_trinket : public AuraScript } }; +// 471504 - Lasting Words +// Triggered by 2050 - Holy Word: Serenity and 34861 - Holy Word: Sanctify +class spell_pri_lasting_words : public SpellScript +{ + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_PRIEST_RENEW }) + && ValidateSpellEffect({ { SPELL_PRIEST_LASTING_WORDS, _spellEff } }); + } + + bool Load() override + { + return GetCaster()->HasAuraEffect(SPELL_PRIEST_LASTING_WORDS, _spellEff); + } + + void HandleEffectHit(SpellEffIndex /*effIndex*/) const + { + Unit* caster = GetCaster(); + + AuraEffect const* lastingWordsEff = caster->GetAuraEffect(SPELL_PRIEST_LASTING_WORDS, _spellEff); + if (!lastingWordsEff) + return; + + caster->CastSpell(GetHitUnit(), SPELL_PRIEST_RENEW, CastSpellExtraArgsInit{ + .TriggerFlags = TRIGGERED_IGNORE_GCD | TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD | TRIGGERED_IGNORE_POWER_COST | TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR, + .TriggeringSpell = GetSpell(), + .SpellValueOverrides = { { SPELLVALUE_DURATION, lastingWordsEff->GetAmount() } } + }); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_pri_lasting_words::HandleEffectHit, EFFECT_0, SPELL_EFFECT_HEAL); + } + + SpellEffIndex _spellEff; + +public: + explicit spell_pri_lasting_words(SpellEffIndex spellEff) : _spellEff(spellEff) { } +}; + // 92833 - Leap of Faith class spell_pri_leap_of_faith_effect_trigger : public SpellScript { @@ -4441,6 +4483,8 @@ void AddSC_priest_spell_scripts() RegisterSpellScript(spell_pri_holy_word_salvation); RegisterSpellScript(spell_pri_holy_word_salvation_cooldown_reduction); RegisterSpellScript(spell_pri_item_t6_trinket); + RegisterSpellScriptWithArgs(spell_pri_lasting_words, "spell_pri_lasting_words_serenity", EFFECT_0); + RegisterSpellScriptWithArgs(spell_pri_lasting_words, "spell_pri_lasting_words_sanctify", EFFECT_1); RegisterSpellScript(spell_pri_leap_of_faith_effect_trigger); RegisterSpellScript(spell_pri_levitate); RegisterSpellScript(spell_pri_lights_wrath); |
