From 18bdd203dd45e9b7f7e67eebcbc49d662732e72f Mon Sep 17 00:00:00 2001 From: Chomp Date: Wed, 2 Jul 2025 10:56:39 +0100 Subject: [PATCH] Fixed invalid comparision of IDs --- .../Generators/LocationLootGenerator.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs index 70edfd3c..982e15e2 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs @@ -947,13 +947,15 @@ public class LocationLootGenerator( } // Get an array of allowed IDs after above filtering has occured - var validItemIds = spawnPoint.Template.Items.Select(item => item.Id).ToHashSet(); + var validComposedKeys = spawnPoint + .Template.Items.Select(item => item.ComposedKey) + .ToHashSet(); // Construct container to hold above filtered items, letting us pick an item for the spot var itemArray = new ProbabilityObjectArray(_cloner); foreach (var itemDist in spawnPoint.ItemDistribution) { - if (!validItemIds.Contains(itemDist.ComposedKey.Key)) + if (!validComposedKeys.Contains(itemDist.ComposedKey.Key)) { continue; }