mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-07 15:28:02 +00:00
fix(Core/Combat): let asymmetric-faction aggressors engage friendly-back targets (#26194)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
@@ -59,7 +59,8 @@
|
||||
// ... both units must be allowed to enter combat
|
||||
if (a->IsCombatDisallowed() || b->IsCombatDisallowed())
|
||||
return false;
|
||||
if (a->IsFriendlyTo(b) || b->IsFriendlyTo(a))
|
||||
// ...not friendly, unless one side is hostile (asymmetric aggressor wins)
|
||||
if ((a->IsFriendlyTo(b) || b->IsFriendlyTo(a)) && !a->IsHostileTo(b) && !b->IsHostileTo(a))
|
||||
return false;
|
||||
Player const* playerA = a->GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||
Player const* playerB = b->GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||
|
||||
Reference in New Issue
Block a user