Scripts/Spells: Implemented Priest talent Protective Light (#29630)

This commit is contained in:
Cristian Vintila
2024-01-29 23:59:27 +02:00
committed by GitHub
parent 00cb775558
commit 4fea4fb567
2 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
DELETE FROM `spell_proc` WHERE `SpellId` IN (193063);
INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
(193063,0x02,6,0x00000800,0x00000000,0x00000000,0x00000000,0x0,0x0,0x2,0x2,0x403,0x0,0x0,0,0,0,0); -- Protective Light
DELETE FROM `spell_script_names` WHERE `spell_id` IN (193063);
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(193063, 'spell_pri_protective_light');

View File

@@ -138,6 +138,7 @@ enum PriestSpells
SPELL_PRIEST_PRAYER_OF_MENDING_AURA = 41635,
SPELL_PRIEST_PRAYER_OF_MENDING_HEAL = 33110,
SPELL_PRIEST_PRAYER_OF_MENDING_JUMP = 155793,
SPELL_PRIEST_PROTECTIVE_LIGHT_AURA = 193065,
SPELL_PRIEST_PURGE_THE_WICKED = 204197,
SPELL_PRIEST_PURGE_THE_WICKED_DUMMY = 204215,
SPELL_PRIEST_PURGE_THE_WICKED_PERIODIC = 204213,
@@ -2136,6 +2137,26 @@ class spell_pri_prayer_of_mending_jump : public spell_pri_prayer_of_mending_Spel
}
};
// 193063 - Protective Light (Aura)
class spell_pri_protective_light : public AuraScript
{
bool CheckEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{
return eventInfo.GetProcTarget() == GetCaster();
}
void HandleEffectProc(AuraEffect* aurEff, ProcEventInfo& /*eventInfo*/)
{
GetCaster()->CastSpell(GetCaster(), SPELL_PRIEST_PROTECTIVE_LIGHT_AURA, aurEff);
}
void Register() override
{
DoCheckEffectProc += AuraCheckEffectProcFn(spell_pri_protective_light::CheckEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
OnEffectProc += AuraEffectProcFn(spell_pri_protective_light::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
// 405554 - Priest Holy 10.1 Class Set 2pc
class spell_pri_holy_10_1_class_set_2pc : public AuraScript
{
@@ -2838,6 +2859,7 @@ void AddSC_priest_spell_scripts()
RegisterSpellScript(spell_pri_prayer_of_mending_dummy);
RegisterSpellAndAuraScriptPair(spell_pri_prayer_of_mending, spell_pri_prayer_of_mending_aura);
RegisterSpellScript(spell_pri_prayer_of_mending_jump);
RegisterSpellScript(spell_pri_protective_light);
RegisterSpellScript(spell_pri_holy_10_1_class_set_2pc);
RegisterSpellScript(spell_pri_holy_10_1_class_set_2pc_chooser);
RegisterSpellScript(spell_pri_holy_10_1_class_set_4pc);