From 42f3e722f67fe88e3e5b319df30866bc7a275a8e Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Sun, 21 Feb 2021 11:23:17 +0100 Subject: [PATCH] Core/Spells: fixed a typo that caused Divine Aegis to absorb 0 damage in all cases and corrected proc behavior --- sql/updates/world/4.3.4/2021_02_21_00_world.sql | 1 + src/server/scripts/Spells/spell_priest.cpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 sql/updates/world/4.3.4/2021_02_21_00_world.sql diff --git a/sql/updates/world/4.3.4/2021_02_21_00_world.sql b/sql/updates/world/4.3.4/2021_02_21_00_world.sql new file mode 100644 index 00000000000..ee1238e6636 --- /dev/null +++ b/sql/updates/world/4.3.4/2021_02_21_00_world.sql @@ -0,0 +1 @@ +UPDATE `spell_proc` SET `HitMask`= 0, `SpellFamilyName`= 6 WHERE `SpellId`= -47509; diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 9ed91954ab9..19849eda9e7 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -276,7 +276,14 @@ class spell_pri_divine_aegis : public AuraScript bool CheckProc(ProcEventInfo& eventInfo) { - return eventInfo.GetProcTarget() != nullptr; + if (!eventInfo.GetProcTarget() || !eventInfo.GetSpellInfo()) + return false; + + // Prayer of Healing always triggers Divine Aegis + if (eventInfo.GetSpellInfo()->SpellFamilyFlags[0] & 0x200) + return true; + + return (eventInfo.GetHitMask() & PROC_HIT_CRITICAL); } void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) @@ -294,7 +301,7 @@ class spell_pri_divine_aegis : public AuraScript absorb = std::min(absorb, int32(CalculatePct(eventInfo.GetProcTarget()->GetMaxHealth(), 40))); - GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_PRIEST_DIVINE_AEGIS, CastSpellExtraArgs(aurEff).AddSpellBP0(SPELLVALUE_BASE_POINT0)); + GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_PRIEST_DIVINE_AEGIS, CastSpellExtraArgs(aurEff).AddSpellBP0(absorb)); } void Register() override