From 27659d11a39baab77f969f50f6b3c99e64cd6953 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 1 Nov 2021 09:28:35 -0300 Subject: [PATCH] fix(Scripts/Spells): Blessing of Ancient Kings crash (#8871) --- src/server/scripts/Spells/spell_item.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index ba5088350..f14f6f15e 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1869,7 +1869,13 @@ public: { PreventDefaultAction(); - int32 absorb = int32(CalculatePct(eventInfo.GetHealInfo()->GetHeal(), 15.0f)); + HealInfo* healInfo = eventInfo.GetHealInfo(); + if (!healInfo) + { + return; + } + + int32 absorb = int32(CalculatePct(healInfo->GetHeal(), 15.0f)); // xinef: all heals contribute to one bubble if (AuraEffect* protEff = eventInfo.GetProcTarget()->GetAuraEffect(SPELL_PROTECTION_OF_ANCIENT_KINGS, 0/*, eventInfo.GetActor()->GetGUID()*/)) {