From 43586a33cdf5d1d6f6a4f43dc20e0ba64bb34f8f Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 26 Aug 2015 16:20:56 -0400 Subject: [PATCH] Port PROX_AGGRO from EQMacEmu If this ability is set, the NPCs will continuously add things to their hate list while their engaged. If it's not set (default) they won't, which is what the vast majority of NPCs do on live. --- zone/aggro.cpp | 8 ++++++++ zone/common.h | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/zone/aggro.cpp b/zone/aggro.cpp index d1574dc50..78fab6758 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -285,6 +285,14 @@ bool Mob::CheckWillAggro(Mob *mob) { return(false); } + // 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)))) { + Log.Out(Logs::Moderate, Logs::Aggro, + "%s is in combat, and does not have prox_aggro, or does and is out of combat range with %s", + GetName(), mob->GetName()); + return false; + } + //im not sure I understand this.. //if I have an owner and it is not this mob, then I cannot //aggro this mob...??? diff --git a/zone/common.h b/zone/common.h index 0b875456b..7901d511e 100644 --- a/zone/common.h +++ b/zone/common.h @@ -138,7 +138,8 @@ enum { IGNORE_ROOT_AGGRO_RULES = 42, CASTING_RESIST_DIFF = 43, COUNTER_AVOID_DAMAGE = 44, - MAX_SPECIAL_ATTACK = 45 + PROX_AGGRO = 45, + MAX_SPECIAL_ATTACK = 46 }; typedef enum { //fear states