diff options
author | Aqua Deus <95978183+aquadeus@users.noreply.github.com> | 2025-02-14 13:55:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-14 13:55:49 +0100 |
commit | 8f2bf26969ea35ef6ac3230b8a9832722b79504d (patch) | |
tree | a59b5990a5d6d13f53d65e9a174e315b82055ba0 | |
parent | 3c9c0456c5a738ebdb6beb1bcf9d2d177ad03b97 (diff) |
Scripts/Spells: Implement paladin talent "Steed of Liberty" (#30610)
-rw-r--r-- | sql/updates/world/master/2025_02_14_01_world.sql | 7 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 26 |
2 files changed, 33 insertions, 0 deletions
diff --git a/sql/updates/world/master/2025_02_14_01_world.sql b/sql/updates/world/master/2025_02_14_01_world.sql new file mode 100644 index 00000000000..4838daf6383 --- /dev/null +++ b/sql/updates/world/master/2025_02_14_01_world.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_proc` WHERE `SpellId` IN (469304); +INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES +(469304,0x00,10,0x00000000,0x00000010,0x00000000,0x00000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0,0,0,0); -- Steed of Liberty + +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_pal_steed_of_liberty'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(469304, 'spell_pal_steed_of_liberty'); diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index f80067cb56f..ba976a67112 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -47,6 +47,7 @@ enum PaladinSpells SPELL_PALADIN_BEACON_OF_LIGHT_HEAL = 53652, SPELL_PALADIN_BLADE_OF_JUSTICE = 184575, SPELL_PALADIN_BLADE_OF_VENGEANCE = 403826, + SPELL_PALADIN_BLESSING_OF_FREEDOM = 1044, SPELL_PALADIN_BLINDING_LIGHT_EFFECT = 105421, SPELL_PALADIN_CONCENTRACTION_AURA = 19746, SPELL_PALADIN_CONSECRATED_GROUND_PASSIVE = 204054, @@ -1511,6 +1512,30 @@ class spell_pal_shield_of_vengeance : public AuraScript int32 _initialAmount = 0; }; +// 469304 - Steed of Liberty +class spell_pal_steed_of_liberty : public AuraScript +{ + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_PALADIN_BLESSING_OF_FREEDOM }); + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& /*eventInfo*/) const + { + Unit* target = GetTarget(); + target->CastSpell(target, SPELL_PALADIN_BLESSING_OF_FREEDOM, CastSpellExtraArgsInit{ + .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR, + .TriggeringAura = aurEff, + .SpellValueOverrides = { { SPELLVALUE_DURATION, aurEff->GetAmount() } } + }); + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_pal_steed_of_liberty::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } +}; + // 85256 - Templar's Verdict class spell_pal_templar_s_verdict : public SpellScript { @@ -1766,6 +1791,7 @@ void AddSC_paladin_spell_scripts() RegisterSpellScript(spell_pal_selfless_healer); RegisterSpellScript(spell_pal_shield_of_the_righteous); RegisterSpellScript(spell_pal_shield_of_vengeance); + RegisterSpellScript(spell_pal_steed_of_liberty); RegisterSpellScript(spell_pal_templar_s_verdict); RegisterSpellScript(spell_pal_t3_6p_bonus); RegisterSpellScript(spell_pal_t8_2p_bonus); |