mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Reset games played also OnFarmingStopped()
This commit is contained in:
@@ -315,7 +315,11 @@ namespace ArchiSteamFarm {
|
||||
return false;
|
||||
}
|
||||
|
||||
internal void OnFarmingStopped() => ResetGamesPlayed();
|
||||
|
||||
internal async Task OnFarmingFinished(bool farmedSomething) {
|
||||
OnFarmingStopped();
|
||||
|
||||
if ((farmedSomething || !FirstTradeSent) && BotConfig.SendOnFarmingFinished) {
|
||||
FirstTradeSent = true;
|
||||
await ResponseSendTrade(BotConfig.SteamMasterID).ConfigureAwait(false);
|
||||
@@ -326,11 +330,8 @@ namespace ArchiSteamFarm {
|
||||
SkipFirstShutdown = false;
|
||||
} else {
|
||||
Stop();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ResetGamesPlayed();
|
||||
}
|
||||
|
||||
internal async Task<string> Response(ulong steamID, string message) {
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace ArchiSteamFarm {
|
||||
FarmResetEvent.Set();
|
||||
|
||||
Logging.LogGenericInfo("Waiting for reaction...", Bot.BotName);
|
||||
for (byte i = 0; (i < Program.GlobalConfig.HttpTimeout) && NowFarming; i++) {
|
||||
for (byte i = 0; (i < 5) && NowFarming; i++) {
|
||||
await Utilities.SleepAsync(1000).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
@@ -183,6 +183,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
FarmResetEvent.Reset();
|
||||
Logging.LogGenericInfo("Farming stopped!", Bot.BotName);
|
||||
Bot.OnFarmingStopped();
|
||||
FarmingSemaphore.Release();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user