From 74bdac7d9b3bfb3486e500f86d675dfed570ee0d Mon Sep 17 00:00:00 2001 From: Chomp Date: Mon, 2 Jun 2025 16:41:27 +0100 Subject: [PATCH] Fixed bug in `AddLootToCache` that was causing combined pool to not be hydrated --- .../SPTarkov.Server.Core/Services/BotLootCacheService.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Libraries/SPTarkov.Server.Core/Services/BotLootCacheService.cs b/Libraries/SPTarkov.Server.Core/Services/BotLootCacheService.cs index a810f6da..7a2ca6e9 100644 --- a/Libraries/SPTarkov.Server.Core/Services/BotLootCacheService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/BotLootCacheService.cs @@ -235,9 +235,10 @@ public class BotLootCacheService( break; } - // Add all items (if any) to combined pool (excluding secure) - if (itemPool.Count > 0 && containerType.Equals("securedcontainer", StringComparison.OrdinalIgnoreCase)) + // If pool has items and items were going into a non-secure container pool, add to combined + if (itemPool.Count > 0 && !containerType.Equals("securedcontainer", StringComparison.OrdinalIgnoreCase)) { + // fill up 'combined' pool of all loot AddItemsToPool(combinedLootPool, itemPool); } }