[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.
This commit is contained in:
Alex King
2023-12-04 19:05:16 -05:00
committed by GitHub
parent b03f52de18
commit e1fa2d5bc5
+6 -1
View File
@@ -1062,7 +1062,12 @@ 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
}