Updated GetItemRewardPool to ignore items from the db without a parent id when gathering blacklist

This commit is contained in:
Chomp
2025-05-30 09:24:43 +01:00
parent bd1326b708
commit d2e80d7b5d
@@ -232,6 +232,7 @@ public class LootGenerator(
// Get all items that match the blacklisted types and fold into item blacklist
var itemTypeBlacklist = _itemFilterService.GetItemRewardBaseTypeBlacklist();
var itemsMatchingTypeBlacklist = itemsDb
.Where(templateItem => !string.IsNullOrEmpty(templateItem.Parent)) // Ignore items without parents
.Where(templateItem => _itemHelper.IsOfBaseclasses(templateItem.Parent, itemTypeBlacklist))
.Select(templateItem => templateItem.Id);