Scripts/Spells: Implement paladin talent A just reward (#30954)

This commit is contained in:
Aqua Deus
2025-05-28 21:14:16 +02:00
committed by GitHub
parent f7cd7661b8
commit 58c627bff5
2 changed files with 27 additions and 0 deletions

View File

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

View File

@@ -39,6 +39,7 @@
enum PaladinSpells
{
SPELL_PALADIN_A_JUST_REWARD_HEAL = 469413,
SPELL_PALADIN_ARDENT_DEFENDER_HEAL = 66235,
SPELL_PALADIN_ART_OF_WAR_TRIGGERED = 231843,
SPELL_PALADIN_AVENGERS_SHIELD = 31935,
@@ -145,6 +146,28 @@ enum PaladinSpellLabel
SPELL_LABEL_PALADIN_T30_2P_HEARTFIRE = 2598
};
// 469411 - A Just Reward
class spell_pal_a_just_reward : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_PALADIN_A_JUST_REWARD_HEAL });
}
static void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
{
eventInfo.GetActor()->CastSpell(eventInfo.GetActionTarget(), SPELL_PALADIN_A_JUST_REWARD_HEAL, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.TriggeringAura = aurEff
});
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_pal_a_just_reward::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
// 31850 - Ardent Defender
class spell_pal_ardent_defender : public AuraScript
{
@@ -1765,6 +1788,7 @@ class spell_pal_zeal : public AuraScript
void AddSC_paladin_spell_scripts()
{
RegisterSpellScript(spell_pal_a_just_reward);
RegisterSpellScript(spell_pal_ardent_defender);
RegisterSpellScript(spell_pal_art_of_war);
RegisterAreaTriggerAI(areatrigger_pal_ashen_hallow);