From fa832e5da0b76764db03a83aa76c2e615752c1a2 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 19 Oct 2021 03:48:33 -0300 Subject: [PATCH] fix(Scripts/Spells): fix a crash with resto shaman's t10 chain heal procs (#8614) --- src/server/scripts/Spells/spell_shaman.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 7f7a7e62e..e58747dbe 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -154,7 +154,15 @@ public: uint32 triggered_spell_id = 70809; SpellInfo const* triggeredSpell = sSpellMgr->GetSpellInfo(triggered_spell_id); - int32 amount = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()) / triggeredSpell->GetMaxTicks(); + + HealInfo* healInfo = eventInfo.GetHealInfo(); + + if (!healInfo || !triggeredSpell) + { + return; + } + + int32 amount = CalculatePct(healInfo->GetHeal(), aurEff->GetAmount()) / triggeredSpell->GetMaxTicks(); eventInfo.GetProcTarget()->CastDelayedSpellWithPeriodicAmount(GetTarget(), triggered_spell_id, SPELL_AURA_PERIODIC_HEAL, amount, EFFECT_0); }