mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Add rule Aggro:NPCAggroMaxDistanceEnabled - enabled by default
If enabled, NPC's will drop aggro beyond 600 units or what is defined at the zone level
This commit is contained in:
+5
-1
@@ -487,6 +487,10 @@ void Mob::AI_Start(uint32 iMoveDelay) {
|
||||
AI_feign_remember_timer = std::unique_ptr<Timer>(new Timer(AIfeignremember_delay));
|
||||
AI_scan_door_open_timer = std::unique_ptr<Timer>(new Timer(AI_scan_door_open_interval));
|
||||
|
||||
if(!RuleB(Aggro, NPCAggroMaxDistanceEnabled)) {
|
||||
hate_list_cleanup_timer.Disable();
|
||||
}
|
||||
|
||||
if (CastToNPC()->WillAggroNPCs())
|
||||
AI_scan_area_timer = std::unique_ptr<Timer>(new Timer(RandomTimer(RuleI(NPC, NPCToNPCAggroTimerMin), RuleI(NPC, NPCToNPCAggroTimerMax))));
|
||||
|
||||
@@ -1163,7 +1167,7 @@ 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 (hate_list_cleanup_timer.Check()) {
|
||||
hate_list.RemoveStaleEntries(600000, 600.0f);
|
||||
if (hate_list.IsHateListEmpty()) {
|
||||
AI_Event_NoLongerEngaged();
|
||||
|
||||
Reference in New Issue
Block a user