Pass correct mongo id as parameter

This commit is contained in:
Chomp
2025-07-03 16:37:45 +01:00
parent 4e2d4dc708
commit f2cebc4f88
3 changed files with 6 additions and 5 deletions
@@ -606,7 +606,7 @@ public class BotLootGenerator(
var itemAddedResult = _botGeneratorHelper.AddItemWithChildrenToEquipmentSlot(
equipmentSlots,
newRootItemId,
itemToAddTemplate?.Id,
itemToAddTemplate.Id,
itemWithChildrenToAdd,
inventoryToAddItemsTo,
containersIdFull
@@ -2,6 +2,7 @@ using System.Collections.Frozen;
using SPTarkov.DI.Annotations;
using SPTarkov.Server.Core.Constants;
using SPTarkov.Server.Core.Extensions;
using SPTarkov.Server.Core.Models.Common;
using SPTarkov.Server.Core.Models.Eft.Common.Tables;
using SPTarkov.Server.Core.Models.Enums;
using SPTarkov.Server.Core.Models.Spt.Bots;
@@ -595,15 +596,15 @@ public class BotGeneratorHelper(
/// </summary>
/// <param name="equipmentSlots">Slot to add item+children into</param>
/// <param name="rootItemId">Root item id to use as mod items parentId</param>
/// <param name="rootItemTplId">Root itms tpl id</param>
/// <param name="rootItemTplId">Root items tpl id</param>
/// <param name="itemWithChildren">Item to add</param>
/// <param name="inventory">Inventory to add item+children into</param>
/// <param name="containersIdFull"></param>
/// <returns>ItemAddedResult result object</returns>
public ItemAddedResult AddItemWithChildrenToEquipmentSlot(
HashSet<EquipmentSlots> equipmentSlots,
string rootItemId,
string? rootItemTplId,
MongoId rootItemId,
MongoId rootItemTplId,
List<Item> itemWithChildren,
BotBaseInventory inventory,
HashSet<string>? containersIdFull = null
@@ -668,7 +668,7 @@ public class InventoryHelper(
/// <param name="itemId">Items id to get size of</param>
/// <param name="inventoryItems"></param>
/// <returns>[width, height]</returns>
public (int, int) GetItemSize(string? itemTpl, string itemId, List<Item> inventoryItems)
public (int, int) GetItemSize(MongoId itemTpl, MongoId itemId, List<Item> inventoryItems)
{
// -> Prepares item Width and height returns [sizeX, sizeY]
return GetSizeByInventoryItemHash(itemTpl, itemId, GetInventoryItemHash(inventoryItems));