fix(Core/Duel): Player during duel countdown is not a valid attack target. (#11509)
This commit is contained in:
@@ -9670,7 +9670,7 @@ ReputationRank Unit::GetReactionTo(Unit const* target, bool checkOriginalFaction
|
|||||||
return REP_FRIENDLY;
|
return REP_FRIENDLY;
|
||||||
|
|
||||||
// duel - always hostile to opponent
|
// duel - always hostile to opponent
|
||||||
if (selfPlayerOwner->duel && selfPlayerOwner->duel->Opponent == targetPlayerOwner && selfPlayerOwner->duel->StartTime != 0)
|
if (selfPlayerOwner->duel && selfPlayerOwner->duel->Opponent == targetPlayerOwner && selfPlayerOwner->duel->State == DUEL_STATE_IN_PROGRESS)
|
||||||
return REP_HOSTILE;
|
return REP_HOSTILE;
|
||||||
|
|
||||||
// same group - checks dependant only on our faction - skip FFA_PVP for example
|
// same group - checks dependant only on our faction - skip FFA_PVP for example
|
||||||
@@ -13334,7 +13334,7 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, Wo
|
|||||||
|
|
||||||
// check duel - before sanctuary checks
|
// check duel - before sanctuary checks
|
||||||
if (playerAffectingAttacker && playerAffectingTarget)
|
if (playerAffectingAttacker && playerAffectingTarget)
|
||||||
if (playerAffectingAttacker->duel && playerAffectingAttacker->duel->Opponent == playerAffectingTarget && playerAffectingAttacker->duel->StartTime != 0)
|
if (playerAffectingAttacker->duel && playerAffectingAttacker->duel->Opponent == playerAffectingTarget && playerAffectingAttacker->duel->State == DUEL_STATE_IN_PROGRESS)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// PvP case - can't attack when attacker or target are in sanctuary
|
// PvP case - can't attack when attacker or target are in sanctuary
|
||||||
|
|||||||
Reference in New Issue
Block a user