Fix a bug occurs when no nearby pokestops found.
Brian [2016-08-01 01:25:09]
Fix a bug occurs when no nearby pokestops found.
diff --git a/PokemonGo/RocketAPI/Window/MainForm.cs b/PokemonGo/RocketAPI/Window/MainForm.cs
index f1be82a..467f14b 100644
--- a/PokemonGo/RocketAPI/Window/MainForm.cs
+++ b/PokemonGo/RocketAPI/Window/MainForm.cs
@@ -575,6 +575,11 @@ namespace PokemonGo.RocketAPI.Window
var mapObjects = await client.GetMapObjects();
FortData[] rawPokeStops = mapObjects.MapCells.SelectMany(i => i.Forts).Where(i => i.Type == FortType.Checkpoint && i.CooldownCompleteTimestampMs < DateTime.UtcNow.ToUnixTime()).ToArray();
+ if (rawPokeStops == null || rawPokeStops.Count() <= 0)
+ {
+ ColoredConsoleWrite(Color.Red, $"No PokeStops to visit here, please stop the bot and change your location.");
+ return;
+ }
pokeStops = rawPokeStops;
UpdateMap();
ColoredConsoleWrite(Color.Cyan, $"Finding fastest route through all PokeStops..");
diff --git a/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs b/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs
index a361a38..d86954f 100644
--- a/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs
+++ b/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.7.2.2")]
+[assembly: AssemblyVersion("1.7.2.3")]
[assembly: AssemblyFileVersion("1.0.0.0")]
You may download the files in Public Git.