From 675efe3875c4b43d538d26156e73a7e4b4283317 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Thu, 13 Dec 2018 19:22:19 +0100 Subject: [PATCH] Add Steam winter sale 2018 to sales blacklist --- ArchiSteamFarm/CardsFarmer.cs | 4 +++- ArchiSteamFarm/GlobalConfig.cs | 2 -- ArchiSteamFarm/Trading.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ArchiSteamFarm/CardsFarmer.cs b/ArchiSteamFarm/CardsFarmer.cs index 96a03ec96..606345db5 100755 --- a/ArchiSteamFarm/CardsFarmer.cs +++ b/ArchiSteamFarm/CardsFarmer.cs @@ -44,6 +44,8 @@ namespace ArchiSteamFarm { private const byte ExtraFarmingDelaySeconds = 10; // In seconds, how much time to add on top of FarmingDelay (helps fighting misc time differences of Steam network) private const byte HoursToIgnore = 24; // How many hours we ignore unreleased appIDs and don't bother checking them again + internal static readonly ImmutableHashSet SalesBlacklist = ImmutableHashSet.Create(267420, 303700, 335590, 368020, 425280, 480730, 566020, 639900, 762800, 876740, 991980); + private static readonly ConcurrentDictionary IgnoredAppIDs = new ConcurrentDictionary(); // Reserved for unreleased games // Games that were confirmed to show false status on general badges page @@ -375,7 +377,7 @@ namespace ArchiSteamFarm { continue; } - if (GlobalConfig.SalesBlacklist.Contains(appID) || Program.GlobalConfig.Blacklist.Contains(appID) || Bot.IsBlacklistedFromIdling(appID) || (Bot.BotConfig.IdlePriorityQueueOnly && !Bot.IsPriorityIdling(appID))) { + if (SalesBlacklist.Contains(appID) || Program.GlobalConfig.Blacklist.Contains(appID) || Bot.IsBlacklistedFromIdling(appID) || (Bot.BotConfig.IdlePriorityQueueOnly && !Bot.IsPriorityIdling(appID))) { // We're configured to ignore this appID, so skip it continue; } diff --git a/ArchiSteamFarm/GlobalConfig.cs b/ArchiSteamFarm/GlobalConfig.cs index e88acac47..a1d212a83 100644 --- a/ArchiSteamFarm/GlobalConfig.cs +++ b/ArchiSteamFarm/GlobalConfig.cs @@ -62,8 +62,6 @@ namespace ArchiSteamFarm { private const string DefaultWebProxyText = null; private const string DefaultWebProxyUsername = null; - internal static readonly ImmutableHashSet SalesBlacklist = ImmutableHashSet.Create(267420, 303700, 335590, 368020, 425280, 480730, 566020, 639900, 762800, 876740); - private static readonly ImmutableHashSet DefaultBlacklist = ImmutableHashSet.Create(); private static readonly SemaphoreSlim WriteSemaphore = new SemaphoreSlim(1, 1); diff --git a/ArchiSteamFarm/Trading.cs b/ArchiSteamFarm/Trading.cs index 750def925..0999634d7 100644 --- a/ArchiSteamFarm/Trading.cs +++ b/ArchiSteamFarm/Trading.cs @@ -539,7 +539,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 => ((item.Type == Steam.Asset.EType.FoilTradingCard) || (item.Type == Steam.Asset.EType.TradingCard)) && 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)) && CardsFarmer.SalesBlacklist.Contains(item.RealAppID))) { return new ParseTradeResult(tradeOffer.TradeOfferID, ParseTradeResult.EResult.RejectedPermanently, tradeOffer.ItemsToReceive); } }