From ad9b2b0aba618d5e3dedac3643ed442f53015b5b Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Sat, 13 Mar 2021 12:07:19 +0100 Subject: [PATCH] Core/Spells: fixed Seal of Insight's mana gain bonus and moved heal formula to spell script for consistency --- sql/updates/world/4.3.4/2021_03_13_00_world.sql | 1 + src/server/scripts/Spells/spell_paladin.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 sql/updates/world/4.3.4/2021_03_13_00_world.sql diff --git a/sql/updates/world/4.3.4/2021_03_13_00_world.sql b/sql/updates/world/4.3.4/2021_03_13_00_world.sql new file mode 100644 index 00000000000..73188b3791c --- /dev/null +++ b/sql/updates/world/4.3.4/2021_03_13_00_world.sql @@ -0,0 +1 @@ +UPDATE `spell_bonus_data` SET `ap_bonus`= 0, `direct_bonus`= 0 WHERE `entry`= 20167; diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index e6bd49558c4..e4678eec344 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -1981,9 +1981,20 @@ class spell_pal_seal_of_insight : public AuraScript return (!eventInfo.GetSpellInfo() || !eventInfo.GetSpellInfo()->IsAffectingArea()); } + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) + { + PreventDefaultAction(); + Unit* target = GetTarget(); + int32 bp0 = CalculatePct(target->GetTotalAttackPowerValue(BASE_ATTACK), 15.f) + CalculatePct(target->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_HOLY), 15.f); + int32 bp1 = CalculatePct(target->GetCreateMana(), 4.f); + int32 spellId = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell; + target->CastSpell(target, spellId, CastSpellExtraArgs(aurEff).AddSpellBP0(bp0).AddSpellMod(SPELLVALUE_BASE_POINT1, bp1)); + } + void Register() override { DoCheckProc.Register(&spell_pal_seal_of_insight::CheckProc); + OnEffectProc.Register(&spell_pal_seal_of_insight::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); } };