From b8f03abd8b087f1de82d56984a1f1b3e9eb89cf0 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Wed, 20 Apr 2016 23:48:33 +0200 Subject: [PATCH] Fix fuckups --- ArchiSteamFarm/Bot.cs | 2 +- ArchiSteamFarm/JSON/Steam.cs | 4 ++-- ArchiSteamFarm/Utilities.cs | 15 --------------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index 8f3d30e73..3cff64d22 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -95,7 +95,7 @@ namespace ArchiSteamFarm { return steamID == Program.GlobalConfig.SteamOwnerID; } - internal static bool IsValidCdKey(string key) { + private static bool IsValidCdKey(string key) { if (string.IsNullOrEmpty(key)) { return false; } diff --git a/ArchiSteamFarm/JSON/Steam.cs b/ArchiSteamFarm/JSON/Steam.cs index 54e5dbfa4..40f4c7198 100644 --- a/ArchiSteamFarm/JSON/Steam.cs +++ b/ArchiSteamFarm/JSON/Steam.cs @@ -272,7 +272,7 @@ namespace ArchiSteamFarm { Dictionary> ItemsToGivePerGame = new Dictionary>(); foreach (Item item in ItemsToGive) { Dictionary ItemsPerType; - if (ItemsToGivePerGame.TryGetValue(item.RealAppID, out ItemsPerType)) { + if (!ItemsToGivePerGame.TryGetValue(item.RealAppID, out ItemsPerType)) { ItemsPerType = new Dictionary(); ItemsPerType[item.Type] = item.Amount; ItemsToGivePerGame[item.RealAppID] = ItemsPerType; @@ -289,7 +289,7 @@ namespace ArchiSteamFarm { Dictionary> ItemsToReceivePerGame = new Dictionary>(); foreach (Item item in ItemsToReceive) { Dictionary ItemsPerType; - if (ItemsToReceivePerGame.TryGetValue(item.RealAppID, out ItemsPerType)) { + if (!ItemsToReceivePerGame.TryGetValue(item.RealAppID, out ItemsPerType)) { ItemsPerType = new Dictionary(); ItemsPerType[item.Type] = item.Amount; ItemsToReceivePerGame[item.RealAppID] = ItemsPerType; diff --git a/ArchiSteamFarm/Utilities.cs b/ArchiSteamFarm/Utilities.cs index 1b6add370..109bb191e 100644 --- a/ArchiSteamFarm/Utilities.cs +++ b/ArchiSteamFarm/Utilities.cs @@ -64,20 +64,5 @@ namespace ArchiSteamFarm { return Task.Delay(miliseconds); } - - internal static uint GetCharCountInString(string s, char c) { - if (string.IsNullOrEmpty(s)) { - return 0; - } - - uint count = 0; - foreach (char singleChar in s) { - if (singleChar == c) { - count++; - } - } - - return count; - } } }