mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Entities: add missing null pointer checks in HandleProcTriggerSpell. CID 1356245 (#17629)
This commit is contained in:
@@ -7872,7 +7872,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
case 53232:
|
||||
{
|
||||
// This effect only from Rapid Fire (ability cast)
|
||||
if (!(procSpell->SpellFamilyFlags[0] & 0x20))
|
||||
if (!procSpell || !(procSpell->SpellFamilyFlags[0] & 0x20))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
@@ -7890,7 +7890,9 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
case 15337: // Improved Spirit Tap (Rank 1)
|
||||
case 15338: // Improved Spirit Tap (Rank 2)
|
||||
{
|
||||
ASSERT(procSpell);
|
||||
if (!procSpell)
|
||||
return false;
|
||||
|
||||
if (procSpell->SpellFamilyFlags[0] & 0x800000)
|
||||
if ((procSpell->Id != 58381) || !roll_chance_i(50))
|
||||
return false;
|
||||
@@ -8066,7 +8068,7 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
// Astral Shift
|
||||
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;
|
||||
|
||||
// Need stun, fear or silence mechanic
|
||||
@@ -8118,13 +8120,15 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
case 65081:
|
||||
{
|
||||
// Proc only from PW:S cast
|
||||
if (!(procSpell->SpellFamilyFlags[0] & 0x00000001))
|
||||
if (!procSpell || !(procSpell->SpellFamilyFlags[0] & 0x00000001))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
// Culling the Herd
|
||||
case 70893:
|
||||
{
|
||||
if (!procSpell)
|
||||
return false;
|
||||
// check if we're doing a critical hit
|
||||
if (!(procSpell->SpellFamilyFlags[1] & 0x10000000) && (procEx != PROC_EX_CRITICAL_HIT))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user