Skip to content

Commit e21d214

Browse files
committed
Fix SpamUntilEncounter
1 parent a50766a commit e21d214

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

SysBot.Pokemon/LGPE/BotEncounter/EncounterBot7B.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,12 @@ private async Task DoRestartingEncounter(CancellationToken token)
170170

171171
private async Task SpamUntilEncounter(CancellationToken token)
172172
{
173-
while (!(await IsInCatchScreen(token).ConfigureAwait(false) || await IsInBattle(token).ConfigureAwait(false) || await IsGiftFound(token).ConfigureAwait(false) || await IsInTrade(token).ConfigureAwait(false)))
174-
await Click(A, 0_200, token).ConfigureAwait(false);
173+
if(Settings.EncounteringType is LetsGoMode.Stationary)
174+
while (!await IsInBattle(token).ConfigureAwait(false))
175+
await Click(A, 0_200, token).ConfigureAwait(false);
176+
else
177+
while (!(await IsInCatchScreen(token).ConfigureAwait(false) || await IsGiftFound(token).ConfigureAwait(false) || await IsInTrade(token).ConfigureAwait(false)))
178+
await Click(A, 0_200, token).ConfigureAwait(false);
175179
}
176180

177181
private async Task<PB7?> ReadResetEncounter(LetsGoMode mode, CancellationToken token)

0 commit comments

Comments
 (0)