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
|
|
@ -150,7 +150,7 @@ class spell_warr_improved_spell_reflection : public AuraScript
|
|||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
return eventInfo.GetSpellInfo() && eventInfo.GetSpellInfo()->Id == SPELL_WARRIOR_SPELL_REFLECTION;
|
||||
return eventInfo.GetSpellInfo() && eventInfo.GetActor() && eventInfo.GetSpellInfo()->Id == SPELL_WARRIOR_SPELL_REFLECTION;
|
||||
}
|
||||
|
||||
void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
|
|
@ -623,6 +623,11 @@ class spell_warr_sweeping_strikes : public AuraScript
|
|||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (!eventInfo.GetActor() || eventInfo.GetProcTarget())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
_procTarget = eventInfo.GetActor()->SelectNearbyNoTotemTarget(eventInfo.GetProcTarget());
|
||||
|
||||
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
|
||||
|
|
@ -801,6 +806,11 @@ class spell_warr_retaliation : public AuraScript
|
|||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (!eventInfo.GetActor() || !eventInfo.GetProcTarget())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// check attack comes not from behind and warrior is not stunned
|
||||
return GetTarget()->isInFront(eventInfo.GetActor(), M_PI) && !GetTarget()->HasUnitState(UNIT_STATE_STUNNED);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue