diff options
| author | Cristian Vintila <127750549+cristianvnt@users.noreply.github.com> | 2026-01-01 20:52:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-01 19:52:55 +0100 |
| commit | b2596bd42c2d612e49569ea7e41972774d6139a8 (patch) | |
| tree | 0b4bc5c2ff99cc7d8195ee4a667a7d734c5d0722 /src/server | |
| parent | 48992393c892b1bd327c7a2ce3adf31bb99e9003 (diff) | |
Scripts/Spells: Implement priest talent Voice of Harmony (#31457)
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 980275997a3..66f1b7f4216 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -228,6 +228,7 @@ enum PriestSpells SPELL_PRIEST_VAMPIRIC_TOUCH = 34914, SPELL_PRIEST_VOID_SHIELD = 199144, SPELL_PRIEST_VOID_SHIELD_EFFECT = 199145, + SPELL_PRIEST_VOICE_OF_HARMONY = 390994, SPELL_PRIEST_VOID_TORRENT = 263165, SPELL_PRIEST_WEAKENED_SOUL = 6788, SPELL_PRIEST_WHISPERING_SHADOWS = 406777, @@ -4238,6 +4239,58 @@ class spell_pri_vampiric_touch : public AuraScript } }; +// 390994 - Voice of Harmony +class spell_pri_voice_of_harmony : public AuraScript +{ + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo + ({ + SPELL_PRIEST_HOLY_WORD_CHASTISE, + SPELL_PRIEST_HOLY_WORD_SANCTIFY, + SPELL_PRIEST_HOLY_WORD_SERENITY + }); + } + + static bool CheckHolyWordSanctify(AuraScript const&, AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo) + { + // Divine Star + // Halo + return eventInfo.GetSpellInfo()->IsAffected(SPELLFAMILY_PRIEST, { 0x0, 0x0, 0x0, 0x4040 }); + } + + static bool CheckHolyWordSerenity(AuraScript const&, AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo) + { + // Power Word: Life + // Prayer of Mending + return eventInfo.GetSpellInfo()->IsAffected(SPELLFAMILY_PRIEST, { 0x0, 0x0, 0x8000, 0x400000 }); + } + + static bool CheckHolyWordChastise(AuraScript const&, AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo) + { + // Holy Fire + return eventInfo.GetSpellInfo()->IsAffected(SPELLFAMILY_PRIEST, { 0x100000, 0x0, 0x0, 0x0 }); + } + + template <uint32 TargetSpellId> + void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& /*eventInfo*/) const + { + SpellInfo const* targetSpellInfo = sSpellMgr->AssertSpellInfo(TargetSpellId, GetCastDifficulty()); + int32 cdReduction = aurEff->GetAmount(); + spell_pri_holy_words_base::ModifyCooldown(GetTarget(), targetSpellInfo, Seconds(-cdReduction)); + } + + void Register() override + { + DoCheckEffectProc += AuraCheckEffectProcFn(spell_pri_voice_of_harmony::CheckHolyWordSanctify, EFFECT_0, SPELL_AURA_DUMMY); + DoCheckEffectProc += AuraCheckEffectProcFn(spell_pri_voice_of_harmony::CheckHolyWordSerenity, EFFECT_1, SPELL_AURA_DUMMY); + DoCheckEffectProc += AuraCheckEffectProcFn(spell_pri_voice_of_harmony::CheckHolyWordChastise, EFFECT_2, SPELL_AURA_DUMMY); + OnEffectProc += AuraEffectProcFn(spell_pri_voice_of_harmony::HandleProc<SPELL_PRIEST_HOLY_WORD_SANCTIFY>, EFFECT_0, SPELL_AURA_DUMMY); + OnEffectProc += AuraEffectProcFn(spell_pri_voice_of_harmony::HandleProc<SPELL_PRIEST_HOLY_WORD_SERENITY>, EFFECT_1, SPELL_AURA_DUMMY); + OnEffectProc += AuraEffectProcFn(spell_pri_voice_of_harmony::HandleProc<SPELL_PRIEST_HOLY_WORD_CHASTISE>, EFFECT_2, SPELL_AURA_DUMMY); + } +}; + // 205385 - Shadow Crash class spell_pri_whispering_shadows : public SpellScript { @@ -4419,6 +4472,7 @@ void AddSC_priest_spell_scripts() RegisterSpellScript(spell_pri_vampiric_embrace); RegisterSpellScript(spell_pri_vampiric_embrace_target); RegisterSpellScript(spell_pri_vampiric_touch); + RegisterSpellScript(spell_pri_voice_of_harmony); RegisterSpellScript(spell_pri_whispering_shadows); RegisterSpellScript(spell_pri_whispering_shadows_effect); } |
