From 3cb24e19d90c391523c5f3081d2089c8bb1e7ec4 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Fri, 16 Dec 2016 15:30:52 +0100 Subject: [PATCH] Stop killing trade bots --- ArchiSteamFarm/CardsFarmer.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ArchiSteamFarm/CardsFarmer.cs b/ArchiSteamFarm/CardsFarmer.cs index de16d677e..63158aa20 100755 --- a/ArchiSteamFarm/CardsFarmer.cs +++ b/ArchiSteamFarm/CardsFarmer.cs @@ -36,6 +36,8 @@ namespace ArchiSteamFarm { internal sealed class CardsFarmer : IDisposable { internal const byte MaxGamesPlayedConcurrently = 32; // This is limit introduced by Steam Network + private static readonly HashSet UntrustedAppIDs = new HashSet { 440, 570, 730 }; + [JsonProperty] internal readonly ConcurrentHashSet CurrentGamesFarming = new ConcurrentHashSet(); @@ -356,8 +358,12 @@ namespace ArchiSteamFarm { // Normally we'd trust this information and simply skip the rest // However, Steam is so fucked up that we can't simply assume that it's correct // It's entirely possible that actual game page has different info, and badge page lied to us - // To save us on extra work, check cards earned so far first + // We can't check every single game though, as this will literally kill people with cards from games they don't own + if (!UntrustedAppIDs.Contains(appID)) { + continue; + } + // To save us on extra work, check cards earned so far first HtmlNode cardsEarnedNode = htmlNode.SelectSingleNode(".//div[@class='card_drop_info_header']"); string cardsEarnedText = cardsEarnedNode.InnerText; if (string.IsNullOrEmpty(cardsEarnedText)) {