fix(Core/Spells): possible crashes within class spells (#9168)
This commit is contained in:
parent
92b3617f63
commit
61c7488698
9 changed files with 66 additions and 25 deletions
|
|
@ -444,7 +444,7 @@ class spell_dk_improved_blood_presence_proc : public AuraScript
|
|||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
return eventInfo.GetDamageInfo()->GetDamage();
|
||||
return eventInfo.GetDamageInfo() && eventInfo.GetDamageInfo()->GetDamage();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
|
@ -461,7 +461,7 @@ class spell_dk_wandering_plague_aura : public AuraScript
|
|||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
|
||||
if (!spellInfo || !eventInfo.GetActionTarget() || !eventInfo.GetDamageInfo())
|
||||
if (!spellInfo || !eventInfo.GetActionTarget() || !eventInfo.GetDamageInfo() || !eventInfo.GetActor())
|
||||
return false;
|
||||
|
||||
if (!roll_chance_f(eventInfo.GetActor()->GetUnitCriticalChance(BASE_ATTACK, eventInfo.GetActionTarget())))
|
||||
|
|
@ -548,7 +548,7 @@ class spell_dk_blood_caked_blade : public AuraScript
|
|||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
return eventInfo.GetActionTarget() && eventInfo.GetActionTarget()->IsAlive();
|
||||
return eventInfo.GetActionTarget() && eventInfo.GetActionTarget()->IsAlive() && eventInfo.GetActor();
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue