Core/Spells: Fix paladin talent "Grand Crusader"

Closes #9072

Signed-off-by: Vincent-Michael <Vincent_Michael@gmx.de>
This commit is contained in:
Xanvial
2013-08-16 00:04:52 +02:00
committed by Vincent-Michael
parent 443940c084
commit 01178f5958
2 changed files with 51 additions and 0 deletions

View File

@@ -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);

View File

@@ -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");