Core/Spells: Fixed a crash caused by Beacon of Light.
GroupReference sources should always be checked against NULL pointers.
This commit is contained in:
1 parent
608ed2cf1d
commit
42d606a81b
1 file changed
+17
-16
@@ -6637,7 +6637,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
return false;
|
||||
triggered_spell_id = 0;
|
||||
Unit* beaconTarget = NULL;
|
||||
if (this->GetTypeId() != TYPEID_PLAYER)
|
||||
if (GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
beaconTarget = triggeredByAura->GetBase()->GetCaster();
|
||||
if (beaconTarget == this || !(beaconTarget->GetAura(53563, victim->GetGUID())))
|
||||
@@ -6647,23 +6647,24 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
}
|
||||
else
|
||||
{ // Check Party/Raid Group
|
||||
if (Group *group = this->ToPlayer()->GetGroup())
|
||||
if (Group* group = ToPlayer()->GetGroup())
|
||||
{
|
||||
for (GroupReference *itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
{
|
||||
Player* Member = itr->getSource();
|
||||
|
||||
// check if it was heal by paladin which casted this beacon of light
|
||||
if (Member->GetAura(53563, victim->GetGUID()))
|
||||
if (Player* member = itr->getSource())
|
||||
{
|
||||
// do not proc when target of beacon of light is healed
|
||||
if (Member == this)
|
||||
return false;
|
||||
// check if it was heal by paladin which casted this beacon of light
|
||||
if (member->GetAura(53563, victim->GetGUID()))
|
||||
{
|
||||
// do not proc when target of beacon of light is healed
|
||||
if (member == this)
|
||||
return false;
|
||||
|
||||
beaconTarget = Member;
|
||||
basepoints0 = int32(damage);
|
||||
triggered_spell_id = procSpell->IsRankOf(sSpellMgr->GetSpellInfo(635)) ? 53652 : 53654;
|
||||
break;
|
||||
beaconTarget = member;
|
||||
basepoints0 = int32(damage);
|
||||
triggered_spell_id = procSpell->IsRankOf(sSpellMgr->GetSpellInfo(635)) ? 53652 : 53654;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6674,8 +6675,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
victim->CastCustomSpell(beaconTarget, triggered_spell_id, &basepoints0, NULL, NULL, true, 0, triggeredByAura);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
||||
return false;
|
||||
}
|
||||
// Judgements of the Wise
|
||||
if (dummySpell->SpellIconID == 3017)
|
||||
|
||||
Reference in new issue
Block a user