Core: Prohibit aggro on righclicking if not in range
This commit is contained in:
@@ -1424,7 +1424,7 @@ bool Creature::canStartAttack(Unit const* who, bool force) const
|
||||
if (!_IsTargetAcceptable(who))
|
||||
return false;
|
||||
|
||||
if (who->isInCombat())
|
||||
if (who->isInCombat() && IsWithinDist(who, ATTACK_DISTANCE))
|
||||
if (Unit* victim = who->getAttackerForHelper())
|
||||
if (IsWithinDistInMap(victim, sWorld->getFloatConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS)))
|
||||
force = true;
|
||||
|
||||
Reference in New Issue
Block a user