fix(Core/Entities): add missing nul pointer checks in HandleProcTrigger Spell (#9303)
This commit is contained in:
committed by
GitHub
parent
1ee5484882
commit
683b7ae1e2
@@ -8938,7 +8938,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
|||||||
case 53232:
|
case 53232:
|
||||||
{
|
{
|
||||||
// This effect only from Rapid Fire (ability cast)
|
// This effect only from Rapid Fire (ability cast)
|
||||||
if (!(procSpell->SpellFamilyFlags[0] & 0x20))
|
if (!procSpell || !(procSpell->SpellFamilyFlags[0] & 0x20))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -9214,7 +9214,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
|||||||
// Astral Shift
|
// Astral Shift
|
||||||
case 52179:
|
case 52179:
|
||||||
{
|
{
|
||||||
if (procSpell == 0 || !(procEx & (PROC_EX_NORMAL_HIT | PROC_EX_CRITICAL_HIT)) || this == victim)
|
if (!procSpell || !(procEx & (PROC_EX_NORMAL_HIT | PROC_EX_CRITICAL_HIT)) || this == victim)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Need stun, fear or silence mechanic
|
// Need stun, fear or silence mechanic
|
||||||
@@ -9249,13 +9249,17 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
|||||||
case 65081:
|
case 65081:
|
||||||
{
|
{
|
||||||
// Proc only from PW:S cast
|
// Proc only from PW:S cast
|
||||||
if (!(procSpell->SpellFamilyFlags[0] & 0x00000001))
|
if (!procSpell || !(procSpell->SpellFamilyFlags[0] & 0x00000001))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Culling the Herd
|
// Culling the Herd
|
||||||
case 70893:
|
case 70893:
|
||||||
{
|
{
|
||||||
|
if (!procSpell)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// check if we're doing a critical hit
|
// check if we're doing a critical hit
|
||||||
if (!(procSpell->SpellFamilyFlags[1] & 0x10000000) && (procEx != PROC_EX_CRITICAL_HIT))
|
if (!(procSpell->SpellFamilyFlags[1] & 0x10000000) && (procEx != PROC_EX_CRITICAL_HIT))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user