diff --git a/Libraries/Core/Generators/LocationLootGenerator.cs b/Libraries/Core/Generators/LocationLootGenerator.cs index 507494af..6bfe7314 100644 --- a/Libraries/Core/Generators/LocationLootGenerator.cs +++ b/Libraries/Core/Generators/LocationLootGenerator.cs @@ -636,7 +636,7 @@ public class LocationLootGenerator( // Positions not in forced but have 100% chance to spawn List guaranteedLoosePoints = []; - var blacklistedSpawnpoints = _locationConfig.LooseLootBlacklist[locationName]; + var blacklistedSpawnpoints = _locationConfig.LooseLootBlacklist.GetValueOrDefault(locationName); var spawnpointArray = new ProbabilityObjectArray, string, Spawnpoint>(_mathUtil, _cloner, []); foreach (var spawnpoint in allDynamicSpawnpoints) diff --git a/Libraries/Core/Helpers/ItemHelper.cs b/Libraries/Core/Helpers/ItemHelper.cs index dc011626..3d2f24c9 100644 --- a/Libraries/Core/Helpers/ItemHelper.cs +++ b/Libraries/Core/Helpers/ItemHelper.cs @@ -1431,11 +1431,11 @@ public class ItemHelper( chosenCaliber, staticAmmoDist, defaultCartridgeTpl, - weapon?.Properties?.Chambers[0]?.Props?.Filters[0]?.Filter + (weapon?.Properties?.Chambers?.FirstOrDefault()?.Props?.Filters?.FirstOrDefault()?.Filter) ?? null ); if (cartridgeTpl is null) { - _logger.Debug($"Unable to fill item: {magazine[0].Id} {magTemplate.Name} with cartridges, none found."); + _logger.Debug($"Unable to fill item: {magazine.FirstOrDefault().Id} {magTemplate.Name} with cartridges, none found."); return; } diff --git a/Libraries/Core/Services/LocationLifecycleService.cs b/Libraries/Core/Services/LocationLifecycleService.cs index e30c4a64..6cef2d0e 100644 --- a/Libraries/Core/Services/LocationLifecycleService.cs +++ b/Libraries/Core/Services/LocationLifecycleService.cs @@ -126,7 +126,6 @@ public class LocationLifecycleService _logger.Debug($"Starting: {request.Location}"); var playerProfile = _profileHelper.GetPmcProfile(sessionId); - GenerateLocationAndLoot(request.Location, !request.ShouldSkipLootGeneration ?? true); var result = new StartLocalRaidResponseData {