From 610954ba7341a161f5148e66bb6e4238737a2fba Mon Sep 17 00:00:00 2001 From: JustArchi Date: Mon, 18 Apr 2016 18:01:49 +0200 Subject: [PATCH] Alter logic of key distribution, closes #199 --- ArchiSteamFarm/Bot.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index 2ccdd1c70..6d8792a7c 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -774,7 +774,7 @@ namespace ArchiSteamFarm { while (!string.IsNullOrEmpty(key) && currentBot != null) { if (validate && !IsValidCdKey(key)) { key = reader.ReadLine(); // Next key - continue; // Without changing the bot + continue; // Keep current bot } if (!currentBot.SteamClient.IsConnected) { @@ -791,7 +791,12 @@ namespace ArchiSteamFarm { response.Append(Environment.NewLine + "<" + currentBot.BotName + "> Key: " + key + " | Status: " + result.PurchaseResult + " | Items: " + string.Join("", result.Items)); key = reader.ReadLine(); // Next key - break; // Next bot (if needed) + + if (result.PurchaseResult == ArchiHandler.PurchaseResponseCallback.EPurchaseResult.OK) { + break; // Next bot (if needed) + } else { + continue; // Keep current bot + } case ArchiHandler.PurchaseResponseCallback.EPurchaseResult.AlreadyOwned: case ArchiHandler.PurchaseResponseCallback.EPurchaseResult.BaseGameRequired: case ArchiHandler.PurchaseResponseCallback.EPurchaseResult.OnCooldown: