diff options
-rw-r--r-- | sql/updates/world/2013_08_15_00_world_spell_misc_434.sql | 9 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 42 |
2 files changed, 51 insertions, 0 deletions
diff --git a/sql/updates/world/2013_08_15_00_world_spell_misc_434.sql b/sql/updates/world/2013_08_15_00_world_spell_misc_434.sql new file mode 100644 index 00000000000..8ad29e7ec3d --- /dev/null +++ b/sql/updates/world/2013_08_15_00_world_spell_misc_434.sql @@ -0,0 +1,9 @@ +-- Grand Crusader +DELETE FROM `spell_script_names` WHERE `spell_id`=-75806; +INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES +(-75806,'spell_pal_grand_crusader'); + +-- Grand Crusader can only be activated by Crusader Strike or Hammer of the Righteous +DELETE FROM `spell_proc_event` WHERE `entry`=-75806; +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(-75806, 0, 10, 0, 0x48000, 0, 0, 0, 0, 0, 0); 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"); |