Core/Auras: Fixed crashes in Infusion of Light and Frozen Power proc handlers
Closes #3271 & #3272
This commit is contained in:
@@ -7271,6 +7271,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
|||||||
// Frozen Power
|
// Frozen Power
|
||||||
if (dummySpell->SpellIconID == 3780)
|
if (dummySpell->SpellIconID == 3780)
|
||||||
{
|
{
|
||||||
|
if (!target)
|
||||||
|
return false;
|
||||||
if (GetDistance(target) < 15.0f)
|
if (GetDistance(target) < 15.0f)
|
||||||
return false;
|
return false;
|
||||||
float chance = (float)triggerAmount;
|
float chance = (float)triggerAmount;
|
||||||
@@ -7943,7 +7945,7 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp
|
|||||||
if (procSpell->SpellFamilyFlags[0] & 0x40000000 && procSpell->SpellIconID == 242)
|
if (procSpell->SpellFamilyFlags[0] & 0x40000000 && procSpell->SpellIconID == 242)
|
||||||
{
|
{
|
||||||
*handled = true;
|
*handled = true;
|
||||||
if (victim->HasAura(53601))
|
if (victim && victim->HasAura(53601))
|
||||||
{
|
{
|
||||||
int32 bp0 = CalculatePctN(int32(damage / 12), dummySpell->Effects[EFFECT_2]. CalcValue());
|
int32 bp0 = CalculatePctN(int32(damage / 12), dummySpell->Effects[EFFECT_2]. CalcValue());
|
||||||
// Item - Paladin T9 Holy 4P Bonus
|
// Item - Paladin T9 Holy 4P Bonus
|
||||||
|
|||||||
Reference in New Issue
Block a user