improve flea result filtering to allow weapon presets to show when searching for 1 build item but ignore presets when searching for mulitple

This commit is contained in:
Dev 2024-01-25 15:09:10 +00:00
parent 9b47c3b50e
commit e8013321ce

View File

@ -556,6 +556,14 @@ export class RagfairOfferHelper
return false;
}
// Filter out presets when search request has multiple buildItems
// Assuming 1 build item = single item e.g. gun
if (searchRequest.buildCount && this.presetHelper.hasPreset(offerRootItem._tpl) && Object.keys(searchRequest.buildItems).length > 1)
{
// Don't include preset offer
return false;
}
if (searchRequest.offerOwnerType === OfferOwnerType.TRADEROWNERTYPE && !isTraderOffer)
{
// don't include player offers