fix(Core/Spells): add several missing null checks for the DamageInfo struct to fix a crash - Part II. (#8376)

This commit is contained in:
UltraNix
2021-10-10 15:56:42 +02:00
committed by GitHub
parent 760e043116
commit 66809383d1
13 changed files with 48 additions and 41 deletions

View File

@@ -1120,13 +1120,13 @@ public:
bool CheckProc(ProcEventInfo& eventInfo)
{
return eventInfo.GetDamageInfo()->GetSpellInfo();
return eventInfo.GetSpellInfo();
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
int32 mana = eventInfo.GetDamageInfo()->GetSpellInfo()->CalcPowerCost(GetTarget(), eventInfo.GetSchoolMask());
int32 mana = eventInfo.GetSpellInfo()->CalcPowerCost(GetTarget(), eventInfo.GetSchoolMask());
int32 damage = CalculatePct(mana, 35);
GetTarget()->CastCustomSpell(SPELL_SHAMAN_ITEM_MANA_SURGE, SPELLVALUE_BASE_POINT0, damage, GetTarget(), true, nullptr, aurEff);