diff --git a/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs index 654844c2..abf604e7 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs @@ -153,7 +153,7 @@ public class BotGeneratorHelper( if (itemTemplate?.Parent == BaseClasses.FLASHLIGHT) { // Get chance from botconfig for bot type - var lightLaserActiveChance = raidSettings.IsNightRaid + var lightLaserActiveChance = raidSettings?.IsNightRaid ?? false ? GetBotEquipmentSettingFromConfig(botRole, "lightIsActiveNightChancePercent", 50) : GetBotEquipmentSettingFromConfig(botRole, "lightIsActiveDayChancePercent", 25); itemProperties.Light = new UpdLight @@ -182,7 +182,7 @@ public class BotGeneratorHelper( if (itemTemplate?.Parent == BaseClasses.NIGHTVISION) { // Get chance from botconfig for bot type - var nvgActiveChance = raidSettings.IsNightRaid + var nvgActiveChance = raidSettings?.IsNightRaid ?? false ? GetBotEquipmentSettingFromConfig(botRole, "nvgIsActiveChanceNightPercent", 90) : GetBotEquipmentSettingFromConfig(botRole, "nvgIsActiveChanceDayPercent", 15); itemProperties.Togglable = new UpdTogglable