Fix distance forget aggro drop not triggering events

This commit is contained in:
Michael Cook (mackal) 2018-02-04 13:23:47 -05:00
parent 85bafecc93
commit c5c93bb2e6

View File

@ -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())