From adbc6809c82365227cd577ad680e0d0df34b3423 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Thu, 1 Mar 2018 00:24:38 +0100 Subject: [PATCH] Fix trading logic in terms of trade holds Previously user with trade hold could have his trade rejected even if he asked only for backgrounds/emoticons from Steam sale badge, which is wrong - we want only cards for this logic. --- ArchiSteamFarm/Trading.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArchiSteamFarm/Trading.cs b/ArchiSteamFarm/Trading.cs index 03da468ef..67c1f148c 100644 --- a/ArchiSteamFarm/Trading.cs +++ b/ArchiSteamFarm/Trading.cs @@ -286,7 +286,7 @@ namespace ArchiSteamFarm { // If user has a trade hold, we add extra logic if (holdDuration.Value > 0) { // If trade hold duration exceeds our max, or user asks for cards with short lifespan, reject the trade - if ((holdDuration.Value > Program.GlobalConfig.MaxTradeHoldDuration) || tradeOffer.ItemsToGive.Any(item => GlobalConfig.SalesBlacklist.Contains(item.RealAppID))) { + if ((holdDuration.Value > Program.GlobalConfig.MaxTradeHoldDuration) || tradeOffer.ItemsToGive.Any(item => ((item.Type == Steam.Asset.EType.FoilTradingCard) || (item.Type == Steam.Asset.EType.TradingCard)) && GlobalConfig.SalesBlacklist.Contains(item.RealAppID))) { return new ParseTradeResult(tradeOffer.TradeOfferID, ParseTradeResult.EResult.RejectedPermanently); } }