diff options
-rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 9f73e458080..4866410d978 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -1822,11 +1822,6 @@ bool Creature::CanStartAttack(Unit const* who, bool force) const if (!_IsTargetAcceptable(who)) return false; - if (who->IsEngaged() && IsWithinDist(who, ATTACK_DISTANCE)) - if (Unit* victim = who->getAttackerForHelper()) - if (IsWithinDistInMap(victim, sWorld->getFloatConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS))) - force = true; - if (!force && (IsNeutralToAll() || !IsWithinDistInMap(who, GetAttackDistance(who) + m_CombatDistance))) return false; } @@ -2364,16 +2359,10 @@ bool Creature::_IsTargetAcceptable(Unit const* target) const return false; } - Unit const* targetVictim = target->getAttackerForHelper(); - // if I'm already fighting target, or I'm hostile towards the target, the target is acceptable if (IsEngagedBy(target) || IsHostileTo(target)) return true; - // if the target's victim is friendly, and the target is neutral, the target is acceptable - if (targetVictim && IsFriendlyTo(targetVictim)) - return true; - // if the target's victim is not friendly, or the target is friendly, the target is not acceptable return false; } |