using System.Text.Json.Serialization; using Core.Annotations; using Core.Models.Eft.Common; using Core.Models.Eft.Common.Tables; using Core.Models.Eft.Inventory; using Core.Models.Eft.ItemEvent; using Core.Models.Spt.Config; using Core.Models.Spt.Inventory; namespace Core.Helpers; [Injectable] public class InventoryHelper { /// /// Add multiple items to player stash (assuming they all fit) /// /// Session id /// AddItemsDirectRequest request /// Player profile /// Client response object public void AddItemsToStash( string sessionId, AddItemsDirectRequest request, PmcData pmcData, ItemEventRouterResponse output) { throw new NotImplementedException(); } /// /// Add whatever is passed in request.itemWithModsToAdd into player inventory (if it fits) /// /// Session id /// AddItemDirect request /// Player profile /// Client response object public void AddItemToStash( string sessionId, AddItemDirectRequest request, PmcData pmcData, ItemEventRouterResponse output) { throw new NotImplementedException(); } /// /// Set FiR status for an item + its children /// /// An item /// Item was found in raid protected void SetFindInRaidStatusForItem(Item[] itemWithChildren, bool foundInRaid) { throw new NotImplementedException(); } /// /// Remove properties from a Upd object used by a trader/ragfair that are unnecessary to a player /// /// Object to update protected void RemoveTraderRagfairRelatedUpdProperties(Upd upd) { throw new NotImplementedException(); } /// /// Can all provided items be added into player inventory /// /// Player id /// Array of items with children to try and fit /// True all items fit public bool CanPlaceItemsInInventory(string sessionId, Item[][] itemsWithChildren) { throw new NotImplementedException(); } /// /// Do the provided items all fit into the grid /// /// Container grid to fit items into /// Items to try and fit into grid /// True all fit public bool CanPlaceItemsInContainer(int[][] containerFS2D, Item[][] itemsWithChildren) { throw new NotImplementedException(); } /// /// Does an item fit into a container grid /// /// Container grid /// Item to check fits /// True it fits public bool CanPlaceItemInContainer(int[][] containerFS2D, Item[] itemWithChildren) { throw new NotImplementedException(); } /// /// Find a free location inside a container to fit the item /// /// Container grid to add item to /// Item to add to grid /// Id of the container we're fitting item into /// Slot id value to use, default is "hideout" public void PlaceItemInContainer( int[][] containerFS2D, Item[] itemWithChildren, string containerId, string desiredSlotId = "hideout") { throw new NotImplementedException(); } /// /// Find a location to place an item into inventory and place it /// /// 2-dimensional representation of the container slots /// 2-dimensional representation of the sorting table slots /// Item to place with children /// Players inventory /// Should sorting table to be used if main stash has no space /// Output to send back to client protected void PlaceItemInInventory( int[][] stashFS2D, int[][] sortingTableFS2D, Item[] itemWithChildren, BotBaseInventory playerInventory, bool useSortingTable, ItemEventRouterResponse output) { throw new NotImplementedException(); } /// /// Handle Remove event /// Remove item from player inventory + insured items array /// Also deletes child items /// /// Profile to remove item from (pmc or scav) /// Items id to remove /// Session id /// OPTIONAL - ItemEventRouterResponse public void RemoveItem(PmcData profile, string itemId, string sessionId, ItemEventRouterResponse output = null) { throw new NotImplementedException(); } /// /// Delete desired item from a player profiles mail /// /// Session id /// Remove request /// OPTIONAL - ItemEventRouterResponse public void RemoveItemAndChildrenFromMailRewards(string sessionId, InventoryRemoveRequestData removeRequest, ItemEventRouterResponse output = null) { throw new NotImplementedException(); } /// /// Find item by id in player inventory and remove x of its count /// /// player profile /// Item id to decrement StackObjectsCount of /// Number of item to remove /// Session id /// ItemEventRouterResponse /// ItemEventRouterResponse public ItemEventRouterResponse RemoveItemByCount(PmcData pmcData, string itemId, int countToRemove, string sessionId, ItemEventRouterResponse output = null) { throw new NotImplementedException(); } /// /// Get the height and width of an item - can have children that alter size /// /// Item to get size of /// Items id to get size of /// /// [width, height] public List GetItemSize(string itemTpl, string itemId, List inventoryItems) { throw new NotImplementedException(); } /// /// Calculates the size of an item including attachments /// takes into account if item is folded /// /// Items template id /// Items id /// Hashmap of inventory items /// An array representing the [width, height] of the item protected List GetSizeByInventoryItemHash(string itemTpl, string itemId, InventoryItemHash inventoryItemHash) { throw new NotImplementedException(); } /// /// Get a blank two-dimensional representation of a container /// /// Horizontal size of container /// Vertical size of container /// Two-dimensional representation of container protected List> GetBlankContainerMap(int containerH, int containerY) { throw new NotImplementedException(); } /// /// Get a 2d mapping of a container with what grid slots are filled /// /// Horizontal size of container /// Vertical size of container /// Players inventory items /// Id of the container /// Two-dimensional representation of container public List> GetContainerMap(int containerH, int containerV, List itemList, string containerId) { throw new NotImplementedException(); } protected bool IsVertical(ItemLocation itemLocation) { throw new NotImplementedException(); } protected InventoryItemHash GetInventoryItemHash(List inventoryItems) { throw new NotImplementedException(); } /// /// Return the inventory that needs to be modified (scav/pmc etc) /// Changes made to result apply to character inventory /// Based on the item action, determine whose inventories we should be looking at for from and to. /// /// Item interaction request /// Session id / playerid /// OwnerInventoryItems with inventory of player/scav to adjust public OwnerInventoryItems GetOwnerInventoryItems( InventoryMoveRequestData request, string sessionId) { throw new NotImplementedException(); } /// /// Get a two dimensional array to represent stash slots /// 0 value = free, 1 = taken /// /// Player profile /// session id /// 2-dimensional array protected int[,] GetStashSlotMap(PmcData pmcData, string sessionID) { throw new NotImplementedException(); } /// /// Get a blank two-dimensional array representation of a container /// /// Container to get data for /// blank two-dimensional array public int[,] GetContainerSlotMap(string containerTpl) { throw new NotImplementedException(); } /// /// Get a two-dimensional array representation of the players sorting table /// /// Player profile /// two-dimensional array protected int[,] GetSortingTableSlotMap(PmcData pmcData) { throw new NotImplementedException(); } /// /// Get Players Stash Size /// /// Players id /// Dictionary of 2 values, horizontal and vertical stash size protected Dictionary GetPlayerStashSize(string sessionID) { throw new NotImplementedException(); } /// /// Get the players stash items tpl /// /// Player id /// Stash tpl protected string GetStashType(string sessionID) { throw new NotImplementedException(); } /// /// Internal helper function to transfer an item + children from one profile to another. /// /// Inventory of the source (can be non-player) /// Inventory of the destination /// Move request public void MoveItemToProfile(Item[] sourceItems, Item[] toItems, InventoryMoveRequestData request) { throw new NotImplementedException(); } /// /// Internal helper function to move item within the same profile. /// /// profile to edit /// /// client move request /// True if move was successful public (bool success, string errorMessage) MoveItemInternal( PmcData pmcData, Item[] inventoryItems, InventoryMoveRequestData moveRequest) { throw new NotImplementedException(); } /// /// Update fast panel bindings when an item is moved into a container that doesn't allow quick slot access /// /// Player profile /// item being moved protected void UpdateFastPanelBinding(PmcData pmcData, Item itemBeingMoved) { throw new NotImplementedException(); } /// /// Internal helper function to handle cartridges in inventory if any of them exist. /// protected void HandleCartridges(Item[] items, InventoryMoveRequestData request) { throw new NotImplementedException(); } /// /// Get details for how a random loot container should be handled, max rewards, possible reward tpls /// /// Container being opened /// Reward details public RewardDetails GetRandomLootContainerRewardDetails(string itemTpl) { throw new NotImplementedException(); } /// /// Get inventory configuration /// /// Inventory configuration public InventoryConfig GetInventoryConfig() { throw new NotImplementedException(); } /// /// Recursively checks if the given item is /// inside the stash, that is it has the stash as /// ancestor with slotId=hideout /// /// Player profile /// Item to look for /// True if item exists inside stash public bool IsItemInStash(PmcData pmcData, Item itemToCheck) { throw new NotImplementedException(); } public void ValidateInventoryUsesMongoIds(List itemsToValidate) { throw new NotImplementedException(); } /// /// Does the provided item have a root item with the provided id /// /// Profile with items /// Item to check /// Root item id to check for /// True when item has rootId, false when not public bool DoesItemHaveRootId(PmcData pmcData, Item item, string rootId) { throw new NotImplementedException(); } } public class InventoryItemHash { [JsonPropertyName("byItemId")] public Dictionary ByItemId { get; set; } [JsonPropertyName("byParentId")] public Dictionary> ByParentId { get; set; } }