Fix fuckups

This commit is contained in:
JustArchi
2016-04-20 23:48:33 +02:00
parent 47f846540b
commit b8f03abd8b
3 changed files with 3 additions and 18 deletions

View File

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

View File

@@ -272,7 +272,7 @@ namespace ArchiSteamFarm {
Dictionary<uint, Dictionary<Item.EType, uint>> ItemsToGivePerGame = new Dictionary<uint, Dictionary<Item.EType, uint>>();
foreach (Item item in ItemsToGive) {
Dictionary<Item.EType, uint> ItemsPerType;
if (ItemsToGivePerGame.TryGetValue(item.RealAppID, out ItemsPerType)) {
if (!ItemsToGivePerGame.TryGetValue(item.RealAppID, out ItemsPerType)) {
ItemsPerType = new Dictionary<Item.EType, uint>();
ItemsPerType[item.Type] = item.Amount;
ItemsToGivePerGame[item.RealAppID] = ItemsPerType;
@@ -289,7 +289,7 @@ namespace ArchiSteamFarm {
Dictionary<uint, Dictionary<Item.EType, uint>> ItemsToReceivePerGame = new Dictionary<uint, Dictionary<Item.EType, uint>>();
foreach (Item item in ItemsToReceive) {
Dictionary<Item.EType, uint> ItemsPerType;
if (ItemsToReceivePerGame.TryGetValue(item.RealAppID, out ItemsPerType)) {
if (!ItemsToReceivePerGame.TryGetValue(item.RealAppID, out ItemsPerType)) {
ItemsPerType = new Dictionary<Item.EType, uint>();
ItemsPerType[item.Type] = item.Amount;
ItemsToReceivePerGame[item.RealAppID] = ItemsPerType;

View File

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