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.
This commit is contained in:
JustArchi
2018-03-01 00:24:38 +01:00
parent 5990fac6ee
commit adbc6809c8

View File

@@ -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);
}
}