fix location loot gen

This commit is contained in:
CWX
2025-01-25 00:33:17 +00:00
parent 0aa6ef2039
commit c81964ef26
3 changed files with 3 additions and 4 deletions
@@ -636,7 +636,7 @@ public class LocationLootGenerator(
// Positions not in forced but have 100% chance to spawn
List<Spawnpoint> guaranteedLoosePoints = [];
var blacklistedSpawnpoints = _locationConfig.LooseLootBlacklist[locationName];
var blacklistedSpawnpoints = _locationConfig.LooseLootBlacklist.GetValueOrDefault(locationName);
var spawnpointArray = new ProbabilityObjectArray<ProbabilityObject<string, Spawnpoint>, string, Spawnpoint>(_mathUtil, _cloner, []);
foreach (var spawnpoint in allDynamicSpawnpoints)
+2 -2
View File
@@ -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;
}
@@ -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
{