diff options
| author | Xanvial <xanvial@gmail.com> | 2013-08-16 00:04:52 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-08-16 00:04:52 +0200 |
| commit | 01178f595809dc6f7d043e6cc5c7e7975c466e09 (patch) | |
| tree | 665e41ff8fcc98160cb1b88acf3ae24f4f8fa4c3 /src | |
| parent | 443940c08400ec55d067b305c7353ebb082ef277 (diff) | |
Core/Spells: Fix paladin talent "Grand Crusader"
Closes #9072
Signed-off-by: Vincent-Michael <Vincent_Michael@gmx.de>
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 10238f9d42e..b3a23afa326 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -29,6 +29,7 @@ enum PaladinSpells { + SPELL_PALADIN_AVENGERS_SHIELD = 31935, SPELL_PALADIN_AURA_MASTERY_IMMUNE = 64364, SPELL_PALADIN_BEACON_OF_LIGHT_MARKER = 53563, SPELL_PALADIN_BEACON_OF_LIGHT_HEAL = 53652, @@ -523,6 +524,46 @@ class spell_pal_exorcism_and_holy_wrath_damage : public SpellScriptLoader } }; +// -75806 - Grand Crusader +class spell_pal_grand_crusader : public SpellScriptLoader +{ + public: + spell_pal_grand_crusader() : SpellScriptLoader("spell_pal_grand_crusader") { } + + class spell_pal_grand_crusader_AuraScript : public AuraScript + { + PrepareAuraScript(spell_pal_grand_crusader_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_AVENGERS_SHIELD)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& /*eventInfo*/) + { + return GetTarget()->GetTypeId() == TYPEID_PLAYER; + } + + void HandleEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/) + { + GetTarget()->ToPlayer()->RemoveSpellCooldown(SPELL_PALADIN_AVENGERS_SHIELD, true); + } + + void Register() OVERRIDE + { + DoCheckProc += AuraCheckProcFn(spell_pal_grand_crusader_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_pal_grand_crusader_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_pal_grand_crusader_AuraScript(); + } +}; + // -9799 - Eye for an Eye class spell_pal_eye_for_an_eye : public SpellScriptLoader { @@ -1032,6 +1073,7 @@ void AddSC_paladin_spell_scripts() new spell_pal_divine_storm_dummy(); new spell_pal_exorcism_and_holy_wrath_damage(); new spell_pal_eye_for_an_eye(); + new spell_pal_grand_crusader(); new spell_pal_hand_of_sacrifice(); new spell_pal_holy_shock(); new spell_pal_improved_aura_effect("spell_pal_improved_concentraction_aura_effect"); |
