fix(Core/Spells): add several missing null checks for the DamageInfo struct to fix a crash (#8322)

This commit is contained in:
Skjalf
2021-10-10 11:07:14 -03:00
committed by GitHub
parent 66809383d1
commit 1e57b6fb99
13 changed files with 146 additions and 22 deletions

View File

@@ -657,7 +657,15 @@ public:
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
int32 amount = aurEff->GetAmount() + eventInfo.GetDamageInfo()->GetDamage();
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
if (!damageInfo || !damageInfo->GetDamage())
{
return;
}
int32 amount = aurEff->GetAmount() + damageInfo->GetDamage();
uint8 num = amount / 15000;
if (amount >= 15000)