diff --git a/sql/scriptdev2/spell.sql b/sql/scriptdev2/spell.sql index 3947b347c1..65f57f9214 100644 --- a/sql/scriptdev2/spell.sql +++ b/sql/scriptdev2/spell.sql @@ -710,6 +710,7 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES (27158,'spell_seal_of_the_crusader'), (5373,'spell_judgement_of_light_intermediate'), (1826,'spell_judgement_of_wisdom_intermediate'), +(19752,'spell_divine_intervention'), (19977,'spell_blessing_of_light'), (19978,'spell_blessing_of_light'), (19979,'spell_blessing_of_light'), diff --git a/src/game/Spells/Scripts/Scripting/ClassScripts/Paladin.cpp b/src/game/Spells/Scripts/Scripting/ClassScripts/Paladin.cpp index 51c0535964..c82a08b86e 100644 --- a/src/game/Spells/Scripts/Scripting/ClassScripts/Paladin.cpp +++ b/src/game/Spells/Scripts/Scripting/ClassScripts/Paladin.cpp @@ -261,10 +261,25 @@ struct BlessingOfLight : public AuraScript } }; +// 19752 - Divine Intervention +struct DivineIntervention : public SpellScript +{ + SpellCastResult OnCheckCast(Spell* spell, bool /*strict*/) const override + { + Unit* target = spell->m_targets.getUnitTarget(); + if (!target) + return SPELL_FAILED_BAD_IMPLICIT_TARGETS; + if (target->HasAura(23333) || target->HasAura(23335) || target->HasAura(34976)) // possibly SPELL_ATTR_EX_IMMUNITY_TO_HOSTILE_AND_FRIENDLY_EFFECTS + return SPELL_FAILED_TARGET_AURASTATE; + return SPELL_CAST_OK; + } +}; + void LoadPaladinScripts() { RegisterSpellScript("spell_judgement_of_light_intermediate"); RegisterSpellScript("spell_judgement_of_wisdom_intermediate"); + RegisterSpellScript("spell_divine_intervention"); RegisterSpellScript("spell_judgement"); RegisterSpellScript("spell_righteous_defense"); RegisterSpellScript("spell_seal_of_the_crusader");