From c7b6868092d12989e82dcddf694795815203ab1f Mon Sep 17 00:00:00 2001 From: Chomp Date: Mon, 2 Jun 2025 11:42:48 +0100 Subject: [PATCH] Allow bot generation without raid config data --- .../SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs index 8a65ab5a..295397cd 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/BotInventoryGenerator.cs @@ -74,7 +74,7 @@ public class BotInventoryGenerator( var botInventory = GenerateInventoryBase(); // Get generated raid details bot will be spawned in - var raidConfig = _profileActivityService.GetProfileActivityRaidData(sessionId).RaidConfiguration; + var raidConfig = _profileActivityService.GetProfileActivityRaidData(sessionId)?.RaidConfiguration; GenerateAndAddEquipmentToBot( sessionId, @@ -178,7 +178,7 @@ public class BotInventoryGenerator( /// Game version for bot, only really applies for PMCs /// RadiConfig public void GenerateAndAddEquipmentToBot(string sessionId, BotTypeInventory templateInventory, Chances wornItemChances, string botRole, - BotBaseInventory botInventory, int botLevel, string chosenGameVersion, bool isPmc, GetRaidConfigurationRequestData raidConfig) + BotBaseInventory botInventory, int botLevel, string chosenGameVersion, bool isPmc, GetRaidConfigurationRequestData? raidConfig) { _botConfig.Equipment.TryGetValue(_botGeneratorHelper.GetBotEquipmentRole(botRole), out var botEquipConfig); var randomistionDetails = _botHelper.GetBotRandomizationDetails(botLevel, botEquipConfig);