diff --git a/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs index a1f1d1c4..78baec81 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs @@ -53,6 +53,8 @@ public class BotInventoryGenerator( EquipmentSlots.Earpiece ]; + private readonly HashSet _slotsToCheck = [EquipmentSlots.Pockets.ToString(), EquipmentSlots.SecuredContainer.ToString()]; + /// /// Add equipment/weapons/loot to bot /// @@ -457,8 +459,7 @@ public class BotInventoryGenerator( /// true when item added public bool GenerateEquipment(GenerateEquipmentProperties settings) { - HashSet slotsToCheck = [EquipmentSlots.Pockets.ToString(), EquipmentSlots.SecuredContainer.ToString()]; - double? spawnChance = slotsToCheck.Contains(settings.RootEquipmentSlot.ToString()) + double? spawnChance = _slotsToCheck.Contains(settings.RootEquipmentSlot.ToString()) ? 100 : settings.SpawnChances.EquipmentChances.GetValueOrDefault(settings.RootEquipmentSlot.ToString());