Converted FindAndReturnChildrenAsItems into extension method

This commit is contained in:
Chomp
2025-06-28 12:38:34 +01:00
parent 00610acefe
commit 42e79c981b
16 changed files with 82 additions and 121 deletions
@@ -1,4 +1,5 @@
using SPTarkov.DI.Annotations;
using SPTarkov.Server.Core.Extensions;
using SPTarkov.Server.Core.Generators;
using SPTarkov.Server.Core.Helpers;
using SPTarkov.Server.Core.Models.Eft.Common;
@@ -310,8 +311,7 @@ public class ProfileController(
foreach (var rootItems in hideoutRootItems)
{
// Check each root items for children and add
var itemWithChildren = _itemHelper.FindAndReturnChildrenAsItems(
profileToViewPmc.Inventory.Items,
var itemWithChildren = profileToViewPmc.Inventory.Items.FindAndReturnChildrenAsItems(
rootItems.Id
);
itemsToReturn.AddRange(itemWithChildren);