fix(Scripts/Spells): fix a crash with resto shaman's t10 chain heal procs (#8614)

This commit is contained in:
Skjalf
2021-10-19 03:48:33 -03:00
committed by GitHub
parent 328bc7c5bb
commit fa832e5da0

View File

@@ -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);
}