Skip to content

Commit

Permalink
Few minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
bdawg1989 committed Aug 2, 2024
1 parent d507913 commit 0a5a7dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions SysBot.Pokemon/SV/BotRaid/RotatingRaidBotSV.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,7 @@ private async Task<int> PrepareForRaid(CancellationToken token)
await SwitchPartyPokemon(token).ConfigureAwait(false);
await Task.Delay(1_500, token).ConfigureAwait(false);

if (!await IsOnOverworld(OverworldOffset, token).ConfigureAwait(false))
if (!await RecoverToOverworld(token).ConfigureAwait(false))
return 0;

await Click(A, 3_000, token).ConfigureAwait(false);
Expand Down Expand Up @@ -1741,7 +1741,6 @@ private async Task SwitchPartyPokemon(CancellationToken token)
await Click(Y, 0_500, token).ConfigureAwait(false);
await Click(DLEFT, 0_800, token).ConfigureAwait(false);
await Click(Y, 0_500, token).ConfigureAwait(false);
await RecoverToOverworld(token).ConfigureAwait(false);
Log("PartyPK switch successful.");
}
}
Expand Down Expand Up @@ -1769,7 +1768,7 @@ private async Task<bool> RecoverToOverworld(CancellationToken token)
if (!await IsOnOverworld(OverworldOffset, token).ConfigureAwait(false))
{
Log("Failed to recover to overworld, rebooting the game.");
await ReOpenGame(Hub.Config, token).ConfigureAwait(false);
return false; // Return false instead of rebooting here
}
await Task.Delay(1_000, token).ConfigureAwait(false);
return true;
Expand Down

0 comments on commit 0a5a7dc

Please sign in to comment.