diff --git a/Libraries/SPTarkov.Server.Assets/SPT_Data/database/locales/server/en.json b/Libraries/SPTarkov.Server.Assets/SPT_Data/database/locales/server/en.json index 569201ce..d84229c4 100644 --- a/Libraries/SPTarkov.Server.Assets/SPT_Data/database/locales/server/en.json +++ b/Libraries/SPTarkov.Server.Assets/SPT_Data/database/locales/server/en.json @@ -110,7 +110,6 @@ "importing_database": "Importing database...", "importing_database_finish": "Database import finished", "importing_spt_configs": "Importing configs...", - "item-helper_no_items_for_barter": "No items found for barter Id: %s", "inraid-missing_standing_for_kill": "Standing for kill not found for {{victimSide}}:{{victimRole}}", "inraid-no_profile_found": "Unable to add player. No profile found with an Id of: %s", "inraid-taskconditioncounter_keys_differ": "TaskConditionCounters: {{key}} value is different post raid, original: ${oldValue} new: ${newValue}", @@ -154,6 +153,7 @@ "inventory-unable_to_toggle_item_not_found": "Unable to toggle inventory item with id: %s, item not found", "item-durability_value_invalid_use_default": "getRepairableItemQualityValue() weapon tpl: %s durability value is invalid, defaulting to 1", "item-invalid_tpl_item": "Unable to find an item with tpl of: %s in Db", + "item-helper_no_items_for_barter": "No items found for barter Id: %s", "launcher-missing_property": "Profile: %s is missing a descriptionLocaleKey property", "launcher-profile-edgeofdarkness": "Same as Prepare To Escape plus; larger stash size (10x68), extra equipment/items, higher starting reputation with traders, 1000 dollars, 500 euros", "launcher-profile-tournament": "Has a tournament secure container and ER Fulcrum Bayonet melee weapon. Flea and fence blacklisted. All Ragman clothing unlocked. Send code 'TOURNAMENTGIFT' to SPT on friend list to unlock all profile functionality.", diff --git a/Libraries/SPTarkov.Server.Core/Helpers/ItemHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/ItemHelper.cs index 0ff7875f..108203cf 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/ItemHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/ItemHelper.cs @@ -902,11 +902,11 @@ public class ItemHelper( List matchingItems = []; foreach (var barterId in desiredBarterItemIds) { - var filterResult = itemsToSearch.Where(item => + var filteredResult = itemsToSearch.Where(item => by == "tpl" ? item.Template.Equals(barterId) : item.Id.Equals(barterId) ); - if (!filterResult.Any()) + if (!filteredResult.Any()) { logger.Warning( serverLocalisationService.GetText("item-helper_no_items_for_barter", barterId) @@ -914,7 +914,7 @@ public class ItemHelper( continue; } - matchingItems.AddRange(filterResult); + matchingItems.AddRange(filteredResult); } return matchingItems;