From e1fa2d5bc5d318a236a47a22ea17b650fbf24315 Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Mon, 4 Dec 2023 19:05:16 -0500 Subject: [PATCH] [Bug Fix] Fix Swarm Pets Requiring NPC Aggros Flag (#3738) # Notes - https://github.com/EQEmu/Server/pull/3595 made swarm pets require the `npc_aggro` flag to be set to attack. --- 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 5995ba6a7..a1c0b6837 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1062,10 +1062,15 @@ void Mob::AI_Process() { SetTarget(hate_list.GetClosestEntOnHateList(this)); else { if (AI_target_check_timer->Check()) { - if (IsNPC() && (!IsPet() || (HasOwner() && GetOwner()->IsNPC())) && !CastToNPC()->WillAggroNPCs()) { + if ( + IsNPC() && + !CastToNPC()->GetSwarmInfo() && + (!IsPet() || (HasOwner() && GetOwner()->IsNPC())) && + !CastToNPC()->WillAggroNPCs() + ) { WipeHateList(true); // wipe NPCs from hate list to prevent faction war } - + if (IsFocused()) { if (!target) { SetTarget(hate_list.GetEntWithMostHateOnList(this)); @@ -1293,7 +1298,7 @@ void Mob::AI_Process() { if (cur > 0) { opts.range_percent = cur; } - + AreaRampage(&opts); specialed = true; }