From c5c93bb2e61030dafa9da19c5a1daefe0fe4391a Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 4 Feb 2018 13:23:47 -0500 Subject: [PATCH] Fix distance forget aggro drop not triggering events --- zone/mob_ai.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 384f09932..9db5b2577 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1042,8 +1042,15 @@ void Mob::AI_Process() { // NPCs will forget people after 10 mins of not interacting with them or out of range // both of these maybe zone specific, hardcoded for now - if (mHateListCleanup.Check()) + if (mHateListCleanup.Check()) { hate_list.RemoveStaleEntries(600000, 600.0f); + if (hate_list.IsHateListEmpty()) { + AI_Event_NoLongerEngaged(); + zone->DelAggroMob(); + if (IsNPC() && !RuleB(Aggro, AllowTickPulling)) + ResetAssistCap(); + } + } // we are prevented from getting here if we are blind and don't have a target in range // from above, so no extra blind checks needed if ((IsRooted() && !GetSpecialAbility(IGNORE_ROOT_AGGRO_RULES)) || IsBlind())