fix(Core/Crashfix): Add nullptr checks for Blood Draining enchant (#8778)

This commit is contained in:
Nefertumm
2021-10-28 06:23:29 -03:00
committed by GitHub
parent a6cbe8aa57
commit 7c363c9040

View File

@@ -1310,8 +1310,10 @@ public:
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
if ((eventInfo.GetActionTarget()->GetHealth() - eventInfo.GetDamageInfo()->GetDamage()) >= eventInfo.GetActionTarget()->CountPctFromMaxHealth(35))
if (!eventInfo.GetActionTarget() || !eventInfo.GetDamageInfo() || (eventInfo.GetActionTarget()->GetHealth() - eventInfo.GetDamageInfo()->GetDamage()) >= eventInfo.GetActionTarget()->CountPctFromMaxHealth(35))
{
return;
}
const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(64569 /*SPELL_BLOOD_RESERVE*/);
int32 basepoints = spellInfo->Effects[EFFECT_0].CalcValue() * this->GetStackAmount();