From f0d00a210d4ac968c4f6f8eb17651ccf70b2efb2 Mon Sep 17 00:00:00 2001 From: Chomp Date: Tue, 14 Jan 2025 22:55:27 +0000 Subject: [PATCH] Fixed `GetSkillsWithRandomisedProgressValue` error --- Core/Generators/BotGenerator.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/Generators/BotGenerator.cs b/Core/Generators/BotGenerator.cs index 5ca0ae21..e9337162 100644 --- a/Core/Generators/BotGenerator.cs +++ b/Core/Generators/BotGenerator.cs @@ -463,7 +463,7 @@ public class BotGenerator List tplsToRemove = []; foreach (var item in propValue) { - if (ItemFilterService.IsLootableItemBlacklisted(item.Key)) + if (_itemFilterService.IsLootableItemBlacklisted(item.Key)) { tplsToRemove.Add(item.Key); } @@ -677,10 +677,10 @@ public class BotGenerator /// Skills to randomise /// Are the skills 'common' skills /// Skills with randomised progress values as an array - public List GetSkillsWithRandomisedProgressValue(Dictionary skills, bool isCommonSkills) + public List GetSkillsWithRandomisedProgressValue(Dictionary? skills, bool isCommonSkills) { - if (!skills.Any()) - return new List(); + if (skills is null) + return []; return skills.Select(kvp => {