Skip to content

Commit

Permalink
Soft-reset bots no longer tries to clone a null pokemon
Browse files Browse the repository at this point in the history
  • Loading branch information
drgoku282 committed Mar 25, 2017
1 parent 1a55c0b commit 634dbea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions PKMN-NTR/Bot/Bot_SoftReset6.cs
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ public async void RunBot()
srpoke = null;
await Task.Delay(2 * commanddelay); // Wait for pokémon data
waitTaskPKM = Program.gCmdWindow.ReadOpponent();
srpoke = (await waitTaskPKM).Clone();
srpoke = await waitTaskPKM;
if (srpoke == null)
{ // No data received
attempts++;
Expand Down Expand Up @@ -740,7 +740,7 @@ public async void RunBot()
case srbotstates.tev_check:
Report("Bot: Try to read party");
waitTaskPKM = Program.helper.waitPartyRead(2);
srpoke = (await waitTaskPKM).Clone();
srpoke = await waitTaskPKM;
if (srpoke == null)
{
attempts++;
Expand Down Expand Up @@ -851,7 +851,7 @@ public async void RunBot()
srpoke = null;
await Task.Delay(2 * commanddelay); // Wait for pokémon data
waitTaskPKM = Program.gCmdWindow.ReadOpponent();
srpoke = (await waitTaskPKM).Clone();
srpoke = await waitTaskPKM;
if (srpoke == null)
{
attempts++;
Expand Down
8 changes: 4 additions & 4 deletions PKMN-NTR/Bot/Bot_SoftReset7.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public async void RunBot()
case srbotStates.readparty:
Report("Bot: Try to read party");
waitTaskPKM = Program.helper.waitPartyRead(2);
srPoke = (await waitTaskPKM).Clone();
srPoke = await waitTaskPKM;
if (srPoke == null)
{
attempts++;
Expand Down Expand Up @@ -479,7 +479,7 @@ public async void RunBot()
Report("Bot: Try to read opponent");
srPoke = null;
waitTaskPKM = Program.helper.waitPokeRead(opponentOff);
srPoke = (await waitTaskPKM).Clone();
srPoke = await waitTaskPKM;
if (srPoke == null)
{
attempts++;
Expand Down Expand Up @@ -565,7 +565,7 @@ public async void RunBot()
Report("Bot: Try to read opponent");
srPoke = null;
waitTaskPKM = Program.helper.waitPokeRead(opponentOff);
srPoke = (await waitTaskPKM).Clone();
srPoke = await waitTaskPKM;
if (srPoke == null)
{
attempts++;
Expand Down Expand Up @@ -800,7 +800,7 @@ public async void RunBot()
Report("Bot: Try to read opponent");
srPoke = null;
waitTaskPKM = Program.helper.waitPokeRead(opponentOff);
srPoke = (await waitTaskPKM).Clone();
srPoke = await waitTaskPKM;
if (srPoke == null)
{
attempts++;
Expand Down

0 comments on commit 634dbea

Please sign in to comment.