diff --git a/Libraries/Core/Helpers/ItemHelper.cs b/Libraries/Core/Helpers/ItemHelper.cs index a597f205..d4a086dc 100644 --- a/Libraries/Core/Helpers/ItemHelper.cs +++ b/Libraries/Core/Helpers/ItemHelper.cs @@ -1822,7 +1822,7 @@ public class ItemHelper( foreach (var mod in itemWithChildren) { - if (idMappings[mod.Id] is null) + if (!idMappings.ContainsKey(mod.Id)) { idMappings[mod.Id] = _hashUtil.Generate(); } diff --git a/Libraries/Core/Helpers/RewardHelper.cs b/Libraries/Core/Helpers/RewardHelper.cs index 2797e193..96774892 100644 --- a/Libraries/Core/Helpers/RewardHelper.cs +++ b/Libraries/Core/Helpers/RewardHelper.cs @@ -218,6 +218,7 @@ namespace Core.Helpers pmcData.UnlockedInfo.UnlockedProductionRecipe.Add(matchingCraftId); if (response is not null) { + response.ProfileChanges[sessionID].RecipeUnlocked ??= new Dictionary(); response.ProfileChanges[sessionID].RecipeUnlocked[matchingCraftId] = true; } }