diff options
author | Ovahlord <dreadkiller@gmx.de> | 2025-01-26 15:50:26 +0100 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2025-01-26 15:56:28 +0100 |
commit | 59c61f7c153394998b4435b86accdc9ed48d9d3b (patch) | |
tree | 91d7f2df7b740bd4eb9447e7c8e33781aff5591d | |
parent | 3eb4ccc9a0b3d315d53c566455a748c7cf795ac2 (diff) |
Scripts/Spells: fixed Judgement of Truth damage bonus
-rw-r--r-- | sql/updates/world/cata_classic/2025_01_26_04_world.sql | 3 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sql/updates/world/cata_classic/2025_01_26_04_world.sql b/sql/updates/world/cata_classic/2025_01_26_04_world.sql new file mode 100644 index 00000000000..6ee232435f2 --- /dev/null +++ b/sql/updates/world/cata_classic/2025_01_26_04_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_pal_judgement_of_truth'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(31804, 'spell_pal_judgement_of_truth'); diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 47c66d47573..a9ccc832622 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -208,6 +208,22 @@ namespace Scripts::Spells::Paladin AfterEffectProc += AuraEffectProcFn(spell_pal_seal_of_truth::HandleMeleeProc, EFFECT_0, SPELL_AURA_DUMMY); } }; + + // 31804 - Judgement of Truth + class spell_pal_judgement_of_truth : public SpellScript + { + void CalculateDamage(SpellEffectInfo const& /*spellEffectInfo*/, Unit* victim, int32& /*damage*/, int32& flatMod, float& /*pctMod*/) + { + // Censure increases the damage of Judgement of Truth by 20% per stack + if (AuraEffect const* censureEffect = victim->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PALADIN, flag128(0x20000000), GetCaster()->GetGUID())) + AddPct(flatMod, 20.f * censureEffect->GetBase()->GetStackAmount()); + } + + void Register() override + { + CalcDamage += SpellCalcDamageFn(spell_pal_judgement_of_truth::CalculateDamage); + } + }; } void AddSC_paladin_spell_scripts() @@ -215,6 +231,7 @@ void AddSC_paladin_spell_scripts() using namespace Scripts::Spells::Paladin; RegisterSpellScript(spell_pal_judgement); RegisterSpellScript(spell_pal_judgement_of_righteousness); + RegisterSpellScript(spell_pal_judgement_of_truth); RegisterSpellScript(spell_pal_seal_of_justice); RegisterSpellScript(spell_pal_seal_of_righteousness); RegisterSpellScript(spell_pal_seal_of_truth); |