Fix GoogleApi, Remove Old WalkingSpeedOffSet
Brian [2016-08-22 08:01:19]
Fix GoogleApi, Remove Old WalkingSpeedOffSet
diff --git a/PokemonGo.RocketBot.Logic/ILogicSettings.cs b/PokemonGo.RocketBot.Logic/ILogicSettings.cs
index 2e0b2c4..77de51f 100644
--- a/PokemonGo.RocketBot.Logic/ILogicSettings.cs
+++ b/PokemonGo.RocketBot.Logic/ILogicSettings.cs
@@ -72,7 +72,7 @@ namespace PokemonGo.RocketBot.Logic
public interface ILogicSettings
{
- string GoogleAPIKey { get; }
+ string GoogleApiKey { get; }
bool UseWebsocket { get; }
bool CatchPokemon { get; }
bool TransferWeakPokemon { get; }
@@ -85,7 +85,6 @@ namespace PokemonGo.RocketBot.Logic
bool UseKeepMinLvl { get; }
string KeepMinOperator { get; }
double WalkingSpeedInKilometerPerHour { get; }
- double WalkingSpeedOffSetInKilometerPerHour { get; }
bool UseWalkingSpeedVariant { get; }
double WalkingSpeedVariant { get; }
bool ShowVariantWalking { get; }
diff --git a/PokemonGo.RocketBot.Logic/Navigation.cs b/PokemonGo.RocketBot.Logic/Navigation.cs
index a20be61..1e7e1e5 100644
--- a/PokemonGo.RocketBot.Logic/Navigation.cs
+++ b/PokemonGo.RocketBot.Logic/Navigation.cs
@@ -116,7 +116,7 @@ namespace PokemonGo.RocketBot.Logic
try
{
var web = WebRequest.Create(
- $"https://maps.googleapis.com/maps/api/directions/json?origin={start.Latitude},{start.Longitude}&destination={dest.Latitude},{dest.Longitude}&mode=walking&units=metric&key={session.LogicSettings.GoogleAPIKey}");
+ $"https://maps.googleapis.com/maps/api/directions/json?origin={start.Latitude},{start.Longitude}&destination={dest.Latitude},{dest.Longitude}&mode=walking&units=metric&key={session.LogicSettings.GoogleApiKey}");
web.Credentials = CredentialCache.DefaultCredentials;
string strResponse;
diff --git a/PokemonGo.RocketBot.Logic/Settings.cs b/PokemonGo.RocketBot.Logic/Settings.cs
index 5c2c3e2..16ff321 100644
--- a/PokemonGo.RocketBot.Logic/Settings.cs
+++ b/PokemonGo.RocketBot.Logic/Settings.cs
@@ -307,9 +307,9 @@ namespace PokemonGo.RocketBot.Logic
public bool StartupWelcomeDelay;
//Telegram
[DefaultValue(false)]
- public bool UseTelegramAPI;
+ public bool UseTelegramApi;
[DefaultValue(null)]
- public string TelegramAPIKey;
+ public string TelegramApiKey;
//console options
[DefaultValue(0)]
@@ -351,8 +351,6 @@ namespace PokemonGo.RocketBot.Logic
public double DefaultLongitude;
[DefaultValue(19.0)]
public double WalkingSpeedInKilometerPerHour;
- [DefaultValue(2)]
- public double WalkingSpeedOffSetInKilometerPerHour;
[DefaultValue(true)]
public bool UseWalkingSpeedVariant;
[DefaultValue(1.2)]
@@ -1301,7 +1299,7 @@ namespace PokemonGo.RocketBot.Logic
_settings = settings;
}
- public string GoogleAPIKey => _settings.Auth.GoogleApiKey;
+ public string GoogleApiKey => _settings.Auth.GoogleApiKey;
public string ProfilePath => _settings.ProfilePath;
public string ProfileConfigPath => _settings.ProfileConfigPath;
public string GeneralConfigPath => _settings.GeneralConfigPath;
@@ -1333,7 +1331,6 @@ namespace PokemonGo.RocketBot.Logic
public float UpgradePokemonCpMinimum => _settings.UpgradePokemonCpMinimum;
public string UpgradePokemonMinimumStatsOperator => _settings.UpgradePokemonMinimumStatsOperator;
public double WalkingSpeedInKilometerPerHour => _settings.WalkingSpeedInKilometerPerHour;
- public double WalkingSpeedOffSetInKilometerPerHour => _settings.WalkingSpeedOffSetInKilometerPerHour;
public bool UseWalkingSpeedVariant => _settings.UseWalkingSpeedVariant;
public double WalkingSpeedVariant => _settings.WalkingSpeedVariant;
public bool ShowVariantWalking => _settings.ShowVariantWalking;
@@ -1396,8 +1393,8 @@ namespace PokemonGo.RocketBot.Logic
public bool StartupWelcomeDelay => _settings.StartupWelcomeDelay;
public bool SnipeAtPokestops => _settings.SnipeAtPokestops;
- public bool UseTelegramAPI => _settings.UseTelegramAPI;
- public string TelegramAPIKey => _settings.TelegramAPIKey;
+ public bool UseTelegramAPI => _settings.UseTelegramApi;
+ public string TelegramAPIKey => _settings.TelegramApiKey;
public int MinPokeballsToSnipe => _settings.MinPokeballsToSnipe;
public int MinPokeballsWhileSnipe => _settings.MinPokeballsWhileSnipe;
diff --git a/PokemonGo.RocketBot.Window/Forms/SettingForm.cs b/PokemonGo.RocketBot.Window/Forms/SettingForm.cs
index 61a6747..6945541 100644
--- a/PokemonGo.RocketBot.Window/Forms/SettingForm.cs
+++ b/PokemonGo.RocketBot.Window/Forms/SettingForm.cs
@@ -231,7 +231,7 @@ namespace PokemonGo.RocketBot.Window.Forms
#region Advance Settings
cbDisableHumanWalking.Checked = _setting.DisableHumanWalking;
- tbWalkingSpeedOffSetInKilometerPerHour.Text = _setting.WalkingSpeedOffSetInKilometerPerHour.ToString(CultureInfo.InvariantCulture);
+ tbWalkingSpeedOffSetInKilometerPerHour.Text = _setting.WalkingSpeedVariant.ToString(CultureInfo.InvariantCulture);
tbMaxSpawnLocationOffset.Text = _setting.MaxSpawnLocationOffset.ToString();
tbMaxTravelDistanceInMeters.Text = _setting.MaxTravelDistanceInMeters.ToString();
@@ -521,7 +521,7 @@ namespace PokemonGo.RocketBot.Window.Forms
#region Advanced Settings
_setting.DisableHumanWalking = cbDisableHumanWalking.Checked;
- _setting.WalkingSpeedOffSetInKilometerPerHour = ConvertStringToDouble(tbWalkingSpeedOffSetInKilometerPerHour.Text);
+ _setting.WalkingSpeedVariant = ConvertStringToDouble(tbWalkingSpeedOffSetInKilometerPerHour.Text);
_setting.MaxSpawnLocationOffset = ConvertStringToInt(tbMaxSpawnLocationOffset.Text);
_setting.MaxTravelDistanceInMeters = ConvertStringToInt(tbMaxTravelDistanceInMeters.Text);
You may download the files in Public Git.