Scripts/Spells: Fix paladin talent Eye for an Eye (#27426)

This commit is contained in:
aquadeus
2021-12-19 11:53:17 +01:00
committed by GitHub
parent 5750466259
commit 07015cc052
2 changed files with 26 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_pal_eye_for_an_eye';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(205191,'spell_pal_eye_for_an_eye');

View File

@@ -62,8 +62,7 @@ enum PaladinSpells
SPELL_PALADIN_DIVINE_STORM_DAMAGE = 224239,
SPELL_PALADIN_ENDURING_LIGHT = 40471,
SPELL_PALADIN_ENDURING_JUDGEMENT = 40472,
SPELL_PALADIN_EYE_FOR_AN_EYE_RANK_1 = 9799,
SPELL_PALADIN_EYE_FOR_AN_EYE_DAMAGE = 25997,
SPELL_PALADIN_EYE_FOR_AN_EYE_TRIGGERED = 205202,
SPELL_PALADIN_FINAL_STAND = 204077,
SPELL_PALADIN_FINAL_STAND_EFFECT = 204079,
SPELL_PALADIN_FORBEARANCE = 25771,
@@ -496,6 +495,27 @@ class spell_pal_divine_storm : public SpellScript
}
};
// 205191 - Eye for an Eye
class spell_pal_eye_for_an_eye : public AuraScript
{
PrepareAuraScript(spell_pal_eye_for_an_eye);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_PALADIN_EYE_FOR_AN_EYE_TRIGGERED });
}
void HandleEffectProc(AuraEffect* /*aurEff*/, ProcEventInfo& eventInfo)
{
GetTarget()->CastSpell(eventInfo.GetActor(), SPELL_PALADIN_EYE_FOR_AN_EYE_TRIGGERED, true);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_pal_eye_for_an_eye::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
// 234299 - Fist of Justice
class spell_pal_fist_of_justice : public AuraScript
{
@@ -1196,6 +1216,7 @@ void AddSC_paladin_spell_scripts()
RegisterSpellScript(spell_pal_divine_shield);
RegisterSpellScript(spell_pal_divine_steed);
RegisterSpellScript(spell_pal_divine_storm);
RegisterAuraScript(spell_pal_eye_for_an_eye);
RegisterAuraScript(spell_pal_fist_of_justice);
RegisterSpellScript(spell_pal_glyph_of_holy_light);
new spell_pal_grand_crusader();