From de7e762211aa6a9fe26fc80eb449f85db6464117 Mon Sep 17 00:00:00 2001 From: Lacyway Date: Thu, 1 Aug 2024 20:15:50 +0000 Subject: [PATCH] Update AddEnemyToAllGroupsInBotZonePatch to latest code (!153) Was missing checks that now exist in the client, works as intended now from my testing. Please test and confirm as well. **Note**: I strongly believe that this patch is now redundant and can be removed, I am still testing to see if this is the case. Co-authored-by: Lacyway <20912169+Lacyway@users.noreply.github.com> Reviewed-on: https://dev.sp-tarkov.com/SPT/Modules/pulls/153 Co-authored-by: Lacyway Co-committed-by: Lacyway --- .../Patches/AddEnemyToAllGroupsInBotZonePatch.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/project/SPT.Custom/Patches/AddEnemyToAllGroupsInBotZonePatch.cs b/project/SPT.Custom/Patches/AddEnemyToAllGroupsInBotZonePatch.cs index f59fa52..52baccd 100644 --- a/project/SPT.Custom/Patches/AddEnemyToAllGroupsInBotZonePatch.cs +++ b/project/SPT.Custom/Patches/AddEnemyToAllGroupsInBotZonePatch.cs @@ -45,11 +45,14 @@ namespace SPT.Custom.Patches bool differentSide = aggressor.Side != group.Side; bool sameSide = aggressor.Side == target.Side; - if (!group.Enemies.ContainsKey(aggressor) + if (!group.HaveFollowTarget(aggressor) + && !group.Enemies.ContainsKey(aggressor) && (differentSide || !sameSide) && !group.HaveMemberWithRole(WildSpawnType.gifter) - && group.ShallRevengeFor(target) - ) + && !group.HaveMemberWithRole(WildSpawnType.sectantWarrior) + && !group.HaveMemberWithRole(WildSpawnType.sectantPriest) + && !group.InitialFileSettings.Boss.NOT_ADD_TO_ENEMY_ON_KILLS + && group.ShallRevengeFor(target)) { group.AddEnemy(aggressor, EBotEnemyCause.AddEnemyToAllGroupsInBotZone); }