Skip to content

Commit

Permalink
Paladin: Make divine intervention bounce if target is carrying a BG flag
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Jan 1, 2024
1 parent 1a81596 commit 6bb83e2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions sql/scriptdev2/spell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
15 changes: 15 additions & 0 deletions src/game/Spells/Scripts/Scripting/ClassScripts/Paladin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<JudgementOfLightIntermediate>("spell_judgement_of_light_intermediate");
RegisterSpellScript<JudgementOfWisdomIntermediate>("spell_judgement_of_wisdom_intermediate");
RegisterSpellScript<DivineIntervention>("spell_divine_intervention");
RegisterSpellScript<spell_judgement>("spell_judgement");
RegisterSpellScript<RighteousDefense>("spell_righteous_defense");
RegisterSpellScript<SealOfTheCrusader>("spell_seal_of_the_crusader");
Expand Down

0 comments on commit 6bb83e2

Please sign in to comment.