Core/Spells: resolved a couple cherrypick mistakes
This commit is contained in:
1 parent
86749679c8
commit
ec09a4830a
3 files changed
+5
-3
No files matched your search
@@ -3020,7 +3020,7 @@ bool WorldObject::IsValidAttackTarget(WorldObject const* target, SpellInfo const
|
||||
{
|
||||
Player const* player = playerAffectingAttacker ? playerAffectingAttacker : playerAffectingTarget;
|
||||
|
||||
if (Unit const* creature = playerAffectingAttacker ? target->ToUnit() : ToUnit())
|
||||
if (Unit const* creature = playerAffectingAttacker ? unitTarget : unit)
|
||||
{
|
||||
if (creature->IsContestedGuard() && player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP))
|
||||
return true;
|
||||
@@ -3040,7 +3040,6 @@ bool WorldObject::IsValidAttackTarget(WorldObject const* target, SpellInfo const
|
||||
if (creatureAttacker && (creatureAttacker->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT))
|
||||
return false;
|
||||
|
||||
|
||||
if (playerAffectingAttacker && playerAffectingTarget)
|
||||
if (playerAffectingAttacker->duel && playerAffectingAttacker->duel->opponent == playerAffectingTarget && playerAffectingAttacker->duel->startTime != 0)
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user