diff --git a/Libraries/SPTarkov.Server.Core/Helpers/ItemHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/ItemHelper.cs index 335bc215..5ac6e56c 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/ItemHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/ItemHelper.cs @@ -1357,17 +1357,18 @@ public class ItemHelper( return currentItem; } - /** - * Determines if an item is an attachment that is currently attached to its parent item. - * - * @param item The item to check. - * @returns true if the item is attached attachment, otherwise false. - */ + /// + /// Determines if an item is an attachment that is currently attached to its parent item + /// + /// The item to check + /// true if the item is attached attachment, otherwise false public bool IsAttachmentAttached(Item item) { HashSet check = ["hideout", "main"]; - return !(check.Contains(item.SlotId) || _slotsAsStrings.Contains(item.SlotId) || int.TryParse(item.SlotId, out _)); + return !(check.Contains(item.SlotId) // Is root item + || _slotsAsStrings.Contains(item.SlotId) // Is root item in equipment slot e.g. `Headwear` + || int.TryParse(item.SlotId, out _)); // Has int as slotId, is inside container. e.g. cartridges } /**