diff --git a/Libraries/SPTarkov.Server.Core/Services/BotLootCacheService.cs b/Libraries/SPTarkov.Server.Core/Services/BotLootCacheService.cs index c71c371e..870200e1 100644 --- a/Libraries/SPTarkov.Server.Core/Services/BotLootCacheService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/BotLootCacheService.cs @@ -447,6 +447,25 @@ public class BotLootCacheService( filteredVestItems[itemKvP.Key] = itemKvP.Value; } + // Get secure loot (excluding magazines, bullets) + var filteredSecureLoot = new Dictionary(); + foreach (var itemKvP in secureLootPool) + { + var itemResult = _itemHelper.GetItem(itemKvP.Key); + if (itemResult.Value is null) + { + continue; + } + + var itemTemplate = itemResult.Value; + if (IsBulletOrGrenade(itemTemplate.Properties) || IsMagazine(itemTemplate.Properties)) + { + continue; + } + + filteredSecureLoot[itemKvP.Key] = itemKvP.Value; + } + BotLootCache cacheForRole; lock (_lockObject) { @@ -464,7 +483,7 @@ public class BotLootCacheService( cacheForRole.BackpackLoot = filteredBackpackItems; cacheForRole.PocketLoot = filteredPocketItems; cacheForRole.VestLoot = filteredVestItems; - cacheForRole.SecureLoot = secureLootPool; + cacheForRole.SecureLoot = filteredSecureLoot; } }