From 27c8a85f6149a51984ba6054505ffc7b2b639a20 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 2 Nov 2015 23:23:04 -0600 Subject: [PATCH] Change AI_scan_area_timer to have a little variability in renewing a new timer time versus deciding one on spawn and sticking with it --- zone/mob_ai.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 6bde54d0a..25ed72441 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1364,9 +1364,14 @@ void Mob::AI_Process() { * */ - Mob* tmptar = entity_list.AICheckCloseAggro(this, GetAggroRange(), GetAssistRange()); - if (tmptar) - AddToHateList(tmptar); + Mob* temp_target = entity_list.AICheckCloseAggro(this, GetAggroRange(), GetAssistRange()); + if (temp_target){ + AddToHateList(temp_target); + } + + AI_scan_area_timer->Disable(); + AI_scan_area_timer->Start(RandomTimer(RuleI(NPC, NPCToNPCAggroTimerMin), RuleI(NPC, NPCToNPCAggroTimerMax)), false); + } else if (AI_movement_timer->Check() && !IsRooted()) {