mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Scripts/Spells: Implement paladin talent "Blade of Vengeance" (#30612)
This commit is contained in:
5
sql/updates/world/master/2025_02_14_00_world.sql
Normal file
5
sql/updates/world/master/2025_02_14_00_world.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_pal_blade_of_vengeance';
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_pal_blade_of_vengeance_aoe_target_selector';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(184575, 'spell_pal_blade_of_vengeance'),
|
||||
(404358, 'spell_pal_blade_of_vengeance_aoe_target_selector');
|
||||
@@ -5289,6 +5289,12 @@ void SpellMgr::LoadSpellInfoTargetCaps()
|
||||
spellInfo->_LoadSqrtTargetLimit(5, 0, {}, EFFECT_1, {}, {});
|
||||
});
|
||||
|
||||
// Blade of Justice
|
||||
ApplySpellFix({ 404358 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->_LoadSqrtTargetLimit(5, 0, {}, {}, {}, {});
|
||||
});
|
||||
|
||||
TC_LOG_INFO("server.loading", ">> Loaded SpellInfo target caps in {} ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ enum PaladinSpells
|
||||
SPELL_PALADIN_BEACON_OF_LIGHT = 53563,
|
||||
SPELL_PALADIN_BEACON_OF_LIGHT_HEAL = 53652,
|
||||
SPELL_PALADIN_BLADE_OF_JUSTICE = 184575,
|
||||
SPELL_PALADIN_BLADE_OF_VENGEANCE = 403826,
|
||||
SPELL_PALADIN_BLINDING_LIGHT_EFFECT = 105421,
|
||||
SPELL_PALADIN_CONCENTRACTION_AURA = 19746,
|
||||
SPELL_PALADIN_CONSECRATED_GROUND_PASSIVE = 204054,
|
||||
@@ -300,6 +301,46 @@ class spell_pal_awakening : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// Called by 184575 - Blade of Justice
|
||||
class spell_pal_blade_of_vengeance : public SpellScript
|
||||
{
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_PALADIN_BLADE_OF_VENGEANCE })
|
||||
&& ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } })
|
||||
&& spellInfo->GetEffect(EFFECT_2).IsEffect(SPELL_EFFECT_TRIGGER_SPELL);
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return !GetCaster()->HasAura(SPELL_PALADIN_BLADE_OF_VENGEANCE);
|
||||
}
|
||||
|
||||
static void PreventProc(WorldObject*& target)
|
||||
{
|
||||
target = nullptr;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_pal_blade_of_vengeance::PreventProc, EFFECT_2, TARGET_UNIT_TARGET_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 404358 - Blade of Justice
|
||||
class spell_pal_blade_of_vengeance_aoe_target_selector : public SpellScript
|
||||
{
|
||||
void RemoveExplicitTarget(std::list<WorldObject*>& targets) const
|
||||
{
|
||||
targets.remove(GetExplTargetWorldObject());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pal_blade_of_vengeance_aoe_target_selector::RemoveExplicitTarget, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 1022 - Blessing of Protection
|
||||
// 204018 - Blessing of Spellwarding
|
||||
class spell_pal_blessing_of_protection : public SpellScript
|
||||
@@ -1686,6 +1727,8 @@ void AddSC_paladin_spell_scripts()
|
||||
RegisterSpellScript(spell_pal_art_of_war);
|
||||
RegisterAreaTriggerAI(areatrigger_pal_ashen_hallow);
|
||||
RegisterSpellScript(spell_pal_awakening);
|
||||
RegisterSpellScript(spell_pal_blade_of_vengeance);
|
||||
RegisterSpellScript(spell_pal_blade_of_vengeance_aoe_target_selector);
|
||||
RegisterSpellScript(spell_pal_blessing_of_protection);
|
||||
RegisterSpellScript(spell_pal_blinding_light);
|
||||
RegisterSpellScript(spell_pal_crusader_might);
|
||||
|
||||
Reference in New Issue
Block a user