mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
fix(Scripts/Spells): fix a crash with resto shaman's t10 chain heal procs (#8614)
This commit is contained in:
@@ -154,7 +154,15 @@ public:
|
|||||||
|
|
||||||
uint32 triggered_spell_id = 70809;
|
uint32 triggered_spell_id = 70809;
|
||||||
SpellInfo const* triggeredSpell = sSpellMgr->GetSpellInfo(triggered_spell_id);
|
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);
|
eventInfo.GetProcTarget()->CastDelayedSpellWithPeriodicAmount(GetTarget(), triggered_spell_id, SPELL_AURA_PERIODIC_HEAL, amount, EFFECT_0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user