mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Spells: Implement paladin talent "Justicar's Vengeance" damage bonus on stunned targets (#30614)
This commit is contained in:
3
sql/updates/world/master/2025_02_15_00_world.sql
Normal file
3
sql/updates/world/master/2025_02_15_00_world.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_pal_justicars_vengeance';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(215661, 'spell_pal_justicars_vengeance');
|
||||
@@ -994,6 +994,26 @@ class spell_pal_judgment : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 215661 - Justicar's Vengeance
|
||||
class spell_pal_justicars_vengeance : public SpellScript
|
||||
{
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
|
||||
}
|
||||
|
||||
void HandleDamage(SpellEffectInfo const& /*spellEffectInfo*/, Unit const* victim, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) const
|
||||
{
|
||||
if (victim->HasUnitState(UNIT_STATE_STUNNED))
|
||||
AddPct(pctMod, GetEffectInfo(EFFECT_1).CalcValue(GetCaster()));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
CalcDamage += SpellCalcDamageFn(spell_pal_justicars_vengeance::HandleDamage);
|
||||
}
|
||||
};
|
||||
|
||||
// 114165 - Holy Prism
|
||||
class spell_pal_holy_prism : public SpellScript
|
||||
{
|
||||
@@ -1775,6 +1795,7 @@ void AddSC_paladin_spell_scripts()
|
||||
RegisterSpellScript(spell_pal_infusion_of_light);
|
||||
RegisterSpellScript(spell_pal_moment_of_glory);
|
||||
RegisterSpellScript(spell_pal_judgment);
|
||||
RegisterSpellScript(spell_pal_justicars_vengeance);
|
||||
RegisterSpellScript(spell_pal_holy_prism);
|
||||
RegisterSpellScript(spell_pal_holy_prism_selector);
|
||||
RegisterSpellScript(spell_pal_holy_shock);
|
||||
|
||||
Reference in New Issue
Block a user