Updated FindAndReturnChildrenByItems to be an extension method

This commit is contained in:
Chomp
2025-06-28 11:58:50 +01:00
parent fed9f3dd46
commit a3dbd3176e
8 changed files with 43 additions and 36 deletions
@@ -1,4 +1,5 @@
using SPTarkov.DI.Annotations;
using SPTarkov.Server.Core.Extensions;
using SPTarkov.Server.Core.Helpers;
using SPTarkov.Server.Core.Models.Eft.Common;
using SPTarkov.Server.Core.Models.Eft.Common.Tables;
@@ -311,8 +312,7 @@ public class QuestController(
else
{
// Remove item with children
var toRemove = _itemHelper.FindAndReturnChildrenByItems(
pmcData.Inventory.Items,
var toRemove = pmcData.Inventory.Items.FindAndReturnChildrenByItems(
itemHandover.Id
);
var index = pmcData.Inventory.Items.Count;