[Aggro] Rooted mobs will add other hated targets to Hate list (#2180)

This commit is contained in:
Paul Coene 2022-05-27 09:37:55 -04:00 committed by GitHub
parent 25addc3bd9
commit 14f48fcc93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -456,7 +456,12 @@ bool Mob::CheckWillAggro(Mob *mob) {
} }
// Don't aggro new clients if we are already engaged unless PROX_AGGRO is set // Don't aggro new clients if we are already engaged unless PROX_AGGRO is set
if (IsEngaged() && (!GetSpecialAbility(PROX_AGGRO) || (GetSpecialAbility(PROX_AGGRO) && !CombatRange(mob)))) {
// Frustrated mobs (all rooted up with no one to kill)
// will engage without PROX_AGGRO ability if someone new is close now.
bool is_frustrated = (IsRooted() && !CombatRange(target));
if (!is_frustrated && IsEngaged() && (!GetSpecialAbility(PROX_AGGRO) || (GetSpecialAbility(PROX_AGGRO) && !CombatRange(mob)))) {
LogAggro( LogAggro(
"[{}] is in combat, and does not have prox_aggro, or does and is out of combat range with [{}]", "[{}] is in combat, and does not have prox_aggro, or does and is out of combat range with [{}]",
GetName(), GetName(),