fix resurrect bug

This commit is contained in:
Yunfan Li
2023-07-15 14:12:39 +08:00
parent c781155df0
commit 3172175edf

View File

@@ -127,11 +127,10 @@ bool PartyMemberValue::IsTargetOfSpellCast(Player* target, SpellEntryPredicate &
if (spell && predicate.Check(spell->m_spellInfo)) if (spell && predicate.Check(spell->m_spellInfo))
{ {
ObjectGuid unitTarget = spell->m_targets.GetUnitTargetGUID(); ObjectGuid unitTarget = spell->m_targets.GetUnitTargetGUID();
if (unitTarget == targetGuid) if (unitTarget && unitTarget == targetGuid)
return true; return true;
ObjectGuid corpseTarget = spell->m_targets.GetCorpseTargetGUID(); ObjectGuid corpseTarget = spell->m_targets.GetCorpseTargetGUID();
if (corpseTarget == corpseGuid) if (corpseTarget && corpseTarget == corpseGuid)
return true; return true;
} }
} }