Add a timer to rate limit the hatelist check

This commit is contained in:
Michael Cook (mackal)
2018-01-18 15:54:53 -05:00
parent d8bbb428d8
commit e7ce79261d
3 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -1024,7 +1024,8 @@ 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
hate_list.RemoveStaleEntries(600000, 600.0f);
if (mHateListCleanup.Check())
hate_list.RemoveStaleEntries(600000, 600.0f);
// 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())