diff --git a/POGOProtos b/POGOProtos
index 016c57b..edd0d9b 160000
--- a/POGOProtos
+++ b/POGOProtos
@@ -1 +1 @@
-Subproject commit 016c57b028a0a4995891aa9a41eb62efa5285664
+Subproject commit edd0d9b75906db892c11a003f801874c7f1e2ac4
diff --git a/PokemonGo.RocketBot.Logic/Common/ApiFailureStrategy.cs b/PokemonGo.RocketBot.Logic/Common/ApiFailureStrategy.cs
index 4f2bdb1..a032dd3 100644
--- a/PokemonGo.RocketBot.Logic/Common/ApiFailureStrategy.cs
+++ b/PokemonGo.RocketBot.Logic/Common/ApiFailureStrategy.cs
@@ -2,11 +2,11 @@
using System;
using System.Threading.Tasks;
-using PokemonGo.RocketBot.Logic.Event;
-using PokemonGo.RocketBot.Logic.State;
using PokemonGo.RocketAPI.Enums;
using PokemonGo.RocketAPI.Exceptions;
using PokemonGo.RocketAPI.Extensions;
+using PokemonGo.RocketBot.Logic.Event;
+using PokemonGo.RocketBot.Logic.State;
using POGOProtos.Networking.Envelopes;
#endregion
@@ -23,6 +23,42 @@ namespace PokemonGo.RocketBot.Logic.Common
_session = session;
}
+ public void HandleApiSuccess(RequestEnvelope request, ResponseEnvelope response)
+ {
+ _retryCount = 0;
+ }
+
+ public async Task<ApiOperation> HandleApiFailure(RequestEnvelope request, ResponseEnvelope response)
+ {
+ if (_retryCount == 11)
+ return ApiOperation.Abort;
+
+ await Task.Delay(500);
+ _retryCount++;
+
+ if (_retryCount%5 == 0)
+ {
+ try
+ {
+ DoLogin();
+ }
+ catch (PtcOfflineException)
+ {
+ await Task.Delay(20000);
+ }
+ catch (AccessTokenExpiredException)
+ {
+ await Task.Delay(2000);
+ }
+ catch (Exception ex) when (ex is InvalidResponseException || ex is TaskCanceledException)
+ {
+ await Task.Delay(1000);
+ }
+ }
+
+ return ApiOperation.Retry;
+ }
+
public async Task<ApiOperation> HandleApiFailure()
{
if (_retryCount == 11)
@@ -31,7 +67,7 @@ namespace PokemonGo.RocketBot.Logic.Common
await Task.Delay(500);
_retryCount++;
- if (_retryCount % 5 == 0)
+ if (_retryCount%5 == 0)
{
DoLogin();
}
@@ -120,7 +156,7 @@ namespace PokemonGo.RocketBot.Logic.Common
}
catch (InvalidResponseException)
{
- _session.EventDispatcher.Send(new ErrorEvent()
+ _session.EventDispatcher.Send(new ErrorEvent
{
Message = _session.Translation.GetTranslation(TranslationString.InvalidResponse)
});
@@ -139,40 +175,5 @@ namespace PokemonGo.RocketBot.Logic.Common
});
}
}
- public void HandleApiSuccess(RequestEnvelope request, ResponseEnvelope response)
- {
- _retryCount = 0;
- }
-
- public async Task<ApiOperation> HandleApiFailure(RequestEnvelope request, ResponseEnvelope response)
- {
- if (_retryCount == 11)
- return ApiOperation.Abort;
-
- await Task.Delay(500);
- _retryCount++;
-
- if (_retryCount % 5 == 0)
- {
- try
- {
- DoLogin();
- }
- catch (PtcOfflineException)
- {
- await Task.Delay(20000);
- }
- catch (AccessTokenExpiredException)
- {
- await Task.Delay(2000);
- }
- catch (Exception ex) when (ex is InvalidResponseException || ex is TaskCanceledException)
- {
- await Task.Delay(1000);
- }
- }
-
- return ApiOperation.Retry;
- }
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Common/Translations.cs b/PokemonGo.RocketBot.Logic/Common/Translations.cs
index a21f457..d4d1fc8 100644
--- a/PokemonGo.RocketBot.Logic/Common/Translations.cs
+++ b/PokemonGo.RocketBot.Logic/Common/Translations.cs
@@ -1,13 +1,14 @@
#region using directives
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using PokemonGo.RocketBot.Logic.Logging;
-using PokemonGo.RocketBot.Logic.Utils;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using PokemonGo.RocketBot.Logic.Logging;
+using PokemonGo.RocketBot.Logic.Utils;
+using POGOProtos.Enums;
#endregion
@@ -19,9 +20,9 @@ namespace PokemonGo.RocketBot.Logic.Common
string GetTranslation(TranslationString translationString);
- string GetPokemonTranslation( POGOProtos.Enums.PokemonId id );
+ string GetPokemonTranslation(PokemonId id);
- string GetPokemonMovesetTranslation( POGOProtos.Enums.PokemonMove move );
+ string GetPokemonMovesetTranslation(PokemonMove move);
}
public enum TranslationString
@@ -200,6 +201,356 @@ namespace PokemonGo.RocketBot.Logic.Common
public class Translation : ITranslation
{
+ [JsonProperty("PokemonMovesetStrings",
+ ItemTypeNameHandling = TypeNameHandling.Arrays,
+ ItemConverterType = typeof(KeyValuePairConverter),
+ ObjectCreationHandling = ObjectCreationHandling.Replace,
+ DefaultValueHandling = DefaultValueHandling.Populate)] private readonly
+ List<KeyValuePair<PokemonMove, string>> _pokemonMovesetTranslationStrings =
+ new List<KeyValuePair<PokemonMove, string>>
+ {
+ new KeyValuePair<PokemonMove, string>(PokemonMove.MoveUnset, "MoveUnset"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.ThunderShock, "ThunderShock"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.QuickAttack, "QuickAttack"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Scratch, "Scratch"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Ember, "Ember"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.VineWhip, "VineWhip"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Tackle, "Tackle"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.RazorLeaf, "RazorLeaf"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.TakeDown, "TakeDown"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.WaterGun, "WaterGun"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Bite, "Bite"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Pound, "Pound"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.DoubleSlap, "DoubleSlap"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Wrap, "Wrap"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.HyperBeam, "HyperBeam"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Lick, "Lick"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.DarkPulse, "DarkPulse"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Smog, "Smog"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Sludge, "Sludge"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.MetalClaw, "MetalClaw"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.ViceGrip, "ViceGrip"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.FlameWheel, "FlameWheel"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Megahorn, "Megahorn"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.WingAttack, "WingAttack"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Flamethrower, "Flamethrower"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.SuckerPunch, "SuckerPunch"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Dig, "Dig"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.LowKick, "LowKick"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.CrossChop, "CrossChop"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.PsychoCut, "PsychoCut"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Psybeam, "Psybeam"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Earthquake, "Earthquake"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.StoneEdge, "StoneEdge"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.IcePunch, "IcePunch"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.HeartStamp, "HeartStamp"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Discharge, "Discharge"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.FlashCannon, "FlashCannon"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Peck, "Peck"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.DrillPeck, "DrillPeck"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.IceBeam, "IceBeam"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Blizzard, "Blizzard"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.AirSlash, "AirSlash"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.HeatWave, "HeatWave"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Twineedle, "Twineedle"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.PoisonJab, "PoisonJab"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.AerialAce, "AerialAce"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.DrillRun, "DrillRun"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.PetalBlizzard, "PetalBlizzard"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.MegaDrain, "MegaDrain"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.BugBuzz, "BugBuzz"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.PoisonFang, "PoisonFang"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.NightSlash, "NightSlash"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Slash, "Slash"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.BubbleBeam, "BubbleBeam"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Submission, "Submission"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.KarateChop, "KarateChop"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.LowSweep, "LowSweep"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.AquaJet, "AquaJet"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.AquaTail, "AquaTail"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.SeedBomb, "SeedBomb"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Psyshock, "Psyshock"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.RockThrow, "RockThrow"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.AncientPower, "AncientPower"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.RockTomb, "RockTomb"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.RockSlide, "RockSlide"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.PowerGem, "PowerGem"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.ShadowSneak, "ShadowSneak"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.ShadowPunch, "ShadowPunch"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.ShadowClaw, "ShadowClaw"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.OminousWind, "OminousWind"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.ShadowBall, "ShadowBall"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.BulletPunch, "BulletPunch"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.MagnetBomb, "MagnetBomb"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.SteelWing, "SteelWing"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.IronHead, "IronHead"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.ParabolicCharge, "ParabolicCharge"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Spark, "Spark"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.ThunderPunch, "ThunderPunch"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Thunder, "Thunder"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Thunderbolt, "Thunderbolt"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Twister, "Twister"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.DragonBreath, "DragonBreath"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.DragonPulse, "DragonPulse"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.DragonClaw, "DragonClaw"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.DisarmingVoice, "DisarmingVoice"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.DrainingKiss, "DrainingKiss"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.DazzlingGleam, "DazzlingGleam"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Moonblast, "Moonblast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.PlayRough, "PlayRough"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.CrossPoison, "CrossPoison"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.SludgeBomb, "SludgeBomb"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.SludgeWave, "SludgeWave"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.GunkShot, "GunkShot"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.MudShot, "MudShot"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.BoneClub, "BoneClub"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Bulldoze, "Bulldoze"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.MudBomb, "MudBomb"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.FuryCutter, "FuryCutter"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.BugBite, "BugBite"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.SignalBeam, "SignalBeam"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.XScissor, "XScissor"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.FlameCharge, "FlameCharge"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.FlameBurst, "FlameBurst"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.FireBlast, "FireBlast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Brine, "Brine"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.WaterPulse, "WaterPulse"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Scald, "Scald"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.HydroPump, "HydroPump"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Psychic, "Psychic"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Psystrike, "Psystrike"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.IceShard, "IceShard"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.IcyWind, "IcyWind"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.FrostBreath, "FrostBreath"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Absorb, "Absorb"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.GigaDrain, "GigaDrain"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.FirePunch, "FirePunch"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.SolarBeam, "SolarBeam"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.LeafBlade, "LeafBlade"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.PowerWhip, "PowerWhip"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Splash, "Splash"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Acid, "Acid"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.AirCutter, "AirCutter"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Hurricane, "Hurricane"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.BrickBreak, "BrickBreak"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Cut, "Cut"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Swift, "Swift"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.HornAttack, "HornAttack"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Stomp, "Stomp"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Headbutt, "Headbutt"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.HyperFang, "HyperFang"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Slam, "Slam"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.BodySlam, "BodySlam"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Rest, "Rest"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.Struggle, "Struggle"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.ScaldBlastoise, "ScaldBlastoise"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.HydroPumpBlastoise, "HydroPumpBlastoise"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.WrapGreen, "WrapGreen"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.WrapPink, "WrapPink"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.FuryCutterFast, "FuryCutterFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.BugBiteFast, "BugBiteFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.BiteFast, "BiteFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.SuckerPunchFast, "SuckerPunchFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.DragonBreathFast, "DragonBreathFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.ThunderShockFast, "ThunderShockFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.SparkFast, "SparkFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.LowKickFast, "LowKickFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.KarateChopFast, "KarateChopFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.EmberFast, "EmberFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.WingAttackFast, "WingAttackFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.PeckFast, "PeckFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.LickFast, "LickFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.ShadowClawFast, "ShadowClawFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.VineWhipFast, "VineWhipFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.RazorLeafFast, "RazorLeafFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.MudShotFast, "MudShotFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.IceShardFast, "IceShardFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.FrostBreathFast, "FrostBreathFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.QuickAttackFast, "QuickAttackFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.ScratchFast, "ScratchFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.TackleFast, "TackleFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.PoundFast, "PoundFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.CutFast, "CutFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.PoisonJabFast, "PoisonJabFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.AcidFast, "AcidFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.PsychoCutFast, "PsychoCutFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.RockThrowFast, "RockThrowFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.MetalClawFast, "MetalClawFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.BulletPunchFast, "BulletPunchFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.WaterGunFast, "WaterGunFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.SplashFast, "SplashFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.WaterGunFastBlastoise, "WaterGunFastBlastoise"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.MudSlapFast, "MudSlapFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.ZenHeadbuttFast, "ZenHeadbuttFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.ConfusionFast, "ConfusionFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.PoisonStingFast, "PoisonStingFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.BubbleFast, "BubbleFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.FeintAttackFast, "FeintAttackFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.SteelWingFast, "SteelWingFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.FireFangFast, "FireFangFast"),
+ new KeyValuePair<PokemonMove, string>(PokemonMove.RockSmashFast, "RockSmashFast")
+ };
+
+ [JsonProperty("PokemonStrings",
+ ItemTypeNameHandling = TypeNameHandling.Arrays,
+ ItemConverterType = typeof(KeyValuePairConverter),
+ ObjectCreationHandling = ObjectCreationHandling.Replace,
+ DefaultValueHandling = DefaultValueHandling.Populate)] private readonly
+ List<KeyValuePair<PokemonId, string>> _pokemonTranslationStrings = new List<KeyValuePair<PokemonId, string>>
+ {
+ new KeyValuePair<PokemonId, string>((PokemonId) 001, "Bulbasaur"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 002, "Ivysaur"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 003, "Venusaur"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 004, "Charmander"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 005, "Charmeleon"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 006, "Charizard"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 007, "Squirtle"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 008, "Wartortle"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 009, "Blastoise"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 010, "Caterpie"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 011, "Metapod"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 012, "Butterfree"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 013, "Weedle"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 014, "Kakuna"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 015, "Beedrill"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 016, "Pidgey"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 017, "Pidgeotto"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 018, "Pidgeot"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 019, "Rattata"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 020, "Raticate"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 021, "Spearow"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 022, "Fearow"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 023, "Ekans"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 024, "Arbok"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 025, "Pikachu"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 026, "Raichu"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 027, "Sandshrew"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 028, "Sandslash"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 029, "NidoranFemale"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 030, "Nidorina"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 031, "Nidoqueen"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 032, "NidoranMale"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 033, "Nidorino"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 034, "Nidoking"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 035, "Clefairy"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 036, "Clefable"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 037, "Vulpix"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 038, "Ninetales"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 039, "Jigglypuff"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 040, "Wigglytuff"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 041, "Zubat"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 042, "Golbat"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 043, "Oddish"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 044, "Gloom"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 045, "Vileplume"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 046, "Paras"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 047, "Parasect"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 048, "Venonat"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 049, "Venomoth"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 050, "Diglett"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 051, "Dugtrio"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 052, "Meowth"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 053, "Persian"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 054, "Psyduck"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 055, "Golduck"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 056, "Mankey"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 057, "Primeape"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 058, "Growlithe"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 059, "Arcanine"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 060, "Poliwag"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 061, "Poliwhirl"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 062, "Poliwrath"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 063, "Abra"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 064, "Kadabra"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 065, "Alakazam"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 066, "Machop"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 067, "Machoke"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 068, "Machamp"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 069, "Bellsprout"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 070, "Weepinbell"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 071, "Victreebel"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 072, "Tentacool"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 073, "Tentacruel"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 074, "Geodude"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 075, "Graveler"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 076, "Golem"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 077, "Ponyta"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 078, "Rapidash"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 079, "Slowpoke"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 080, "Slowbro"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 081, "Magnemite"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 082, "Magneton"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 083, "Farfetchd"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 084, "Doduo"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 085, "Dodrio"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 086, "Seel"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 087, "Dewgong"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 088, "Grimer"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 089, "Muk"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 090, "Shellder"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 091, "Cloyster"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 092, "Gastly"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 093, "Haunter"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 094, "Gengar"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 095, "Onix"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 096, "Drowzee"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 097, "Hypno"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 098, "Krabby"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 099, "Kingler"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 100, "Voltorb"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 101, "Electrode"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 102, "Exeggcute"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 103, "Exeggutor"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 104, "Cubone"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 105, "Marowak"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 106, "Hitmonlee"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 107, "Hitmonchan"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 108, "Lickitung"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 109, "Koffing"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 110, "Weezing"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 111, "Rhyhorn"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 112, "Rhydon"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 113, "Chansey"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 114, "Tangela"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 115, "Kangaskhan"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 116, "Horsea"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 117, "Seadra"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 118, "Goldeen"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 119, "Seaking"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 120, "Staryu"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 121, "Starmie"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 122, "Mr. Mime"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 123, "Scyther"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 124, "Jynx"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 125, "Electabuzz"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 126, "Magmar"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 127, "Pinsir"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 128, "Tauros"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 129, "Magikarp"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 130, "Gyarados"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 131, "Lapras"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 132, "Ditto"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 133, "Eevee"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 134, "Vaporeon"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 135, "Jolteon"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 136, "Flareon"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 137, "Porygon"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 138, "Omanyte"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 139, "Omastar"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 140, "Kabuto"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 141, "Kabutops"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 142, "Aerodactyl"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 143, "Snorlax"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 144, "Articuno"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 145, "Zapdos"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 146, "Moltres"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 147, "Dratini"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 148, "Dragonair"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 149, "Dragonite"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 150, "Mewtwo"),
+ new KeyValuePair<PokemonId, string>((PokemonId) 151, "Mew")
+ };
+
[JsonProperty("TranslationStrings",
ItemTypeNameHandling = TypeNameHandling.Arrays,
ItemConverterType = typeof(KeyValuePairConverter),
@@ -209,14 +560,16 @@ namespace PokemonGo.RocketBot.Logic.Common
private readonly List<KeyValuePair<TranslationString, string>> _translationStrings = new List
<KeyValuePair<TranslationString, string>>
{
- new KeyValuePair<TranslationString, string>(TranslationString.HumanWalkingVariant, "Walking Speed: Has been changed, {0:n2} Km/h to {1:n2} Km/h"),
+ new KeyValuePair<TranslationString, string>(TranslationString.HumanWalkingVariant,
+ "Walking Speed: Has been changed, {0:n2} Km/h to {1:n2} Km/h"),
new KeyValuePair<TranslationString, string>(TranslationString.Pokeball, "PokeBall"),
new KeyValuePair<TranslationString, string>(TranslationString.GreatPokeball, "GreatBall"),
new KeyValuePair<TranslationString, string>(TranslationString.UltraPokeball, "UltraBall"),
new KeyValuePair<TranslationString, string>(TranslationString.MasterPokeball, "MasterBall"),
new KeyValuePair<TranslationString, string>(TranslationString.WrongAuthType,
"Unknown AuthType in config.json"),
- new KeyValuePair<TranslationString, string>(TranslationString.LoginInvalid, "User credentials are invalid and login failed."),
+ new KeyValuePair<TranslationString, string>(TranslationString.LoginInvalid,
+ "User credentials are invalid and login failed."),
new KeyValuePair<TranslationString, string>(TranslationString.FarmPokestopsOutsideRadius,
"You're outside of your defined radius! Walking to start ({0}m away) in 5 seconds. Is your LastPos.ini file correct?"),
new KeyValuePair<TranslationString, string>(TranslationString.FarmPokestopsNoUsableFound,
@@ -245,8 +598,6 @@ namespace PokemonGo.RocketBot.Logic.Common
"({0}) | ({1}) {2} Lvl: {3} CP: ({4}/{5}) IV: {6}% | Chance: {7}% | {8}m dist | with a {9} ({10} left). | {11} EXP earned | {12} | lat: {13} long: {14}"),
new KeyValuePair<TranslationString, string>(TranslationString.EventPokemonCaptureFailed,
"({0}) | ({1}) {2} Lvl: {3} CP: ({4}/{5}) IV: {6}% | Chance: {7}% | {8}m dist | with a {9} ({10} left). | lat: {11} long: {12}"),
-
-
new KeyValuePair<TranslationString, string>(TranslationString.EventNoPokeballs,
"No Pokeballs - We missed a {0} with CP {1}"),
new KeyValuePair<TranslationString, string>(TranslationString.WaitingForMorePokemonToEvolve,
@@ -419,7 +770,8 @@ namespace PokemonGo.RocketBot.Logic.Common
new KeyValuePair<TranslationString, string>(TranslationString.NoEggsAvailable, "No Eggs Available"),
new KeyValuePair<TranslationString, string>(TranslationString.UseLuckyEggActive, "Lucky Egg Already Active"),
new KeyValuePair<TranslationString, string>(TranslationString.UsedLuckyEgg, "Used Lucky Egg"),
- new KeyValuePair<TranslationString, string>(TranslationString.UseLuckyEggAmount, "Lucky Eggs in Inventory: {0}"),
+ new KeyValuePair<TranslationString, string>(TranslationString.UseLuckyEggAmount,
+ "Lucky Eggs in Inventory: {0}"),
new KeyValuePair<TranslationString, string>(TranslationString.NoIncenseAvailable, "No Incense Available"),
new KeyValuePair<TranslationString, string>(TranslationString.UseIncenseActive, "Incense Already Active"),
new KeyValuePair<TranslationString, string>(TranslationString.UseIncenseAmount, "Incense in Inventory: {0}"),
@@ -430,387 +782,66 @@ namespace PokemonGo.RocketBot.Logic.Common
"Potential Evolutions: {0}"),
new KeyValuePair<TranslationString, string>(TranslationString.PkmNotEnoughRessources,
"Pokemon Upgrade Failed Not Enough Resources"),
- new KeyValuePair<TranslationString, string>(TranslationString.SnipeServerOffline, "Sniping server is offline. Skipping..."),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartPrompt, "This is your first start, would you like to begin setup? {0}/{1}"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartLanguagePrompt, "Would you like to change the default language? {0}/{1}"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartLanguageCodePrompt, "Please enter a new language code"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartLanguageConfirm, "Language Code Applied: {0}"),
- new KeyValuePair<TranslationString, string>(TranslationString.PromptError, "[INPUT ERROR] Error with input, please enter '{0}' or '{1}"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartAutoGenSettings, "Config/Auth file automatically generated and must be completed before continuing"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupAccount, "### Setting up new USER ACCOUNT ###"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupTypePrompt, "Please choose an account type: {0}/{1}"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupTypeConfirm, "Chosen Account Type: {0}"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupTypePromptError, "[ERROR] submitted an incorrect account type, please choose '{0}' or '{1}'"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupUsernamePrompt, "Please enter a Username"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupUsernameConfirm, "Accepted username: {0}"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupPasswordPrompt, "Please enter a Password"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupPasswordConfirm, "Accepted password: {0}"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartAccountCompleted, "### User Account Completed ###"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartDefaultLocationPrompt, "Would you like to setup a new Default Location? {0}/{1}"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartDefaultLocationSet, "Default Location Applied"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartDefaultLocation, "### Setting Default Position ###"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupDefaultLocationError, "[ERROR] Please input only a VALUE for example: {0}"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupDefaultLatPrompt, "Please enter a Latitude (Right click to paste)"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupDefaultLatConfirm, "Lattitude accepted: {0}"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupDefaultLongPrompt, "Please enter a Longitude (Right click to paste)"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupDefaultLongConfirm, "Longitude accepted: {0}"),
+ new KeyValuePair<TranslationString, string>(TranslationString.SnipeServerOffline,
+ "Sniping server is offline. Skipping..."),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartPrompt,
+ "This is your first start, would you like to begin setup? {0}/{1}"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartLanguagePrompt,
+ "Would you like to change the default language? {0}/{1}"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartLanguageCodePrompt,
+ "Please enter a new language code"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartLanguageConfirm,
+ "Language Code Applied: {0}"),
+ new KeyValuePair<TranslationString, string>(TranslationString.PromptError,
+ "[INPUT ERROR] Error with input, please enter '{0}' or '{1}"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartAutoGenSettings,
+ "Config/Auth file automatically generated and must be completed before continuing"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupAccount,
+ "### Setting up new USER ACCOUNT ###"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupTypePrompt,
+ "Please choose an account type: {0}/{1}"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupTypeConfirm,
+ "Chosen Account Type: {0}"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupTypePromptError,
+ "[ERROR] submitted an incorrect account type, please choose '{0}' or '{1}'"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupUsernamePrompt,
+ "Please enter a Username"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupUsernameConfirm,
+ "Accepted username: {0}"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupPasswordPrompt,
+ "Please enter a Password"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupPasswordConfirm,
+ "Accepted password: {0}"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartAccountCompleted,
+ "### User Account Completed ###"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartDefaultLocationPrompt,
+ "Would you like to setup a new Default Location? {0}/{1}"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartDefaultLocationSet,
+ "Default Location Applied"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartDefaultLocation,
+ "### Setting Default Position ###"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupDefaultLocationError,
+ "[ERROR] Please input only a VALUE for example: {0}"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupDefaultLatPrompt,
+ "Please enter a Latitude (Right click to paste)"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupDefaultLatConfirm,
+ "Lattitude accepted: {0}"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupDefaultLongPrompt,
+ "Please enter a Longitude (Right click to paste)"),
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupDefaultLongConfirm,
+ "Longitude accepted: {0}"),
new KeyValuePair<TranslationString, string>(TranslationString.SoftBanBypassed,
"Successfully bypassed!"),
- new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupCompleted, "### COMPLETED CONFIG SETUP ###"),
- new KeyValuePair<TranslationString, string>(TranslationString.PokedexCatchedTelegram, "--- Pokedex catched --- \n"),
- new KeyValuePair<TranslationString, string>(TranslationString.PokedexPokemonCatchedTelegram, "#{0} Name: {1} | Catched: {2} | Encountered: {3} \n"),
- new KeyValuePair<TranslationString, string>(TranslationString.PokedexNeededTelegram, "--- Pokedex needed --- \n"),
- new KeyValuePair<TranslationString, string>(TranslationString.PokedexPokemonNeededTelegram, "#{0}# Name: {1} \n"),
- };
-
- [JsonProperty("PokemonStrings",
- ItemTypeNameHandling = TypeNameHandling.Arrays,
- ItemConverterType = typeof(KeyValuePairConverter),
- ObjectCreationHandling = ObjectCreationHandling.Replace,
- DefaultValueHandling = DefaultValueHandling.Populate)]
- private readonly List<KeyValuePair<POGOProtos.Enums.PokemonId, string>> _pokemonTranslationStrings = new List<KeyValuePair<POGOProtos.Enums.PokemonId, string>>()
- {
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)001,"Bulbasaur"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)002,"Ivysaur"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)003,"Venusaur"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)004,"Charmander"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)005,"Charmeleon"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)006,"Charizard"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)007,"Squirtle"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)008,"Wartortle"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)009,"Blastoise"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)010,"Caterpie"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)011,"Metapod"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)012,"Butterfree"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)013,"Weedle"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)014,"Kakuna"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)015,"Beedrill"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)016,"Pidgey"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)017,"Pidgeotto"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)018,"Pidgeot"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)019,"Rattata"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)020,"Raticate"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)021,"Spearow"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)022,"Fearow"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)023,"Ekans"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)024,"Arbok"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)025,"Pikachu"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)026,"Raichu"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)027,"Sandshrew"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)028,"Sandslash"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)029,"NidoranFemale"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)030,"Nidorina"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)031,"Nidoqueen"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)032,"NidoranMale"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)033,"Nidorino"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)034,"Nidoking"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)035,"Clefairy"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)036,"Clefable"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)037,"Vulpix"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)038,"Ninetales"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)039,"Jigglypuff"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)040,"Wigglytuff"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)041,"Zubat"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)042,"Golbat"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)043,"Oddish"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)044,"Gloom"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)045,"Vileplume"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)046,"Paras"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)047,"Parasect"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)048,"Venonat"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)049,"Venomoth"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)050,"Diglett"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)051,"Dugtrio"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)052,"Meowth"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)053,"Persian"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)054,"Psyduck"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)055,"Golduck"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)056,"Mankey"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)057,"Primeape"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)058,"Growlithe"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)059,"Arcanine"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)060,"Poliwag"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)061,"Poliwhirl"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)062,"Poliwrath"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)063,"Abra"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)064,"Kadabra"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)065,"Alakazam"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)066,"Machop"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)067,"Machoke"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)068,"Machamp"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)069,"Bellsprout"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)070,"Weepinbell"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)071,"Victreebel"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)072,"Tentacool"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)073,"Tentacruel"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)074,"Geodude"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)075,"Graveler"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)076,"Golem"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)077,"Ponyta"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)078,"Rapidash"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)079,"Slowpoke"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)080,"Slowbro"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)081,"Magnemite"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)082,"Magneton"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)083,"Farfetchd"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)084,"Doduo"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)085,"Dodrio"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)086,"Seel"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)087,"Dewgong"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)088,"Grimer"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)089,"Muk"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)090,"Shellder"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)091,"Cloyster"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)092,"Gastly"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)093,"Haunter"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)094,"Gengar"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)095,"Onix"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)096,"Drowzee"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)097,"Hypno"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)098,"Krabby"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)099,"Kingler"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)100,"Voltorb"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)101,"Electrode"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)102,"Exeggcute"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)103,"Exeggutor"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)104,"Cubone"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)105,"Marowak"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)106,"Hitmonlee"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)107,"Hitmonchan"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)108,"Lickitung"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)109,"Koffing"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)110,"Weezing"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)111,"Rhyhorn"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)112,"Rhydon"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)113,"Chansey"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)114,"Tangela"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)115,"Kangaskhan"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)116,"Horsea"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)117,"Seadra"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)118,"Goldeen"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)119,"Seaking"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)120,"Staryu"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)121,"Starmie"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)122,"Mr. Mime"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)123,"Scyther"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)124,"Jynx"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)125,"Electabuzz"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)126,"Magmar"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)127,"Pinsir"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)128,"Tauros"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)129,"Magikarp"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)130,"Gyarados"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)131,"Lapras"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)132,"Ditto"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)133,"Eevee"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)134,"Vaporeon"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)135,"Jolteon"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)136,"Flareon"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)137,"Porygon"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)138,"Omanyte"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)139,"Omastar"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)140,"Kabuto"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)141,"Kabutops"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)142,"Aerodactyl"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)143,"Snorlax"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)144,"Articuno"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)145,"Zapdos"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)146,"Moltres"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)147,"Dratini"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)148,"Dragonair"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)149,"Dragonite"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)150,"Mewtwo"),
- new KeyValuePair<POGOProtos.Enums.PokemonId, string>((POGOProtos.Enums.PokemonId)151,"Mew"),
- };
-
- [JsonProperty("PokemonMovesetStrings",
- ItemTypeNameHandling = TypeNameHandling.Arrays,
- ItemConverterType = typeof(KeyValuePairConverter),
- ObjectCreationHandling = ObjectCreationHandling.Replace,
- DefaultValueHandling = DefaultValueHandling.Populate)]
- private readonly List<KeyValuePair<POGOProtos.Enums.PokemonMove, string>> _pokemonMovesetTranslationStrings =
- new List<KeyValuePair< POGOProtos.Enums.PokemonMove, string>>()
- {
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.MoveUnset, "MoveUnset" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.ThunderShock, "ThunderShock" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.QuickAttack, "QuickAttack" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Scratch, "Scratch" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Ember, "Ember" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.VineWhip, "VineWhip" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Tackle, "Tackle" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.RazorLeaf, "RazorLeaf" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.TakeDown, "TakeDown" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.WaterGun, "WaterGun" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Bite, "Bite" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Pound, "Pound" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.DoubleSlap, "DoubleSlap" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Wrap, "Wrap" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.HyperBeam, "HyperBeam" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Lick, "Lick" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.DarkPulse, "DarkPulse" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Smog, "Smog" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Sludge, "Sludge" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.MetalClaw, "MetalClaw" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.ViceGrip, "ViceGrip" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.FlameWheel, "FlameWheel" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Megahorn, "Megahorn" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.WingAttack, "WingAttack" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Flamethrower, "Flamethrower" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.SuckerPunch, "SuckerPunch" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Dig, "Dig" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.LowKick, "LowKick" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.CrossChop, "CrossChop" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.PsychoCut, "PsychoCut" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Psybeam, "Psybeam" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Earthquake, "Earthquake" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.StoneEdge, "StoneEdge" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.IcePunch, "IcePunch" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.HeartStamp, "HeartStamp" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Discharge, "Discharge" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.FlashCannon, "FlashCannon" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Peck, "Peck" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.DrillPeck, "DrillPeck" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.IceBeam, "IceBeam" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Blizzard, "Blizzard" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.AirSlash, "AirSlash" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.HeatWave, "HeatWave" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Twineedle, "Twineedle" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.PoisonJab, "PoisonJab" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.AerialAce, "AerialAce" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.DrillRun, "DrillRun" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.PetalBlizzard, "PetalBlizzard" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.MegaDrain, "MegaDrain" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.BugBuzz, "BugBuzz" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.PoisonFang, "PoisonFang" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.NightSlash, "NightSlash" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Slash, "Slash" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.BubbleBeam, "BubbleBeam" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Submission, "Submission" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.KarateChop, "KarateChop" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.LowSweep, "LowSweep" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.AquaJet, "AquaJet" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.AquaTail, "AquaTail" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.SeedBomb, "SeedBomb" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Psyshock, "Psyshock" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.RockThrow, "RockThrow" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.AncientPower, "AncientPower" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.RockTomb, "RockTomb" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.RockSlide, "RockSlide" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.PowerGem, "PowerGem" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.ShadowSneak, "ShadowSneak" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.ShadowPunch, "ShadowPunch" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.ShadowClaw, "ShadowClaw" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.OminousWind, "OminousWind" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.ShadowBall, "ShadowBall" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.BulletPunch, "BulletPunch" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.MagnetBomb, "MagnetBomb" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.SteelWing, "SteelWing" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.IronHead, "IronHead" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.ParabolicCharge, "ParabolicCharge" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Spark, "Spark" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.ThunderPunch, "ThunderPunch" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Thunder, "Thunder" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Thunderbolt, "Thunderbolt" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Twister, "Twister" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.DragonBreath, "DragonBreath" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.DragonPulse, "DragonPulse" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.DragonClaw, "DragonClaw" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.DisarmingVoice, "DisarmingVoice" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.DrainingKiss, "DrainingKiss" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.DazzlingGleam, "DazzlingGleam" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Moonblast, "Moonblast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.PlayRough, "PlayRough" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.CrossPoison, "CrossPoison" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.SludgeBomb, "SludgeBomb" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.SludgeWave, "SludgeWave" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.GunkShot, "GunkShot" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.MudShot, "MudShot" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.BoneClub, "BoneClub" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Bulldoze, "Bulldoze" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.MudBomb, "MudBomb" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.FuryCutter, "FuryCutter" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.BugBite, "BugBite" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.SignalBeam, "SignalBeam" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.XScissor, "XScissor" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.FlameCharge, "FlameCharge" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.FlameBurst, "FlameBurst" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.FireBlast, "FireBlast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Brine, "Brine" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.WaterPulse, "WaterPulse" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Scald, "Scald" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.HydroPump, "HydroPump" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Psychic, "Psychic" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Psystrike, "Psystrike" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.IceShard, "IceShard" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.IcyWind, "IcyWind" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.FrostBreath, "FrostBreath" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Absorb, "Absorb" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.GigaDrain, "GigaDrain" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.FirePunch, "FirePunch" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.SolarBeam, "SolarBeam" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.LeafBlade, "LeafBlade" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.PowerWhip, "PowerWhip" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Splash, "Splash" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Acid, "Acid" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.AirCutter, "AirCutter" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Hurricane, "Hurricane" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.BrickBreak, "BrickBreak" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Cut, "Cut" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Swift, "Swift" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.HornAttack, "HornAttack" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Stomp, "Stomp" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Headbutt, "Headbutt" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.HyperFang, "HyperFang" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Slam, "Slam" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.BodySlam, "BodySlam" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Rest, "Rest" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.Struggle, "Struggle" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.ScaldBlastoise, "ScaldBlastoise" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.HydroPumpBlastoise, "HydroPumpBlastoise" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.WrapGreen, "WrapGreen" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.WrapPink, "WrapPink" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.FuryCutterFast, "FuryCutterFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.BugBiteFast, "BugBiteFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.BiteFast, "BiteFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.SuckerPunchFast, "SuckerPunchFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.DragonBreathFast, "DragonBreathFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.ThunderShockFast, "ThunderShockFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.SparkFast, "SparkFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.LowKickFast, "LowKickFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.KarateChopFast, "KarateChopFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.EmberFast, "EmberFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.WingAttackFast, "WingAttackFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.PeckFast, "PeckFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.LickFast, "LickFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.ShadowClawFast, "ShadowClawFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.VineWhipFast, "VineWhipFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.RazorLeafFast, "RazorLeafFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.MudShotFast, "MudShotFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.IceShardFast, "IceShardFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.FrostBreathFast, "FrostBreathFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.QuickAttackFast, "QuickAttackFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.ScratchFast, "ScratchFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.TackleFast, "TackleFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.PoundFast, "PoundFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.CutFast, "CutFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.PoisonJabFast, "PoisonJabFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.AcidFast, "AcidFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.PsychoCutFast, "PsychoCutFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.RockThrowFast, "RockThrowFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.MetalClawFast, "MetalClawFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.BulletPunchFast, "BulletPunchFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.WaterGunFast, "WaterGunFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.SplashFast, "SplashFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.WaterGunFastBlastoise, "WaterGunFastBlastoise" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.MudSlapFast, "MudSlapFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.ZenHeadbuttFast, "ZenHeadbuttFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.ConfusionFast, "ConfusionFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.PoisonStingFast, "PoisonStingFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.BubbleFast, "BubbleFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.FeintAttackFast, "FeintAttackFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.SteelWingFast, "SteelWingFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.FireFangFast, "FireFangFast" ),
- new KeyValuePair<POGOProtos.Enums.PokemonMove, string> ( POGOProtos.Enums.PokemonMove.RockSmashFast, "RockSmashFast" )
+ new KeyValuePair<TranslationString, string>(TranslationString.FirstStartSetupCompleted,
+ "### COMPLETED CONFIG SETUP ###"),
+ new KeyValuePair<TranslationString, string>(TranslationString.PokedexCatchedTelegram,
+ "--- Pokedex catched --- \n"),
+ new KeyValuePair<TranslationString, string>(TranslationString.PokedexPokemonCatchedTelegram,
+ "#{0} Name: {1} | Catched: {2} | Encountered: {3} \n"),
+ new KeyValuePair<TranslationString, string>(TranslationString.PokedexNeededTelegram,
+ "--- Pokedex needed --- \n"),
+ new KeyValuePair<TranslationString, string>(TranslationString.PokedexPokemonNeededTelegram,
+ "#{0}# Name: {1} \n")
};
public string GetTranslation(TranslationString translationString, params object[] data)
@@ -827,24 +858,24 @@ namespace PokemonGo.RocketBot.Logic.Common
return translation != default(string) ? translation : $"Translation for {translationString} is missing";
}
- public string GetPokemonTranslation(POGOProtos.Enums.PokemonId id)
+ public string GetPokemonTranslation(PokemonId id)
{
var translation = _pokemonTranslationStrings.FirstOrDefault(t => t.Key.Equals(id)).Value;
return translation != default(string) ? translation : $"Translation for pokemon {id} is missing";
}
- public string GetPokemonMovesetTranslation( POGOProtos.Enums.PokemonMove move )
+ public string GetPokemonMovesetTranslation(PokemonMove move)
{
- var translation = _pokemonMovesetTranslationStrings.FirstOrDefault( t => t.Key.Equals( move ) ).Value;
- return translation != default( string ) ? translation : $"Translation for move {move} is missing";
+ var translation = _pokemonMovesetTranslationStrings.FirstOrDefault(t => t.Key.Equals(move)).Value;
+ return translation != default(string) ? translation : $"Translation for move {move} is missing";
}
- public static Translation Load( ILogicSettings logicSettings )
+ public static Translation Load(ILogicSettings logicSettings)
{
- return Load( logicSettings, new Translation() );
+ return Load(logicSettings, new Translation());
}
- public static Translation Load(ILogicSettings logicSettings, Translation translations )
+ public static Translation Load(ILogicSettings logicSettings, Translation translations)
{
var translationsLanguageCode = logicSettings.TranslationLanguageCode;
var translationPath = Path.Combine(logicSettings.GeneralConfigPath, "translations");
@@ -855,41 +886,41 @@ namespace PokemonGo.RocketBot.Logic.Common
var input = File.ReadAllText(fullPath);
var jsonSettings = new JsonSerializerSettings();
- jsonSettings.Converters.Add(new StringEnumConverter { CamelCaseText = true });
+ jsonSettings.Converters.Add(new StringEnumConverter {CamelCaseText = true});
jsonSettings.ObjectCreationHandling = ObjectCreationHandling.Replace;
jsonSettings.DefaultValueHandling = DefaultValueHandling.Populate;
try
{
- translations = JsonConvert.DeserializeObject<Translation>( input, jsonSettings );
+ translations = JsonConvert.DeserializeObject<Translation>(input, jsonSettings);
//TODO make json to fill default values as it won't do it now
new Translation()._translationStrings.Where(
- item => translations._translationStrings.All( a => a.Key != item.Key ) )
+ item => translations._translationStrings.All(a => a.Key != item.Key))
.ToList()
- .ForEach( translations._translationStrings.Add );
+ .ForEach(translations._translationStrings.Add);
new Translation()._pokemonTranslationStrings.Where(
- item => translations._pokemonTranslationStrings.All( a => a.Key != item.Key ) )
+ item => translations._pokemonTranslationStrings.All(a => a.Key != item.Key))
.ToList()
- .ForEach( translations._pokemonTranslationStrings.Add );
+ .ForEach(translations._pokemonTranslationStrings.Add);
}
- catch( JsonException ex )
+ catch (JsonException ex)
{
- Logger.Write( $"[ERROR] Issue loading translations: {ex.ToString()}", LogLevel.Warning );
- Logger.Write( "[Request] Rebuild the translations folder? Y/N" );
+ Logger.Write($"[ERROR] Issue loading translations: {ex}", LogLevel.Warning);
+ Logger.Write("[Request] Rebuild the translations folder? Y/N");
- string strInput = Console.ReadLine().ToLower();
+ var strInput = Console.ReadLine().ToLower();
- if( strInput.Equals( "y" ) )
+ if (strInput.Equals("y"))
{
// Currently this section can only rebuild the EN translations file \\
// This is because default values cannot be supplied from other languages \\
- Logger.Write( "Loading fresh translations and continuing" );
+ Logger.Write("Loading fresh translations and continuing");
translations = new Translation();
- translations.Save( Path.Combine( translationPath, "translation.en.json" ) );
+ translations.Save(Path.Combine(translationPath, "translation.en.json"));
}
else
{
- ErrorHandler.ThrowFatalError( "[ERROR] Fatal Error", 3, LogLevel.Error );
+ ErrorHandler.ThrowFatalError("[ERROR] Fatal Error", 3, LogLevel.Error);
return null;
}
}
@@ -906,7 +937,7 @@ namespace PokemonGo.RocketBot.Logic.Common
public void Save(string fullPath)
{
var output = JsonConvert.SerializeObject(this, Formatting.Indented,
- new StringEnumConverter { CamelCaseText = true });
+ new StringEnumConverter {CamelCaseText = true});
var folder = Path.GetDirectoryName(fullPath);
if (folder != null && !Directory.Exists(folder))
@@ -917,4 +948,4 @@ namespace PokemonGo.RocketBot.Logic.Common
File.WriteAllText(fullPath, output);
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Event/EvolveCountEvent.cs b/PokemonGo.RocketBot.Logic/Event/EvolveCountEvent.cs
index 6871b8f..62b2c91 100644
--- a/PokemonGo.RocketBot.Logic/Event/EvolveCountEvent.cs
+++ b/PokemonGo.RocketBot.Logic/Event/EvolveCountEvent.cs
@@ -1,13 +1,7 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace PokemonGo.RocketBot.Logic.Event
+namespace PokemonGo.RocketBot.Logic.Event
{
public class EvolveCountEvent : IEvent
{
public int Evolves;
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Event/FortFailedEvent.cs b/PokemonGo.RocketBot.Logic/Event/FortFailedEvent.cs
index aa67cc5..4969f03 100644
--- a/PokemonGo.RocketBot.Logic/Event/FortFailedEvent.cs
+++ b/PokemonGo.RocketBot.Logic/Event/FortFailedEvent.cs
@@ -2,9 +2,9 @@
{
public class FortFailedEvent : IEvent
{
+ public bool Looted;
public int Max;
public string Name;
public int Try;
- public bool Looted;
}
}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Event/GetHumanizeRouteEvent.cs b/PokemonGo.RocketBot.Logic/Event/GetHumanizeRouteEvent.cs
new file mode 100644
index 0000000..9fff3e0
--- /dev/null
+++ b/PokemonGo.RocketBot.Logic/Event/GetHumanizeRouteEvent.cs
@@ -0,0 +1,11 @@
+using System.Collections.Generic;
+using GeoCoordinatePortable;
+
+namespace PokemonGo.RocketBot.Logic.Event
+{
+ public class GetHumanizeRouteEvent : IEvent
+ {
+ public GeoCoordinate Destination;
+ public List<GeoCoordinate> Route;
+ }
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Event/HumanWalkingEvent.cs b/PokemonGo.RocketBot.Logic/Event/HumanWalkingEvent.cs
index 3a9e013..12e99a8 100644
--- a/PokemonGo.RocketBot.Logic/Event/HumanWalkingEvent.cs
+++ b/PokemonGo.RocketBot.Logic/Event/HumanWalkingEvent.cs
@@ -2,8 +2,7 @@
{
public class HumanWalkingEvent : IEvent
{
- public double OldWalkingSpeed;
public double CurrentWalkingSpeed;
+ public double OldWalkingSpeed;
}
-}
-
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Event/InventoryListEvent.cs b/PokemonGo.RocketBot.Logic/Event/InventoryListEvent.cs
index 2627fb4..4331027 100644
--- a/PokemonGo.RocketBot.Logic/Event/InventoryListEvent.cs
+++ b/PokemonGo.RocketBot.Logic/Event/InventoryListEvent.cs
@@ -1,9 +1,5 @@
-using POGOProtos.Inventory.Item;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Collections.Generic;
+using POGOProtos.Inventory.Item;
namespace PokemonGo.RocketBot.Logic.Event
{
@@ -11,4 +7,4 @@ namespace PokemonGo.RocketBot.Logic.Event
{
public List<ItemData> Items;
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Event/LootPokestopEvent.cs b/PokemonGo.RocketBot.Logic/Event/LootPokestopEvent.cs
index 05bf083..1f9ff0f 100644
--- a/PokemonGo.RocketBot.Logic/Event/LootPokestopEvent.cs
+++ b/PokemonGo.RocketBot.Logic/Event/LootPokestopEvent.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using POGOProtos.Map.Fort;
+using POGOProtos.Map.Fort;
namespace PokemonGo.RocketBot.Logic.Event
{
@@ -11,4 +6,4 @@ namespace PokemonGo.RocketBot.Logic.Event
{
public FortData Pokestop;
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Event/OptimizeRouteEvent.cs b/PokemonGo.RocketBot.Logic/Event/OptimizeRouteEvent.cs
index 4541918..3495fb2 100644
--- a/PokemonGo.RocketBot.Logic/Event/OptimizeRouteEvent.cs
+++ b/PokemonGo.RocketBot.Logic/Event/OptimizeRouteEvent.cs
@@ -1,10 +1,5 @@
-using GMap.NET.WindowsForms;
+using System.Collections.Generic;
using POGOProtos.Map.Fort;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace PokemonGo.RocketBot.Logic.Event
{
@@ -12,4 +7,4 @@ namespace PokemonGo.RocketBot.Logic.Event
{
public List<FortData> OptimizedRoute { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Event/PokemonCaptureEvent.cs b/PokemonGo.RocketBot.Logic/Event/PokemonCaptureEvent.cs
index 27d69b0..15ea705 100644
--- a/PokemonGo.RocketBot.Logic/Event/PokemonCaptureEvent.cs
+++ b/PokemonGo.RocketBot.Logic/Event/PokemonCaptureEvent.cs
@@ -18,14 +18,14 @@ namespace PokemonGo.RocketBot.Logic.Event
public int Exp;
public int FamilyCandies;
public PokemonId Id;
+ public double Latitude;
public double Level;
+ public double Longitude;
public int MaxCp;
public double Perfection;
public ItemId Pokeball;
public double Probability;
public int Stardust;
public CatchPokemonResponse.Types.CatchStatus Status;
- public double Latitude;
- public double Longitude;
}
}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Event/PokemonEvolveEvent.cs b/PokemonGo.RocketBot.Logic/Event/PokemonEvolveEvent.cs
index 1e75396..c123d7e 100644
--- a/PokemonGo.RocketBot.Logic/Event/PokemonEvolveEvent.cs
+++ b/PokemonGo.RocketBot.Logic/Event/PokemonEvolveEvent.cs
@@ -1,6 +1,8 @@
#region using directives
+
using POGOProtos.Enums;
using POGOProtos.Networking.Responses;
+
#endregion
namespace PokemonGo.RocketBot.Logic.Event
diff --git a/PokemonGo.RocketBot.Logic/Event/PokemonsEncounterEvent.cs b/PokemonGo.RocketBot.Logic/Event/PokemonsEncounterEvent.cs
index 6af0c6c..d46507b 100644
--- a/PokemonGo.RocketBot.Logic/Event/PokemonsEncounterEvent.cs
+++ b/PokemonGo.RocketBot.Logic/Event/PokemonsEncounterEvent.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using POGOProtos.Data;
+using System.Collections.Generic;
using POGOProtos.Map.Pokemon;
namespace PokemonGo.RocketBot.Logic.Event
@@ -12,4 +7,4 @@ namespace PokemonGo.RocketBot.Logic.Event
{
public List<MapPokemon> EncounterPokemons;
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/ILogicSettings.cs b/PokemonGo.RocketBot.Logic/ILogicSettings.cs
index c979758..2e0b2c4 100644
--- a/PokemonGo.RocketBot.Logic/ILogicSettings.cs
+++ b/PokemonGo.RocketBot.Logic/ILogicSettings.cs
@@ -1,8 +1,8 @@
#region using directives
+using System.Collections.Generic;
using POGOProtos.Enums;
using POGOProtos.Inventory.Item;
-using System.Collections.Generic;
#endregion
@@ -46,7 +46,8 @@ namespace PokemonGo.RocketBot.Logic
{
}
- public TransferFilter(int keepMinCp, int keepMinLvl, bool useKeepMinLvl, float keepMinIvPercentage, string keepMinOperator, int keepMinDuplicatePokemon,
+ public TransferFilter(int keepMinCp, int keepMinLvl, bool useKeepMinLvl, float keepMinIvPercentage,
+ string keepMinOperator, int keepMinDuplicatePokemon,
List<PokemonMove> moves = null, string movesOperator = "or")
{
KeepMinCp = keepMinCp;
@@ -200,4 +201,4 @@ namespace PokemonGo.RocketBot.Logic
bool StartupWelcomeDelay { get; }
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Logging/ILogger.cs b/PokemonGo.RocketBot.Logic/Logging/ILogger.cs
index c4649d5..7a95e40 100644
--- a/PokemonGo.RocketBot.Logic/Logging/ILogger.cs
+++ b/PokemonGo.RocketBot.Logic/Logging/ILogger.cs
@@ -22,6 +22,7 @@ namespace PokemonGo.RocketBot.Logic.Logging
/// <param name="level">Optional. Default <see cref="LogLevel.Info" />.</param>
/// <param name="color">Optional. Default automatic color.</param>
void Write(string message, LogLevel level = LogLevel.Info, ConsoleColor color = ConsoleColor.Black);
+
void lineSelect(int lineChar = 0, int linesUp = 1);
}
}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Logging/Logger.cs b/PokemonGo.RocketBot.Logic/Logging/Logger.cs
index 1806d24..bd2169b 100644
--- a/PokemonGo.RocketBot.Logic/Logging/Logger.cs
+++ b/PokemonGo.RocketBot.Logic/Logging/Logger.cs
@@ -77,7 +77,8 @@ namespace PokemonGo.RocketBot.Logic.Logging
/// <param name="message">The message to log.</param>
/// <param name="level">Optional level to log. Default <see cref="LogLevel.Info" />.</param>
/// <param name="color">Optional. Default is automatic color.</param>
- public static void Write(string message, LogLevel level = LogLevel.Info, ConsoleColor color = ConsoleColor.Black, bool force = false)
+ public static void Write(string message, LogLevel level = LogLevel.Info, ConsoleColor color = ConsoleColor.Black,
+ bool force = false)
{
if (_logger == null || _lastLogMessage == message)
return;
@@ -114,6 +115,6 @@ namespace PokemonGo.RocketBot.Logic.Logging
New = 15,
SoftBan = 16,
LevelUp = 17,
- Debug = 18,
+ Debug = 18
}
}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Navigation.cs b/PokemonGo.RocketBot.Logic/Navigation.cs
index 7b7b661..a20be61 100644
--- a/PokemonGo.RocketBot.Logic/Navigation.cs
+++ b/PokemonGo.RocketBot.Logic/Navigation.cs
@@ -22,6 +22,8 @@ namespace PokemonGo.RocketBot.Logic
{
public delegate void UpdatePositionDelegate(double lat, double lng);
+ public delegate void GetHumanizeRouteDelegate(List<GeoCoordinate> route, GeoCoordinate destination);
+
public class Navigation
{
private const double SpeedDownTo = 10/3.6;
@@ -210,6 +212,8 @@ namespace PokemonGo.RocketBot.Logic
foreach (var item in route)
points.Add(new GeoCoordinate(item.ToArray()[1], item.ToArray()[0]));
+ OnGetHumanizeRouteEvent(points, targetLocation);
+
for (var i = 0; i < points.Count; i++)
{
var speedInMetersPerSecond = session.LogicSettings.UseWalkingSpeedVariant
@@ -413,5 +417,11 @@ namespace PokemonGo.RocketBot.Logic
}
public event UpdatePositionDelegate UpdatePositionEvent;
+ public static event GetHumanizeRouteDelegate GetHumanizeRouteEvent;
+
+ protected virtual void OnGetHumanizeRouteEvent(List<GeoCoordinate> route, GeoCoordinate destination)
+ {
+ GetHumanizeRouteEvent?.Invoke(route, destination);
+ }
}
}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/PoGoUtils/PokemonInfo.cs b/PokemonGo.RocketBot.Logic/PoGoUtils/PokemonInfo.cs
index 78fe88c..b9908dd 100644
--- a/PokemonGo.RocketBot.Logic/PoGoUtils/PokemonInfo.cs
+++ b/PokemonGo.RocketBot.Logic/PoGoUtils/PokemonInfo.cs
@@ -1,12 +1,12 @@
#region using directives
using System;
+using System.Collections.Generic;
+using System.Linq;
using POGOProtos.Data;
using POGOProtos.Enums;
using POGOProtos.Inventory;
-using System.Collections.Generic;
using POGOProtos.Settings.Master;
-using System.Linq;
#endregion
@@ -583,7 +583,8 @@ namespace PokemonGo.RocketBot.Logic.PoGoUtils
return move2;
}
- public static int GetCandy(PokemonData pokemon, List<Candy> PokemonFamilies, IEnumerable<PokemonSettings> PokemonSettings)
+ public static int GetCandy(PokemonData pokemon, List<Candy> PokemonFamilies,
+ IEnumerable<PokemonSettings> PokemonSettings)
{
var setting = PokemonSettings.FirstOrDefault(q => pokemon != null && q.PokemonId.Equals(pokemon.PokemonId));
var family = PokemonFamilies.FirstOrDefault(q => setting != null && q.FamilyId.Equals(setting.FamilyId));
@@ -596,4 +597,4 @@ namespace PokemonGo.RocketBot.Logic.PoGoUtils
return (int) (GetLevel(poke)*2.0);
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/PokemonGo.RocketBot.Logic.csproj b/PokemonGo.RocketBot.Logic/PokemonGo.RocketBot.Logic.csproj
index 4e780b9..43977d9 100644
--- a/PokemonGo.RocketBot.Logic/PokemonGo.RocketBot.Logic.csproj
+++ b/PokemonGo.RocketBot.Logic/PokemonGo.RocketBot.Logic.csproj
@@ -49,6 +49,10 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="C5, Version=2.4.5947.17248, Culture=neutral, PublicKeyToken=282361b99ded7e8e, processorArchitecture=MSIL">
+ <HintPath>..\packages\C5.2.4.5947.17249\lib\net45\C5.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
<Reference Include="CloudFlareUtilities, Version=0.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\CloudFlareUtilities.0.2.1-alpha\lib\portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10\CloudFlareUtilities.dll</HintPath>
<Private>True</Private>
@@ -65,8 +69,12 @@
<HintPath>..\packages\GMap.NET.WindowsForms.1.7.1\lib\net40\GMap.NET.WindowsForms.dll</HintPath>
<Private>True</Private>
</Reference>
+ <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
+ <HintPath>..\packages\Google.Protobuf.3.0.0\lib\net45\Google.Protobuf.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
<Reference Include="S2Geometry, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>$(SolutionDir)\packages\S2Geometry.1.0.1\lib\portable-net45+wp8+win8\S2Geometry.dll</HintPath>
+ <HintPath>..\packages\S2Geometry.1.0.3\lib\portable-net45+wp8+win8\S2Geometry.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SocketIoClientDotNet, Version=0.9.13.0, Culture=neutral, processorArchitecture=MSIL">
@@ -74,7 +82,9 @@
<Private>True</Private>
</Reference>
<Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
+ <Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
@@ -82,16 +92,19 @@
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Net.Http" />
- <Reference Include="System.Xml" />
- <Reference Include="Google.Protobuf, Version=3.0.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604">
- <HintPath>$(SolutionDir)\packages\Google.Protobuf.3.0.0-beta4\lib\net45\Google.Protobuf.dll</HintPath>
+ <Reference Include="System.Numerics" />
+ <Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.0.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
+ <Private>True</Private>
</Reference>
+ <Reference Include="System.Xml" />
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
<HintPath>$(SolutionDir)\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="GeoCoordinatePortable">
<HintPath>$(SolutionDir)\packages\GeoCoordinate.1.1.0\lib\portable-net45+wp80+win+wpa81\GeoCoordinatePortable.dll</HintPath>
</Reference>
+ <Reference Include="System.Xml.Linq" />
<Reference Include="Telegram.Bot, Version=10.3.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Telegram.Bot.10.3.1\lib\net45\Telegram.Bot.dll</HintPath>
<Private>True</Private>
@@ -110,6 +123,7 @@
<Compile Include="Event\FortTargetEvent.cs" />
<Compile Include="Event\FortFailedEvent.cs" />
<Compile Include="Event\FortUsedEvent.cs" />
+ <Compile Include="Event\GetHumanizeRouteEvent.cs" />
<Compile Include="Event\HumanWalkingEvent.cs" />
<Compile Include="Event\InventoryListEvent.cs" />
<Compile Include="Event\ItemRecycledEvent.cs" />
diff --git a/PokemonGo.RocketBot.Logic/Service/TelegramService.cs b/PokemonGo.RocketBot.Logic/Service/TelegramService.cs
index 8696f6f..f1f7399 100644
--- a/PokemonGo.RocketBot.Logic/Service/TelegramService.cs
+++ b/PokemonGo.RocketBot.Logic/Service/TelegramService.cs
@@ -1,16 +1,12 @@
-using PokemonGo.RocketBot.Logic.Logging;
-using PokemonGo.RocketBot.Logic.State;
-using System;
+using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
using PokemonGo.RocketBot.Logic.Common;
using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.PoGoUtils;
+using PokemonGo.RocketBot.Logic.State;
using POGOProtos.Data;
using POGOProtos.Enums;
using POGOProtos.Inventory.Item;
@@ -23,12 +19,12 @@ namespace PokemonGo.RocketBot.Logic.Service
{
public class TelegramService
{
- private TelegramBotClient bot;
- private ISession session;
+ private readonly TelegramBotClient bot;
+ private readonly ISession session;
public TelegramService(string apiKey, ISession session)
{
- this.bot = new TelegramBotClient(apiKey);
+ bot = new TelegramBotClient(apiKey);
this.session = session;
var me = bot.GetMeAsync().Result;
@@ -81,14 +77,15 @@ namespace PokemonGo.RocketBot.Logic.Service
foreach (var pokemon in topPokemons)
{
- answerTextmessage += session.Translation.GetTranslation(TranslationString.ShowPokeTemplate, new object[] { pokemon.Cp, PokemonInfo.CalculatePokemonPerfection(pokemon).ToString("0.00"), session.Translation.GetPokemonTranslation(pokemon.PokemonId) });
+ answerTextmessage += session.Translation.GetTranslation(TranslationString.ShowPokeTemplate,
+ pokemon.Cp, PokemonInfo.CalculatePokemonPerfection(pokemon).ToString("0.00"),
+ session.Translation.GetPokemonTranslation(pokemon.PokemonId));
if (answerTextmessage.Length > 3800)
{
SendMessage(message.Chat.Id, answerTextmessage);
answerTextmessage = "";
}
-
}
SendMessage(message.Chat.Id, answerTextmessage);
break;
@@ -96,7 +93,8 @@ namespace PokemonGo.RocketBot.Logic.Service
var myPokemons = await session.Inventory.GetPokemons();
var allMyPokemons = myPokemons.ToList();
- IEnumerable<PokemonData> allPokemons = await session.Inventory.GetHighestsCp(allMyPokemons.Count); ;
+ var allPokemons = await session.Inventory.GetHighestsCp(allMyPokemons.Count);
+ ;
if (messagetext.Length == 2)
{
if (messagetext[1] == "iv")
@@ -107,7 +105,9 @@ namespace PokemonGo.RocketBot.Logic.Service
foreach (var pokemon in allPokemons)
{
- answerTextmessage += session.Translation.GetTranslation(TranslationString.ShowPokeTemplate, new object[] { pokemon.Cp, PokemonInfo.CalculatePokemonPerfection(pokemon).ToString("0.00"), session.Translation.GetPokemonTranslation(pokemon.PokemonId) });
+ answerTextmessage += session.Translation.GetTranslation(TranslationString.ShowPokeTemplate,
+ pokemon.Cp, PokemonInfo.CalculatePokemonPerfection(pokemon).ToString("0.00"),
+ session.Translation.GetPokemonTranslation(pokemon.PokemonId));
if (answerTextmessage.Length > 3800)
{
@@ -122,22 +122,11 @@ namespace PokemonGo.RocketBot.Logic.Service
var stat = stats.FirstOrDefault();
var myPokemons2 = await session.Inventory.GetPokemons();
- answerTextmessage += session.Translation.GetTranslation(TranslationString.ProfileStatsTemplateString,
- new object[]
- {
- stat.Level,
- session.Profile.PlayerData.Username,
- stat.Experience, stat.NextLevelXp,
- stat.PokemonsCaptured,
- stat.PokemonDeployed,
- stat.PokeStopVisits,
- stat.EggsHatched,
- stat.Evolutions,
- stat.UniquePokedexEntries,
- stat.KmWalked,
- myPokemons2.ToList().Count,
- session.Profile.PlayerData.MaxPokemonStorage
- });
+ answerTextmessage += session.Translation.GetTranslation(
+ TranslationString.ProfileStatsTemplateString, stat.Level, session.Profile.PlayerData.Username,
+ stat.Experience, stat.NextLevelXp, stat.PokemonsCaptured, stat.PokemonDeployed,
+ stat.PokeStopVisits, stat.EggsHatched, stat.Evolutions, stat.UniquePokedexEntries, stat.KmWalked,
+ myPokemons2.ToList().Count, session.Profile.PlayerData.MaxPokemonStorage);
SendMessage(message.Chat.Id, answerTextmessage);
break;
case "/pokedex":
@@ -147,7 +136,13 @@ namespace PokemonGo.RocketBot.Logic.Service
answerTextmessage += session.Translation.GetTranslation(TranslationString.PokedexCatchedTelegram);
foreach (var pokedexItem in pokedexSort)
{
- answerTextmessage += session.Translation.GetTranslation(TranslationString.PokedexPokemonCatchedTelegram, Convert.ToInt32(pokedexItem.InventoryItemData.PokedexEntry.PokemonId), session.Translation.GetPokemonTranslation(pokedexItem.InventoryItemData.PokedexEntry.PokemonId), pokedexItem.InventoryItemData.PokedexEntry.TimesCaptured, pokedexItem.InventoryItemData.PokedexEntry.TimesEncountered);
+ answerTextmessage +=
+ session.Translation.GetTranslation(TranslationString.PokedexPokemonCatchedTelegram,
+ Convert.ToInt32(pokedexItem.InventoryItemData.PokedexEntry.PokemonId),
+ session.Translation.GetPokemonTranslation(
+ pokedexItem.InventoryItemData.PokedexEntry.PokemonId),
+ pokedexItem.InventoryItemData.PokedexEntry.TimesCaptured,
+ pokedexItem.InventoryItemData.PokedexEntry.TimesEncountered);
if (answerTextmessage.Length > 3800)
{
@@ -156,16 +151,21 @@ namespace PokemonGo.RocketBot.Logic.Service
}
}
- var pokemonsToCapture = Enum.GetValues(typeof(PokemonId)).Cast<PokemonId>().Except(pokedex.Select(x => x.InventoryItemData.PokedexEntry.PokemonId));
+ var pokemonsToCapture =
+ Enum.GetValues(typeof(PokemonId))
+ .Cast<PokemonId>()
+ .Except(pokedex.Select(x => x.InventoryItemData.PokedexEntry.PokemonId));
SendMessage(message.Chat.Id, answerTextmessage);
- answerTextmessage = "";
+ answerTextmessage = "";
answerTextmessage += session.Translation.GetTranslation(TranslationString.PokedexNeededTelegram);
foreach (var pokedexItem in pokemonsToCapture)
{
- answerTextmessage += session.Translation.GetTranslation(TranslationString.PokedexPokemonNeededTelegram, Convert.ToInt32(pokedexItem), session.Translation.GetPokemonTranslation(pokedexItem));
+ answerTextmessage +=
+ session.Translation.GetTranslation(TranslationString.PokedexPokemonNeededTelegram,
+ Convert.ToInt32(pokedexItem), session.Translation.GetPokemonTranslation(pokedexItem));
if (answerTextmessage.Length > 3800)
{
@@ -182,45 +182,33 @@ namespace PokemonGo.RocketBot.Logic.Service
case "/items":
var inventory = session.Inventory;
answerTextmessage += session.Translation.GetTranslation(TranslationString.CurrentPokeballInv,
- new object[]
- {
- await inventory.GetItemAmountByType(ItemId.ItemPokeBall),
- await inventory.GetItemAmountByType(ItemId.ItemGreatBall),
- await inventory.GetItemAmountByType(ItemId.ItemUltraBall),
- await inventory.GetItemAmountByType(ItemId.ItemMasterBall)
- });
+ await inventory.GetItemAmountByType(ItemId.ItemPokeBall),
+ await inventory.GetItemAmountByType(ItemId.ItemGreatBall),
+ await inventory.GetItemAmountByType(ItemId.ItemUltraBall),
+ await inventory.GetItemAmountByType(ItemId.ItemMasterBall));
answerTextmessage += "\n";
answerTextmessage += session.Translation.GetTranslation(TranslationString.CurrentPotionInv,
- new object[]
- {
- await inventory.GetItemAmountByType(ItemId.ItemPotion),
- await inventory.GetItemAmountByType(ItemId.ItemSuperPotion),
- await inventory.GetItemAmountByType(ItemId.ItemHyperPotion),
- await inventory.GetItemAmountByType(ItemId.ItemMaxPotion)
- });
+ await inventory.GetItemAmountByType(ItemId.ItemPotion),
+ await inventory.GetItemAmountByType(ItemId.ItemSuperPotion),
+ await inventory.GetItemAmountByType(ItemId.ItemHyperPotion),
+ await inventory.GetItemAmountByType(ItemId.ItemMaxPotion));
answerTextmessage += "\n";
answerTextmessage += session.Translation.GetTranslation(TranslationString.CurrentReviveInv,
- new object[]
- {
- await inventory.GetItemAmountByType(ItemId.ItemRevive),
- await inventory.GetItemAmountByType(ItemId.ItemMaxRevive),
- });
+ await inventory.GetItemAmountByType(ItemId.ItemRevive),
+ await inventory.GetItemAmountByType(ItemId.ItemMaxRevive));
answerTextmessage += "\n";
answerTextmessage += session.Translation.GetTranslation(TranslationString.CurrentMiscItemInv,
- new object[]
- {
- await session.Inventory.GetItemAmountByType(ItemId.ItemRazzBerry) +
- await session.Inventory.GetItemAmountByType(ItemId.ItemBlukBerry) +
- await session.Inventory.GetItemAmountByType(ItemId.ItemNanabBerry) +
- await session.Inventory.GetItemAmountByType(ItemId.ItemWeparBerry) +
- await session.Inventory.GetItemAmountByType(ItemId.ItemPinapBerry),
- await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseOrdinary) +
- await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseSpicy) +
- await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseCool) +
- await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseFloral),
- await session.Inventory.GetItemAmountByType(ItemId.ItemLuckyEgg),
- await session.Inventory.GetItemAmountByType(ItemId.ItemTroyDisk)
- });
+ await session.Inventory.GetItemAmountByType(ItemId.ItemRazzBerry) +
+ await session.Inventory.GetItemAmountByType(ItemId.ItemBlukBerry) +
+ await session.Inventory.GetItemAmountByType(ItemId.ItemNanabBerry) +
+ await session.Inventory.GetItemAmountByType(ItemId.ItemWeparBerry) +
+ await session.Inventory.GetItemAmountByType(ItemId.ItemPinapBerry),
+ await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseOrdinary) +
+ await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseSpicy) +
+ await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseCool) +
+ await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseFloral),
+ await session.Inventory.GetItemAmountByType(ItemId.ItemLuckyEgg),
+ await session.Inventory.GetItemAmountByType(ItemId.ItemTroyDisk));
SendMessage(message.Chat.Id, answerTextmessage);
break;
case "/status":
@@ -240,12 +228,11 @@ namespace PokemonGo.RocketBot.Logic.Service
private async void SendLocation(long chatID, double currentLatitude, double currentLongitude)
{
- await bot.SendLocationAsync(chatID, (float)currentLatitude, (float)currentLongitude);
+ await bot.SendLocationAsync(chatID, (float) currentLatitude, (float) currentLongitude);
}
private async void SendMessage(long chatID, string message)
{
-
await bot.SendTextMessageAsync(chatID, message, replyMarkup: new ReplyKeyboardHide());
}
}
diff --git a/PokemonGo.RocketBot.Logic/Settings.cs b/PokemonGo.RocketBot.Logic/Settings.cs
index d29b185..f03727a 100644
--- a/PokemonGo.RocketBot.Logic/Settings.cs
+++ b/PokemonGo.RocketBot.Logic/Settings.cs
@@ -27,37 +27,38 @@ namespace PokemonGo.RocketBot.Logic
public class AuthSettings
{
[JsonIgnore] private string _filePath;
-
- public AuthType AuthType;
- public string GoogleUsername;
- public string GooglePassword;
- public string PtcUsername;
- public string PtcPassword;
- public string GoogleApiKey;
- public bool UseProxy;
- public string UseProxyHost;
- public string UseProxyPort;
- public bool UseProxyAuthentication;
- public string UseProxyUsername;
- public string UseProxyPassword;
- // device data
- [DefaultValue("random")] public string DevicePackageName;
- [DefaultValue("8525f5d8201f78b5")] public string DeviceId;
[DefaultValue("msm8996")] public string AndroidBoardName;
[DefaultValue("1.0.0.0000")] public string AndroidBootloader;
+
+ public AuthType AuthType;
[DefaultValue("HTC")] public string DeviceBrand;
+ [DefaultValue("8525f5d8201f78b5")] public string DeviceId;
[DefaultValue("HTC 10")] public string DeviceModel;
- [DefaultValue("pmewl_00531")] public string DeviceModelIdentifier;
[DefaultValue("qcom")] public string DeviceModelBoot;
- [DefaultValue("HTC")] public string HardwareManufacturer;
- [DefaultValue("HTC 10")] public string HardwareModel;
+ [DefaultValue("pmewl_00531")] public string DeviceModelIdentifier;
+ // device data
+ [DefaultValue("random")] public string DevicePackageName;
[DefaultValue("pmewl_00531")] public string FirmwareBrand;
- [DefaultValue("release-keys")] public string FirmwareTags;
- [DefaultValue("user")] public string FirmwareType;
[DefaultValue("htc/pmewl_00531/htc_pmewl:6.0.1/MMB29M/770927.1:user/release-keys")] public string
FirmwareFingerprint;
+ [DefaultValue("release-keys")] public string FirmwareTags;
+ [DefaultValue("user")] public string FirmwareType;
+ public string GoogleApiKey;
+ public string GooglePassword;
+ public string GoogleUsername;
+ [DefaultValue("HTC")] public string HardwareManufacturer;
+ [DefaultValue("HTC 10")] public string HardwareModel;
+ public string PtcPassword;
+ public string PtcUsername;
+ public bool UseProxy;
+ public bool UseProxyAuthentication;
+ public string UseProxyHost;
+ public string UseProxyPassword;
+ public string UseProxyPort;
+ public string UseProxyUsername;
+
public AuthSettings()
{
InitializePropertyDefaultValues(this);
@@ -65,9 +66,9 @@ namespace PokemonGo.RocketBot.Logic
public void InitializePropertyDefaultValues(object obj)
{
- FieldInfo[] fields = obj.GetType().GetFields();
+ var fields = obj.GetType().GetFields();
- foreach (FieldInfo field in fields)
+ foreach (var field in fields)
{
var d = field.GetCustomAttribute<DefaultValueAttribute>();
@@ -96,21 +97,21 @@ namespace PokemonGo.RocketBot.Logic
!DevicePackageName.Equals("custom", StringComparison.InvariantCultureIgnoreCase))
{
// User requested a specific device package, check to see if it exists and if so, set it up - otherwise fall-back to random package
- string keepDevId = DeviceId;
+ var keepDevId = DeviceId;
SetDevInfoByKey();
DeviceId = keepDevId;
}
if (DevicePackageName.Equals("random", StringComparison.InvariantCultureIgnoreCase))
{
// Random is set, so pick a random device package and set it up - it will get saved to disk below and re-used in subsequent sessions
- Random rnd = new Random();
- int rndIdx = rnd.Next(0, DeviceInfoHelper.DeviceInfoSets.Keys.Count - 1);
+ var rnd = new Random();
+ var rndIdx = rnd.Next(0, DeviceInfoHelper.DeviceInfoSets.Keys.Count - 1);
DevicePackageName = DeviceInfoHelper.DeviceInfoSets.Keys.ToArray()[rndIdx];
SetDevInfoByKey();
}
if (string.IsNullOrEmpty(DeviceId) || DeviceId == "8525f5d8201f78b5")
DeviceId = RandomString(16, "0123456789abcdef");
- // changed to random hex as full alphabet letters could have been flagged
+ // changed to random hex as full alphabet letters could have been flagged
// Jurann: Note that some device IDs I saw when adding devices had smaller numbers, only 12 or 14 chars instead of 16 - probably not important but noted here anyway
@@ -172,17 +173,17 @@ namespace PokemonGo.RocketBot.Logic
{
using (var tempWebClient = new NecroWebClient())
{
- string unproxiedIp = WebClientExtensions.DownloadString(tempWebClient,
+ var unproxiedIp = WebClientExtensions.DownloadString(tempWebClient,
new Uri("https://api.ipify.org/?format=text"));
if (UseProxy)
{
tempWebClient.Proxy = InitProxy();
- string proxiedIPres = WebClientExtensions.DownloadString(tempWebClient,
+ var proxiedIPres = WebClientExtensions.DownloadString(tempWebClient,
new Uri("https://api.ipify.org/?format=text"));
- string proxiedIp = proxiedIPres == null ? "INVALID PROXY" : proxiedIPres;
+ var proxiedIp = proxiedIPres == null ? "INVALID PROXY" : proxiedIPres;
Logger.Write(
$"Your IP is: {unproxiedIp} / Proxy IP is: {proxiedIp}",
- LogLevel.Info, (unproxiedIp == proxiedIp) ? ConsoleColor.Red : ConsoleColor.Green);
+ LogLevel.Info, unproxiedIp == proxiedIp ? ConsoleColor.Red : ConsoleColor.Green);
if (unproxiedIp == proxiedIp || proxiedIPres == null)
{
@@ -203,11 +204,11 @@ namespace PokemonGo.RocketBot.Logic
private string RandomString(int length, string alphabet = "abcdefghijklmnopqrstuvwxyz0123456789")
{
- var outOfRange = Byte.MaxValue + 1 - (Byte.MaxValue + 1)%alphabet.Length;
+ var outOfRange = byte.MaxValue + 1 - (byte.MaxValue + 1)%alphabet.Length;
return string.Concat(
Enumerable
- .Repeat(0, Int32.MaxValue)
+ .Repeat(0, int.MaxValue)
.Select(e => RandomByte())
.Where(randomByte => randomByte < outOfRange)
.Take(length)
@@ -257,7 +258,7 @@ namespace PokemonGo.RocketBot.Logic
{
if (!UseProxy) return null;
- WebProxy prox = new WebProxy(new Uri($"http://{UseProxyHost}:{UseProxyPort}"), false, null);
+ var prox = new WebProxy(new Uri($"http://{UseProxyHost}:{UseProxyPort}"), false, null);
if (UseProxyAuthentication)
prox.Credentials = new NetworkCredential(UseProxyUsername, UseProxyPassword);
@@ -268,153 +269,55 @@ namespace PokemonGo.RocketBot.Logic
public class GlobalSettings
{
+ //console options
+ [DefaultValue(10)] public int AmountOfPokemonToDisplayOnStart;
+ [DefaultValue(5)] public int AmountOfTimesToUpgradeLoop;
[JsonIgnore] public AuthSettings Auth = new AuthSettings();
- [JsonIgnore] public string GeneralConfigPath;
- [JsonIgnore] public string ProfileConfigPath;
- [JsonIgnore] public string ProfilePath;
-
- [JsonIgnore] public bool IsGui;
-
- [DefaultValue("en")] public string TranslationLanguageCode;
+ [DefaultValue(false)] public bool AutoFavoritePokemon;
+ //powerup
+ [DefaultValue(false)] public bool AutomaticallyLevelUpPokemon;
//autoupdate
[DefaultValue(true)] public bool AutoUpdate;
- [DefaultValue(true)] public bool TransferConfigAndAuthOnUpdate;
- //websockets
- [DefaultValue(false)] public bool UseWebsocket;
- [DefaultValue(14251)] public int WebSocketPort;
- //pressakeyshit
- [DefaultValue(false)] public bool StartupWelcomeDelay;
- //Telegram
- [DefaultValue(false)] public bool UseTelegramApi;
- [DefaultValue(null)] public string TelegramApiKey;
-
- //console options
- [DefaultValue(10)] public int AmountOfPokemonToDisplayOnStart;
- [DefaultValue(true)] public bool DetailedCountsBeforeRecycling;
-
- [DefaultValue(3)] public int MaxBerriesToUsePerPokemon;
//pokemon
[DefaultValue(true)] public bool CatchPokemon;
- //powerup
- [DefaultValue(false)] public bool AutomaticallyLevelUpPokemon;
- [DefaultValue(true)] public bool OnlyUpgradeFavorites;
-
- [DefaultValue((true))] public bool UseLevelUpList;
- [DefaultValue(5)] public int AmountOfTimesToUpgradeLoop;
- [DefaultValue(5000)] public int GetMinStarDustForLevelUp;
- [DefaultValue("iv")] public string LevelUpByCPorIv;
- [DefaultValue(1000)] public float UpgradePokemonCpMinimum;
- [DefaultValue(95)] public float UpgradePokemonIvMinimum;
- [DefaultValue("and")] public string UpgradePokemonMinimumStatsOperator;
- //position
- [DefaultValue(false)] public bool DisableHumanWalking;
+ [DefaultValue(90)] public int CurveThrowChance;
[DefaultValue(40.785091)] public double DefaultLatitude;
[DefaultValue(-73.968285)] public double DefaultLongitude;
- [DefaultValue(19.0)] public double WalkingSpeedInKilometerPerHour;
- [DefaultValue(2)] public double WalkingSpeedOffSetInKilometerPerHour;
- [DefaultValue(true)] public bool UseWalkingSpeedVariant;
- [DefaultValue(1.2)] public double WalkingSpeedVariant;
- [DefaultValue(true)] public bool ShowVariantWalking;
-
-
- public int MaxSpawnLocationOffset;
- //softban related
- [DefaultValue(false)] public bool FastSoftBanBypass;
//delays
[DefaultValue(500)] public int DelayBetweenPlayerActions;
[DefaultValue(100)] public int DelayBetweenPokemonCatch;
+ [DefaultValue(false)] public bool DelayBetweenRecycleActions;
+ [DefaultValue(true)] public bool DetailedCountsBeforeRecycling;
+ //position
+ [DefaultValue(false)] public bool DisableHumanWalking;
//dump stats
[DefaultValue(false)] public bool DumpPokemonStats;
+ //customizable catch
+ [DefaultValue(false)] public bool EnableHumanizedThrows;
//evolve
[DefaultValue(95)] public float EvolveAboveIvValue;
[DefaultValue(false)] public bool EvolveAllPokemonAboveIv;
[DefaultValue(true)] public bool EvolveAllPokemonWithEnoughCandy;
[DefaultValue(90.0)] public double EvolveKeptPokemonsAtStorageUsagePercentage;
- [DefaultValue(false)] public bool KeepPokemonsThatCanEvolve;
- //keeping
- [DefaultValue(1250)] public int KeepMinCp;
- [DefaultValue(90)] public float KeepMinIvPercentage;
- [DefaultValue(6)] public int KeepMinLvl;
- [DefaultValue("or")] public string KeepMinOperator;
- [DefaultValue(false)] public bool UseKeepMinLvl;
- [DefaultValue(false)] public bool PrioritizeIvOverCp;
- [DefaultValue(0)] public int KeepMinDuplicatePokemon;
- //gpx
- [DefaultValue(false)] public bool UseGpxPathing;
- [DefaultValue("GPXPath.GPX")] public string GpxFile;
- //recycle
- [DefaultValue(true)] public bool VerboseRecycling;
- [DefaultValue(90.0)] public double RecycleInventoryAtUsagePercentage;
- [DefaultValue(false)] public bool RandomizeRecycle;
- [DefaultValue(5)] public int RandomRecycleValue;
- [DefaultValue(false)] public bool DelayBetweenRecycleActions;
- //lucky, incense and berries
- [DefaultValue(true)] public bool UseEggIncubators;
- [DefaultValue(false)] public bool UseLuckyEggConstantly;
- [DefaultValue(30)] public int UseLuckyEggsMinPokemonAmount;
- [DefaultValue(false)] public bool UseLuckyEggsWhileEvolving;
- [DefaultValue(false)] public bool UseIncenseConstantly;
- [DefaultValue(1000)] public int UseBerriesMinCp;
- [DefaultValue(90)] public float UseBerriesMinIv;
- [DefaultValue(0.20)] public double UseBerriesBelowCatchProbability;
- [DefaultValue("or")] public string UseBerriesOperator;
- //snipe
- [DefaultValue(false)] public bool UseSnipeLocationServer;
- [DefaultValue("localhost")] public string SnipeLocationServer;
- [DefaultValue(16969)] public int SnipeLocationServerPort;
- [DefaultValue(true)] public bool GetSniperInfoFromPokezz;
+ [DefaultValue(10)] public int ExcellentThrowChance;
+ //softban related
+ [DefaultValue(false)] public bool FastSoftBanBypass;
+ //favorite
+ [DefaultValue(95)] public float FavoriteMinIvPercentage;
+ [DefaultValue(1500)] public int ForceExcellentThrowOverCp;
+ [DefaultValue(95.00)] public double ForceExcellentThrowOverIv;
+ [DefaultValue(1000)] public int ForceGreatThrowOverCp;
+ [DefaultValue(90.00)] public double ForceGreatThrowOverIv;
+ [JsonIgnore] public string GeneralConfigPath;
+ [DefaultValue(5000)] public int GetMinStarDustForLevelUp;
[DefaultValue(true)] public bool GetOnlyVerifiedSniperInfoFromPokezz;
[DefaultValue(true)] public bool GetSniperInfoFromPokeSnipers;
[DefaultValue(true)] public bool GetSniperInfoFromPokeWatchers;
- [DefaultValue(true)] public bool SnipeWithSkiplagged;
- [DefaultValue(20)] public int MinPokeballsToSnipe;
- [DefaultValue(0)] public int MinPokeballsWhileSnipe;
- [DefaultValue(60000)] public int MinDelayBetweenSnipes;
- [DefaultValue(0.005)] public double SnipingScanOffset;
- [DefaultValue(false)] public bool SnipeAtPokestops;
- [DefaultValue(false)] public bool SnipeIgnoreUnknownIv;
- [DefaultValue(false)] public bool UseTransferIvForSnipe;
- [DefaultValue(false)] public bool SnipePokemonNotInPokedex;
- //rename
- [DefaultValue(false)] public bool RenamePokemon;
- [DefaultValue(true)] public bool RenameOnlyAboveIv;
- [DefaultValue("{1}_{0}")] public string RenameTemplate;
- //amounts
- [DefaultValue(6)] public int MaxPokeballsPerPokemon;
- [DefaultValue(1000)] public int MaxTravelDistanceInMeters;
- [DefaultValue(120)] public int TotalAmountOfPokeballsToKeep;
- [DefaultValue(80)] public int TotalAmountOfPotionsToKeep;
- [DefaultValue(60)] public int TotalAmountOfRevivesToKeep;
- [DefaultValue(50)] public int TotalAmountOfBerriesToKeep;
- //balls
- [DefaultValue(1000)] public int UseGreatBallAboveCp;
- [DefaultValue(1250)] public int UseUltraBallAboveCp;
- [DefaultValue(1500)] public int UseMasterBallAboveCp;
- [DefaultValue(85.0)] public double UseGreatBallAboveIv;
- [DefaultValue(95.0)] public double UseUltraBallAboveIv;
- [DefaultValue(0.2)] public double UseGreatBallBelowCatchProbability;
- [DefaultValue(0.1)] public double UseUltraBallBelowCatchProbability;
- [DefaultValue(0.05)] public double UseMasterBallBelowCatchProbability;
- //customizable catch
- [DefaultValue(false)] public bool EnableHumanizedThrows;
- [DefaultValue(40)] public int NiceThrowChance;
+ [DefaultValue(true)] public bool GetSniperInfoFromPokezz;
+ [DefaultValue("GPXPath.GPX")] public string GpxFile;
[DefaultValue(30)] public int GreatThrowChance;
- [DefaultValue(10)] public int ExcellentThrowChance;
- [DefaultValue(90)] public int CurveThrowChance;
- [DefaultValue(90.00)] public double ForceGreatThrowOverIv;
- [DefaultValue(95.00)] public double ForceExcellentThrowOverIv;
- [DefaultValue(1000)] public int ForceGreatThrowOverCp;
- [DefaultValue(1500)] public int ForceExcellentThrowOverCp;
- //transfer
- [DefaultValue(false)] public bool TransferWeakPokemon;
- [DefaultValue(true)] public bool TransferDuplicatePokemon;
- [DefaultValue(true)] public bool TransferDuplicatePokemonOnCapture;
- //favorite
- [DefaultValue(95)] public float FavoriteMinIvPercentage;
- [DefaultValue(false)] public bool AutoFavoritePokemon;
- //notcatch
- [DefaultValue(false)] public bool UsePokemonToNotCatchFilter;
- [DefaultValue(false)] public bool UsePokemonSniperFilterOnly;
+
+ [JsonIgnore] public bool IsGui;
public List<KeyValuePair<ItemId, int>> ItemRecycleFilter = new List<KeyValuePair<ItemId, int>>
{
@@ -435,6 +338,28 @@ namespace PokemonGo.RocketBot.Logic
new KeyValuePair<ItemId, int>(ItemId.ItemItemStorageUpgrade, 100)
};
+ //keeping
+ [DefaultValue(1250)] public int KeepMinCp;
+ [DefaultValue(0)] public int KeepMinDuplicatePokemon;
+ [DefaultValue(90)] public float KeepMinIvPercentage;
+ [DefaultValue(6)] public int KeepMinLvl;
+ [DefaultValue("or")] public string KeepMinOperator;
+ [DefaultValue(false)] public bool KeepPokemonsThatCanEvolve;
+ [DefaultValue("iv")] public string LevelUpByCPorIv;
+
+ [DefaultValue(3)] public int MaxBerriesToUsePerPokemon;
+ //amounts
+ [DefaultValue(6)] public int MaxPokeballsPerPokemon;
+
+
+ public int MaxSpawnLocationOffset;
+ [DefaultValue(1000)] public int MaxTravelDistanceInMeters;
+ [DefaultValue(60000)] public int MinDelayBetweenSnipes;
+ [DefaultValue(20)] public int MinPokeballsToSnipe;
+ [DefaultValue(0)] public int MinPokeballsWhileSnipe;
+ [DefaultValue(40)] public int NiceThrowChance;
+ [DefaultValue(true)] public bool OnlyUpgradeFavorites;
+
public List<PokemonId> PokemonsNotToTransfer = new List<PokemonId>
{
@@ -516,7 +441,7 @@ namespace PokemonGo.RocketBot.Logic
//PokemonId.Staryu
};
- public List<PokemonId> PokemonsToLevelUp = new List<PokemonId>
+ public List<PokemonId> PokemonsToIgnore = new List<PokemonId>
{
//criteria: most common
PokemonId.Caterpie,
@@ -528,7 +453,7 @@ namespace PokemonGo.RocketBot.Logic
PokemonId.Doduo
};
- public List<PokemonId> PokemonsToIgnore = new List<PokemonId>
+ public List<PokemonId> PokemonsToLevelUp = new List<PokemonId>
{
//criteria: most common
PokemonId.Caterpie,
@@ -645,16 +570,95 @@ namespace PokemonGo.RocketBot.Logic
PokemonId.Mewtwo
};
+ [DefaultValue(false)] public bool PrioritizeIvOverCp;
+ [JsonIgnore] public string ProfileConfigPath;
+ [JsonIgnore] public string ProfilePath;
+ [DefaultValue(false)] public bool RandomizeRecycle;
+ [DefaultValue(5)] public int RandomRecycleValue;
+ [DefaultValue(90.0)] public double RecycleInventoryAtUsagePercentage;
+ [DefaultValue(true)] public bool RenameOnlyAboveIv;
+ //rename
+ [DefaultValue(false)] public bool RenamePokemon;
+ [DefaultValue("{1}_{0}")] public string RenameTemplate;
+ [DefaultValue(true)] public bool ShowVariantWalking;
+ [DefaultValue(false)] public bool SnipeAtPokestops;
+ [DefaultValue(false)] public bool SnipeIgnoreUnknownIv;
+ [DefaultValue("localhost")] public string SnipeLocationServer;
+ [DefaultValue(16969)] public int SnipeLocationServerPort;
+ [DefaultValue(false)] public bool SnipePokemonNotInPokedex;
+ [DefaultValue(true)] public bool SnipeWithSkiplagged;
+ [DefaultValue(0.005)] public double SnipingScanOffset;
+ //pressakeyshit
+ [DefaultValue(false)] public bool StartupWelcomeDelay;
+ [DefaultValue(null)] public string TelegramApiKey;
+ [DefaultValue(50)] public int TotalAmountOfBerriesToKeep;
+ [DefaultValue(120)] public int TotalAmountOfPokeballsToKeep;
+ [DefaultValue(80)] public int TotalAmountOfPotionsToKeep;
+ [DefaultValue(60)] public int TotalAmountOfRevivesToKeep;
+ [DefaultValue(true)] public bool TransferConfigAndAuthOnUpdate;
+ [DefaultValue(true)] public bool TransferDuplicatePokemon;
+ [DefaultValue(true)] public bool TransferDuplicatePokemonOnCapture;
+ //transfer
+ [DefaultValue(false)] public bool TransferWeakPokemon;
+
+ [DefaultValue("en")] public string TranslationLanguageCode;
+ [DefaultValue(1000)] public float UpgradePokemonCpMinimum;
+ [DefaultValue(95)] public float UpgradePokemonIvMinimum;
+ [DefaultValue("and")] public string UpgradePokemonMinimumStatsOperator;
+ [DefaultValue(0.20)] public double UseBerriesBelowCatchProbability;
+ [DefaultValue(1000)] public int UseBerriesMinCp;
+ [DefaultValue(90)] public float UseBerriesMinIv;
+ [DefaultValue("or")] public string UseBerriesOperator;
+ //lucky, incense and berries
+ [DefaultValue(true)] public bool UseEggIncubators;
+ //gpx
+ [DefaultValue(false)] public bool UseGpxPathing;
+ //balls
+ [DefaultValue(1000)] public int UseGreatBallAboveCp;
+ [DefaultValue(85.0)] public double UseGreatBallAboveIv;
+ [DefaultValue(0.2)] public double UseGreatBallBelowCatchProbability;
+ [DefaultValue(false)] public bool UseIncenseConstantly;
+ [DefaultValue(false)] public bool UseKeepMinLvl;
+
+ [DefaultValue(true)] public bool UseLevelUpList;
+ [DefaultValue(false)] public bool UseLuckyEggConstantly;
+ [DefaultValue(30)] public int UseLuckyEggsMinPokemonAmount;
+ [DefaultValue(false)] public bool UseLuckyEggsWhileEvolving;
+ [DefaultValue(1500)] public int UseMasterBallAboveCp;
+ [DefaultValue(0.05)] public double UseMasterBallBelowCatchProbability;
+ [DefaultValue(false)] public bool UsePokemonSniperFilterOnly;
+ //notcatch
+ [DefaultValue(false)] public bool UsePokemonToNotCatchFilter;
+ //snipe
+ [DefaultValue(false)] public bool UseSnipeLocationServer;
+ //Telegram
+ [DefaultValue(false)] public bool UseTelegramApi;
+ [DefaultValue(false)] public bool UseTransferIvForSnipe;
+ [DefaultValue(1250)] public int UseUltraBallAboveCp;
+ [DefaultValue(95.0)] public double UseUltraBallAboveIv;
+ [DefaultValue(0.1)] public double UseUltraBallBelowCatchProbability;
+ [DefaultValue(true)] public bool UseWalkingSpeedVariant;
+ //websockets
+ [DefaultValue(false)] public bool UseWebsocket;
+ //recycle
+ [DefaultValue(true)] public bool VerboseRecycling;
+ [DefaultValue(19.0)] public double WalkingSpeedInKilometerPerHour;
+ [DefaultValue(2)] public double WalkingSpeedOffSetInKilometerPerHour;
+ [DefaultValue(1.2)] public double WalkingSpeedVariant;
+ [DefaultValue(14251)] public int WebSocketPort;
+
public GlobalSettings()
{
InitializePropertyDefaultValues(this);
}
+ public static GlobalSettings Default => new GlobalSettings();
+
public void InitializePropertyDefaultValues(object obj)
{
- FieldInfo[] fields = obj.GetType().GetFields();
+ var fields = obj.GetType().GetFields();
- foreach (FieldInfo field in fields)
+ foreach (var field in fields)
{
var d = field.GetCustomAttribute<DefaultValueAttribute>();
@@ -663,14 +667,12 @@ namespace PokemonGo.RocketBot.Logic
}
}
- public static GlobalSettings Default => new GlobalSettings();
-
public static GlobalSettings Load(string path, bool boolSkipSave = false)
{
GlobalSettings settings;
- bool isGui =
- (AppDomain.CurrentDomain.GetAssemblies().SingleOrDefault(a => a.FullName.Contains("PoGo.NecroBot.GUI")) !=
- null);
+ var isGui =
+ AppDomain.CurrentDomain.GetAssemblies().SingleOrDefault(a => a.FullName.Contains("PoGo.NecroBot.GUI")) !=
+ null;
var profilePath = Path.Combine(Directory.GetCurrentDirectory(), path);
var profileConfigPath = Path.Combine(profilePath, "config");
var configFile = Path.Combine(profileConfigPath, "config.json");
@@ -682,7 +684,7 @@ namespace PokemonGo.RocketBot.Logic
{
//if the file exists, load the settings
string input;
- int count = 0;
+ var count = 0;
while (true)
{
try
@@ -764,7 +766,7 @@ namespace PokemonGo.RocketBot.Logic
var readLine = Console.ReadLine();
if (readLine != null)
{
- string strInput = readLine.ToLower();
+ var strInput = readLine.ToLower();
switch (strInput)
{
@@ -774,16 +776,17 @@ namespace PokemonGo.RocketBot.Logic
Logger.Write(translator.GetTranslation(TranslationString.FirstStartAutoGenSettings));
return false;
default:
- Logger.Write(translator.GetTranslation(TranslationString.PromptError, "Y", "N"), LogLevel.Error);
+ Logger.Write(translator.GetTranslation(TranslationString.PromptError, "Y", "N"),
+ LogLevel.Error);
continue;
}
}
}
}
- public static Session SetupSettings(Session session, GlobalSettings settings, String configPath)
+ public static Session SetupSettings(Session session, GlobalSettings settings, string configPath)
{
- Session newSession = SetupTranslationCode(session, session.Translation, settings);
+ var newSession = SetupTranslationCode(session, session.Translation, settings);
SetupAccountType(newSession.Translation, settings);
SetupUserAccount(newSession.Translation, settings);
@@ -800,7 +803,7 @@ namespace PokemonGo.RocketBot.Logic
Logger.Write(translator.GetTranslation(TranslationString.FirstStartLanguagePrompt, "Y", "N"), LogLevel.None);
string strInput;
- bool boolBreak = false;
+ var boolBreak = false;
while (!boolBreak)
{
// ReSharper disable once PossibleNullReferenceException
@@ -865,7 +868,7 @@ namespace PokemonGo.RocketBot.Logic
{
Console.WriteLine("");
Logger.Write(translator.GetTranslation(TranslationString.FirstStartSetupUsernamePrompt), LogLevel.None);
- string strInput = Console.ReadLine();
+ var strInput = Console.ReadLine();
if (settings.Auth.AuthType == AuthType.Google)
settings.Auth.GoogleUsername = strInput;
@@ -891,11 +894,11 @@ namespace PokemonGo.RocketBot.Logic
Logger.Write(translator.GetTranslation(TranslationString.FirstStartDefaultLocationPrompt, "Y", "N"),
LogLevel.None);
- bool boolBreak = false;
+ var boolBreak = false;
while (!boolBreak)
{
// ReSharper disable once PossibleNullReferenceException
- string strInput = Console.ReadLine().ToLower();
+ var strInput = Console.ReadLine().ToLower();
switch (strInput)
{
@@ -919,7 +922,7 @@ namespace PokemonGo.RocketBot.Logic
try
{
// ReSharper disable once AssignNullToNotNullAttribute
- double dblInput = double.Parse(Console.ReadLine());
+ var dblInput = double.Parse(Console.ReadLine());
settings.DefaultLatitude = dblInput;
Logger.Write(translator.GetTranslation(TranslationString.FirstStartSetupDefaultLatConfirm, dblInput));
break;
@@ -937,7 +940,7 @@ namespace PokemonGo.RocketBot.Logic
try
{
// ReSharper disable once AssignNullToNotNullAttribute
- double dblInput = double.Parse(Console.ReadLine());
+ var dblInput = double.Parse(Console.ReadLine());
settings.DefaultLongitude = dblInput;
Logger.Write(translator.GetTranslation(TranslationString.FirstStartSetupDefaultLongConfirm, dblInput));
break;
@@ -950,7 +953,7 @@ namespace PokemonGo.RocketBot.Logic
}
}
- private static void SaveFiles(GlobalSettings settings, String configFile)
+ private static void SaveFiles(GlobalSettings settings, string configFile)
{
settings.Save(configFile);
settings.Auth.Load(Path.Combine(settings.ProfileConfigPath, "auth.json"));
@@ -992,6 +995,43 @@ namespace PokemonGo.RocketBot.Logic
public string GoogleUsername => _settings.Auth.GoogleUsername;
public string GooglePassword => _settings.Auth.GooglePassword;
+ double ISettings.DefaultLatitude
+ {
+ get
+ {
+ return _settings.DefaultLatitude + _rand.NextDouble()*((double) _settings.MaxSpawnLocationOffset/111111);
+ }
+
+ set { _settings.DefaultLatitude = value; }
+ }
+
+ double ISettings.DefaultLongitude
+ {
+ get
+ {
+ return _settings.DefaultLongitude +
+ _rand.NextDouble()*
+ ((double) _settings.MaxSpawnLocationOffset/111111/Math.Cos(_settings.DefaultLatitude));
+ }
+
+ set { _settings.DefaultLongitude = value; }
+ }
+
+ double ISettings.DefaultAltitude
+ {
+ get
+ {
+ return
+ LocationUtils.getElevation(_settings.DefaultLatitude, _settings.DefaultLongitude) +
+ _rand.NextDouble()*
+ (5/
+ Math.Cos(LocationUtils.getElevation(_settings.DefaultLatitude, _settings.DefaultLongitude)));
+ }
+
+
+ set { }
+ }
+
#region Auth Config Values
public bool UseProxy
@@ -1079,7 +1119,7 @@ namespace PokemonGo.RocketBot.Logic
#region Device Config Values
- string DevicePackageName
+ private string DevicePackageName
{
get { return _settings.Auth.DevicePackageName; }
set { _settings.Auth.DevicePackageName = value; }
@@ -1164,43 +1204,6 @@ namespace PokemonGo.RocketBot.Logic
}
#endregion Device Config Values
-
- double ISettings.DefaultLatitude
- {
- get
- {
- return _settings.DefaultLatitude + _rand.NextDouble()*((double) _settings.MaxSpawnLocationOffset/111111);
- }
-
- set { _settings.DefaultLatitude = value; }
- }
-
- double ISettings.DefaultLongitude
- {
- get
- {
- return _settings.DefaultLongitude +
- _rand.NextDouble()*
- ((double) _settings.MaxSpawnLocationOffset/111111/Math.Cos(_settings.DefaultLatitude));
- }
-
- set { _settings.DefaultLongitude = value; }
- }
-
- double ISettings.DefaultAltitude
- {
- get
- {
- return
- LocationUtils.getElevation(_settings.DefaultLatitude, _settings.DefaultLongitude) +
- _rand.NextDouble()*
- (5/
- Math.Cos(LocationUtils.getElevation(_settings.DefaultLatitude, _settings.DefaultLongitude)));
- }
-
-
- set { }
- }
}
public class LogicSettings : ILogicSettings
diff --git a/PokemonGo.RocketBot.Logic/State/FarmState.cs b/PokemonGo.RocketBot.Logic/State/FarmState.cs
index 46a0408..61f4686 100644
--- a/PokemonGo.RocketBot.Logic/State/FarmState.cs
+++ b/PokemonGo.RocketBot.Logic/State/FarmState.cs
@@ -12,8 +12,8 @@ namespace PokemonGo.RocketBot.Logic.State
{
public async Task<IState> Execute(ISession session, CancellationToken cancellationToken)
{
- if (session.LogicSettings.EvolveAllPokemonAboveIv || session.LogicSettings.EvolveAllPokemonWithEnoughCandy
- || session.LogicSettings.UseLuckyEggsWhileEvolving || session.LogicSettings.KeepPokemonsThatCanEvolve)
+ if (session.LogicSettings.EvolveAllPokemonAboveIv || session.LogicSettings.EvolveAllPokemonWithEnoughCandy
+ || session.LogicSettings.UseLuckyEggsWhileEvolving || session.LogicSettings.KeepPokemonsThatCanEvolve)
{
await EvolvePokemonTask.Execute(session, cancellationToken);
}
@@ -69,4 +69,4 @@ namespace PokemonGo.RocketBot.Logic.State
return this;
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/State/InfoState.cs b/PokemonGo.RocketBot.Logic/State/InfoState.cs
index b1fda88..dcd12ce 100644
--- a/PokemonGo.RocketBot.Logic/State/InfoState.cs
+++ b/PokemonGo.RocketBot.Logic/State/InfoState.cs
@@ -17,4 +17,4 @@ namespace PokemonGo.RocketBot.Logic.State
return new FarmState();
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/State/LoginState.cs b/PokemonGo.RocketBot.Logic/State/LoginState.cs
index bbbdcfa..8feb755 100644
--- a/PokemonGo.RocketBot.Logic/State/LoginState.cs
+++ b/PokemonGo.RocketBot.Logic/State/LoginState.cs
@@ -5,10 +5,10 @@ using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using Google.Protobuf;
-using PokemonGo.RocketBot.Logic.Common;
-using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketAPI.Enums;
using PokemonGo.RocketAPI.Exceptions;
+using PokemonGo.RocketBot.Logic.Common;
+using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.Logging;
#endregion
@@ -128,21 +128,26 @@ namespace PokemonGo.RocketBot.Logic.State
if (session.Profile == null)
{
await Task.Delay(20000, cancellationToken);
- Logger.Write("Due to login failure your player profile could not be retrieved. Press any key to re-try login.", LogLevel.Warning);
+ Logger.Write(
+ "Due to login failure your player profile could not be retrieved. Press any key to re-try login.",
+ LogLevel.Warning);
Console.ReadKey();
}
- int maxTheoreticalItems = session.LogicSettings.TotalAmountOfPokeballsToKeep +
- session.LogicSettings.TotalAmountOfPotionsToKeep +
- session.LogicSettings.TotalAmountOfRevivesToKeep +
- session.LogicSettings.TotalAmountOfBerriesToKeep;
+ var maxTheoreticalItems = session.LogicSettings.TotalAmountOfPokeballsToKeep +
+ session.LogicSettings.TotalAmountOfPotionsToKeep +
+ session.LogicSettings.TotalAmountOfRevivesToKeep +
+ session.LogicSettings.TotalAmountOfBerriesToKeep;
if (maxTheoreticalItems > session.Profile.PlayerData.MaxItemStorage)
{
- Logger.Write(session.Translation.GetTranslation(TranslationString.MaxItemsCombinedOverMaxItemStorage, maxTheoreticalItems, session.Profile.PlayerData.MaxItemStorage), LogLevel.Error);
- Logger.Write("Press any key to exit, then fix your configuration and run the bot again.", LogLevel.Warning);
+ Logger.Write(
+ session.Translation.GetTranslation(TranslationString.MaxItemsCombinedOverMaxItemStorage,
+ maxTheoreticalItems, session.Profile.PlayerData.MaxItemStorage), LogLevel.Error);
+ Logger.Write("Press any key to exit, then fix your configuration and run the bot again.",
+ LogLevel.Warning);
Console.ReadKey();
- System.Environment.Exit(1);
+ Environment.Exit(1);
}
return new PositionCheckState();
@@ -179,15 +184,15 @@ namespace PokemonGo.RocketBot.Logic.State
try
{
session.Profile = await session.Client.Player.GetPlayer();
- session.EventDispatcher.Send(new ProfileEvent { Profile = session.Profile });
+ session.EventDispatcher.Send(new ProfileEvent {Profile = session.Profile});
}
- catch (System.UriFormatException e)
+ catch (UriFormatException e)
{
- session.EventDispatcher.Send(new ErrorEvent { Message = e.ToString() });
+ session.EventDispatcher.Send(new ErrorEvent {Message = e.ToString()});
}
catch (Exception ex)
{
- session.EventDispatcher.Send(new ErrorEvent { Message = ex.ToString() });
+ session.EventDispatcher.Send(new ErrorEvent {Message = ex.ToString()});
}
}
}
diff --git a/PokemonGo.RocketBot.Logic/State/Session.cs b/PokemonGo.RocketBot.Logic/State/Session.cs
index 7c94f13..1cca82b 100644
--- a/PokemonGo.RocketBot.Logic/State/Session.cs
+++ b/PokemonGo.RocketBot.Logic/State/Session.cs
@@ -1,10 +1,10 @@
#region using directives
+using PokemonGo.RocketAPI;
using PokemonGo.RocketBot.Logic.Common;
using PokemonGo.RocketBot.Logic.Event;
-using PokemonGo.RocketAPI;
-using POGOProtos.Networking.Responses;
using PokemonGo.RocketBot.Logic.Service;
+using POGOProtos.Networking.Responses;
#endregion
@@ -54,7 +54,7 @@ namespace PokemonGo.RocketBot.Logic.State
public void Reset(ISettings settings, ILogicSettings logicSettings)
{
- ApiFailureStrategy _apiStrategy = new ApiFailureStrategy(this);
+ var _apiStrategy = new ApiFailureStrategy(this);
Client = new Client(Settings, _apiStrategy);
// ferox wants us to set this manually
Inventory = new Inventory(Client, logicSettings);
diff --git a/PokemonGo.RocketBot.Logic/State/StateMachine.cs b/PokemonGo.RocketBot.Logic/State/StateMachine.cs
index 98eecec..848cf99 100644
--- a/PokemonGo.RocketBot.Logic/State/StateMachine.cs
+++ b/PokemonGo.RocketBot.Logic/State/StateMachine.cs
@@ -1,11 +1,11 @@
#region using directives
using System;
+using System.IO;
using System.Threading;
using System.Threading.Tasks;
-using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketAPI.Exceptions;
-using System.IO;
+using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.Logging;
#endregion
@@ -34,7 +34,7 @@ namespace PokemonGo.RocketBot.Logic.State
var profilePath = Path.Combine(Directory.GetCurrentDirectory(), "");
var profileConfigPath = Path.Combine(profilePath, "config");
- FileSystemWatcher configWatcher = new FileSystemWatcher();
+ var configWatcher = new FileSystemWatcher();
configWatcher.Path = profileConfigPath;
configWatcher.Filter = "config.json";
configWatcher.NotifyFilter = NotifyFilters.LastWrite;
@@ -69,9 +69,12 @@ namespace PokemonGo.RocketBot.Logic.State
}
catch (Exception ex)
{
- session.EventDispatcher.Send(new ErrorEvent {Message = "Pokemon Servers might be offline / unstable. Trying again..."});
+ session.EventDispatcher.Send(new ErrorEvent
+ {
+ Message = "Pokemon Servers might be offline / unstable. Trying again..."
+ });
Thread.Sleep(1000);
- session.EventDispatcher.Send(new ErrorEvent { Message = "Error: " + ex });
+ session.EventDispatcher.Send(new ErrorEvent {Message = "Error: " + ex});
state = _initialState;
}
} while (state != null);
diff --git a/PokemonGo.RocketBot.Logic/State/VersionCheckState.cs b/PokemonGo.RocketBot.Logic/State/VersionCheckState.cs
index 9d678c7..f443347 100644
--- a/PokemonGo.RocketBot.Logic/State/VersionCheckState.cs
+++ b/PokemonGo.RocketBot.Logic/State/VersionCheckState.cs
@@ -1,20 +1,7 @@
#region using directives
-using System;
-using System.Diagnostics;
-using System.IO;
-using System.IO.Compression;
-using System.Net;
-using System.Reflection;
-using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
-using Newtonsoft.Json.Linq;
-using PokemonGo.RocketBot.Logic.Common;
-using PokemonGo.RocketBot.Logic.Event;
-using PokemonGo.RocketBot.Logic.Logging;
-using System.Collections.Generic;
-using PokemonGo.RocketBot.Logic.Utils;
#endregion
@@ -27,6 +14,5 @@ namespace PokemonGo.RocketBot.Logic.State
{
return new LoginState();
}
-
}
}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Tasks/CatchIncensePokemonsTask.cs b/PokemonGo.RocketBot.Logic/Tasks/CatchIncensePokemonsTask.cs
index a8ab015..e0a6114 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/CatchIncensePokemonsTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/CatchIncensePokemonsTask.cs
@@ -1,5 +1,6 @@
#region using directives
+using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using PokemonGo.RocketBot.Logic.Common;
@@ -9,7 +10,6 @@ using PokemonGo.RocketBot.Logic.State;
using PokemonGo.RocketBot.Logic.Utils;
using POGOProtos.Map.Pokemon;
using POGOProtos.Networking.Responses;
-using System.Collections.Generic;
#endregion
@@ -39,9 +39,11 @@ namespace PokemonGo.RocketBot.Logic.Tasks
SpawnPointId = incensePokemon.EncounterLocation
};
- OnPokemonEncounterEvent(new List<MapPokemon> { pokemon });
- if ((session.LogicSettings.UsePokemonSniperFilterOnly && !session.LogicSettings.PokemonToSnipe.Pokemon.Contains(pokemon.PokemonId)) ||
- (session.LogicSettings.UsePokemonToNotCatchFilter && session.LogicSettings.PokemonsNotToCatch.Contains(pokemon.PokemonId)))
+ OnPokemonEncounterEvent(new List<MapPokemon> {pokemon});
+ if ((session.LogicSettings.UsePokemonSniperFilterOnly &&
+ !session.LogicSettings.PokemonToSnipe.Pokemon.Contains(pokemon.PokemonId)) ||
+ (session.LogicSettings.UsePokemonToNotCatchFilter &&
+ session.LogicSettings.PokemonsNotToCatch.Contains(pokemon.PokemonId)))
{
Logger.Write(session.Translation.GetTranslation(TranslationString.PokemonIgnoreFilter,
session.Translation.GetPokemonTranslation(pokemon.PokemonId)));
@@ -54,10 +56,11 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var encounter =
await
- session.Client.Encounter.EncounterIncensePokemon((ulong)pokemon.EncounterId,
+ session.Client.Encounter.EncounterIncensePokemon(pokemon.EncounterId,
pokemon.SpawnPointId);
- if (encounter.Result == IncenseEncounterResponse.Types.Result.IncenseEncounterSuccess && session.LogicSettings.CatchPokemon)
+ if (encounter.Result == IncenseEncounterResponse.Types.Result.IncenseEncounterSuccess &&
+ session.LogicSettings.CatchPokemon)
{
await CatchPokemonTask.Execute(session, cancellationToken, encounter, pokemon);
}
@@ -96,5 +99,4 @@ namespace PokemonGo.RocketBot.Logic.Tasks
PokemonEncounterEvent?.Invoke(pokemons);
}
}
-
}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Tasks/CatchLurePokemonsTask.cs b/PokemonGo.RocketBot.Logic/Tasks/CatchLurePokemonsTask.cs
index a258803..8928b59 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/CatchLurePokemonsTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/CatchLurePokemonsTask.cs
@@ -8,7 +8,6 @@ using PokemonGo.RocketBot.Logic.Logging;
using PokemonGo.RocketBot.Logic.State;
using POGOProtos.Map.Fort;
using POGOProtos.Networking.Responses;
-using POGOProtos.Map.Pokemon;
#endregion
@@ -26,9 +25,11 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var fortId = currentFortData.Id;
var pokemonId = currentFortData.LureInfo.ActivePokemonId;
-
- if ( ( session.LogicSettings.UsePokemonSniperFilterOnly && !session.LogicSettings.PokemonToSnipe.Pokemon.Contains( pokemonId ) ) ||
- ( session.LogicSettings.UsePokemonToNotCatchFilter && session.LogicSettings.PokemonsNotToCatch.Contains( pokemonId ) ) )
+
+ if ((session.LogicSettings.UsePokemonSniperFilterOnly &&
+ !session.LogicSettings.PokemonToSnipe.Pokemon.Contains(pokemonId)) ||
+ (session.LogicSettings.UsePokemonToNotCatchFilter &&
+ session.LogicSettings.PokemonsNotToCatch.Contains(pokemonId)))
{
session.EventDispatcher.Send(new NoticeEvent
{
@@ -42,7 +43,9 @@ namespace PokemonGo.RocketBot.Logic.Tasks
if (encounter.Result == DiskEncounterResponse.Types.Result.Success && session.LogicSettings.CatchPokemon)
{
- await CatchPokemonTask.Execute(session, cancellationToken, encounter, null, currentFortData, encounterId);
+ await
+ CatchPokemonTask.Execute(session, cancellationToken, encounter, null, currentFortData,
+ encounterId);
}
else if (encounter.Result == DiskEncounterResponse.Types.Result.PokemonInventoryFull)
{
diff --git a/PokemonGo.RocketBot.Logic/Tasks/CatchNearbyPokemonsTask.cs b/PokemonGo.RocketBot.Logic/Tasks/CatchNearbyPokemonsTask.cs
index eda5c2f..7588540 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/CatchNearbyPokemonsTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/CatchNearbyPokemonsTask.cs
@@ -1,5 +1,6 @@
#region using directives
+using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
@@ -11,7 +12,6 @@ using PokemonGo.RocketBot.Logic.Utils;
using POGOProtos.Inventory.Item;
using POGOProtos.Map.Pokemon;
using POGOProtos.Networking.Responses;
-using System.Collections.Generic;
#endregion
@@ -53,10 +53,13 @@ namespace PokemonGo.RocketBot.Logic.Tasks
return;
}
- if ((session.LogicSettings.UsePokemonSniperFilterOnly && !session.LogicSettings.PokemonToSnipe.Pokemon.Contains(pokemon.PokemonId)) ||
- (session.LogicSettings.UsePokemonToNotCatchFilter && session.LogicSettings.PokemonsNotToCatch.Contains(pokemon.PokemonId)))
+ if ((session.LogicSettings.UsePokemonSniperFilterOnly &&
+ !session.LogicSettings.PokemonToSnipe.Pokemon.Contains(pokemon.PokemonId)) ||
+ (session.LogicSettings.UsePokemonToNotCatchFilter &&
+ session.LogicSettings.PokemonsNotToCatch.Contains(pokemon.PokemonId)))
{
- Logger.Write(session.Translation.GetTranslation(TranslationString.PokemonSkipped, session.Translation.GetPokemonTranslation(pokemon.PokemonId)));
+ Logger.Write(session.Translation.GetTranslation(TranslationString.PokemonSkipped,
+ session.Translation.GetPokemonTranslation(pokemon.PokemonId)));
continue;
}
@@ -67,7 +70,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var encounter =
await session.Client.Encounter.EncounterPokemon(pokemon.EncounterId, pokemon.SpawnPointId);
- if (encounter.Status == EncounterResponse.Types.Status.EncounterSuccess && session.LogicSettings.CatchPokemon)
+ if (encounter.Status == EncounterResponse.Types.Status.EncounterSuccess &&
+ session.LogicSettings.CatchPokemon)
{
await CatchPokemonTask.Execute(session, cancellationToken, encounter, pokemon);
}
diff --git a/PokemonGo.RocketBot.Logic/Tasks/CatchPokemonTask.cs b/PokemonGo.RocketBot.Logic/Tasks/CatchPokemonTask.cs
index f29047a..f12e741 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/CatchPokemonTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/CatchPokemonTask.cs
@@ -2,9 +2,11 @@
using System;
using System.Linq;
+using System.Threading;
using System.Threading.Tasks;
using PokemonGo.RocketBot.Logic.Common;
using PokemonGo.RocketBot.Logic.Event;
+using PokemonGo.RocketBot.Logic.Logging;
using PokemonGo.RocketBot.Logic.PoGoUtils;
using PokemonGo.RocketBot.Logic.State;
using PokemonGo.RocketBot.Logic.Utils;
@@ -12,8 +14,6 @@ using POGOProtos.Inventory.Item;
using POGOProtos.Map.Fort;
using POGOProtos.Map.Pokemon;
using POGOProtos.Networking.Responses;
-using System.Threading;
-using PokemonGo.RocketBot.Logic.Logging;
#endregion
@@ -22,9 +22,10 @@ namespace PokemonGo.RocketBot.Logic.Tasks
public static class CatchPokemonTask
{
public static int AmountOfBerries;
- private static Random Random => new Random((int)DateTime.Now.Ticks);
+ private static Random Random => new Random((int) DateTime.Now.Ticks);
- public static async Task Execute(ISession session, CancellationToken cancellationToken, dynamic encounter, MapPokemon pokemon,
+ public static async Task Execute(ISession session, CancellationToken cancellationToken, dynamic encounter,
+ MapPokemon pokemon,
FortData currentFortData = null, ulong encounterId = 0)
{
AmountOfBerries = 0;
@@ -40,12 +41,12 @@ namespace PokemonGo.RocketBot.Logic.Tasks
if (pokeball == ItemId.ItemUnknown) return;
//Calculate CP and IV
- var pokemonCp = (encounter is EncounterResponse
- ? encounter.WildPokemon?.PokemonData?.Cp
- : encounter.PokemonData?.Cp);
+ var pokemonCp = encounter is EncounterResponse
+ ? encounter.WildPokemon?.PokemonData?.Cp
+ : encounter.PokemonData?.Cp;
var pokemonIv = PokemonInfo.CalculatePokemonPerfection(encounter is EncounterResponse
- ? encounter.WildPokemon?.PokemonData
- : encounter?.PokemonData);
+ ? encounter.WildPokemon?.PokemonData
+ : encounter?.PokemonData);
// Calculate distance away
var distance = LocationUtils.CalculateDistanceInMeters(session.Client.CurrentLatitude,
@@ -61,8 +62,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var attemptCounter = 1;
do
{
- if ((session.LogicSettings.MaxPokeballsPerPokemon > 0 &&
- attemptCounter > session.LogicSettings.MaxPokeballsPerPokemon))
+ if (session.LogicSettings.MaxPokeballsPerPokemon > 0 &&
+ attemptCounter > session.LogicSettings.MaxPokeballsPerPokemon)
break;
pokeball = await GetBestBall(session, encounter, probability);
@@ -81,28 +82,26 @@ namespace PokemonGo.RocketBot.Logic.Tasks
// Determine whether to use berries or not
if ((session.LogicSettings.UseBerriesOperator.ToLower().Equals("and") &&
- pokemonIv >= session.LogicSettings.UseBerriesMinIv &&
- pokemonCp >= session.LogicSettings.UseBerriesMinCp &&
- probability < session.LogicSettings.UseBerriesBelowCatchProbability) ||
+ pokemonIv >= session.LogicSettings.UseBerriesMinIv &&
+ pokemonCp >= session.LogicSettings.UseBerriesMinCp &&
+ probability < session.LogicSettings.UseBerriesBelowCatchProbability) ||
(session.LogicSettings.UseBerriesOperator.ToLower().Equals("or") && (
pokemonIv >= session.LogicSettings.UseBerriesMinIv ||
pokemonCp >= session.LogicSettings.UseBerriesMinCp ||
probability < session.LogicSettings.UseBerriesBelowCatchProbability)))
{
-
AmountOfBerries++;
if (AmountOfBerries <= session.LogicSettings.MaxBerriesToUsePerPokemon)
{
await
- UseBerry(session,
- encounter is EncounterResponse || encounter is IncenseEncounterResponse
- ? pokemon.EncounterId
- : encounterId,
- encounter is EncounterResponse || encounter is IncenseEncounterResponse
- ? pokemon.SpawnPointId
- : currentFortData?.Id);
+ UseBerry(session,
+ encounter is EncounterResponse || encounter is IncenseEncounterResponse
+ ? pokemon.EncounterId
+ : encounterId,
+ encounter is EncounterResponse || encounter is IncenseEncounterResponse
+ ? pokemon.SpawnPointId
+ : currentFortData?.Id);
}
-
}
//default to excellent throw
@@ -119,12 +118,12 @@ namespace PokemonGo.RocketBot.Logic.Tasks
if (pokemonCp > session.LogicSettings.ForceExcellentThrowOverCp ||
pokemonIv > session.LogicSettings.ForceExcellentThrowOverIv)
{
- normalizedRecticleSize = Random.NextDouble() * (1.95 - 1.7) + 1.7;
+ normalizedRecticleSize = Random.NextDouble()*(1.95 - 1.7) + 1.7;
}
else if (pokemonCp >= session.LogicSettings.ForceGreatThrowOverCp ||
pokemonIv >= session.LogicSettings.ForceGreatThrowOverIv)
{
- normalizedRecticleSize = Random.NextDouble() * (1.95 - 1.3) + 1.3;
+ normalizedRecticleSize = Random.NextDouble()*(1.95 - 1.3) + 1.3;
hitTxt = "Great";
}
else
@@ -136,23 +135,23 @@ namespace PokemonGo.RocketBot.Logic.Tasks
if (rnd <= regularThrow)
{
- normalizedRecticleSize = Random.NextDouble() * (1 - 0.1) + 0.1;
+ normalizedRecticleSize = Random.NextDouble()*(1 - 0.1) + 0.1;
hitTxt = "Ordinary";
}
else if (rnd <= regularThrow + session.LogicSettings.NiceThrowChance)
{
- normalizedRecticleSize = Random.NextDouble() * (1.3 - 1) + 1;
+ normalizedRecticleSize = Random.NextDouble()*(1.3 - 1) + 1;
hitTxt = "Nice";
}
else if (rnd <=
regularThrow + session.LogicSettings.NiceThrowChance +
session.LogicSettings.GreatThrowChance)
{
- normalizedRecticleSize = Random.NextDouble() * (1.7 - 1.3) + 1.3;
+ normalizedRecticleSize = Random.NextDouble()*(1.7 - 1.3) + 1.3;
hitTxt = "Great";
}
- if (Random.NextDouble() * 100 > session.LogicSettings.CurveThrowChance)
+ if (Random.NextDouble()*100 > session.LogicSettings.CurveThrowChance)
{
spinModifier = 0.0;
spinTxt = "Straight";
@@ -175,10 +174,12 @@ namespace PokemonGo.RocketBot.Logic.Tasks
: currentFortData.Id, pokeball, normalizedRecticleSize, spinModifier);
var lat = encounter is EncounterResponse || encounter is IncenseEncounterResponse
- ? pokemon.Latitude : currentFortData.Latitude;
+ ? pokemon.Latitude
+ : currentFortData.Latitude;
var lng = encounter is EncounterResponse || encounter is IncenseEncounterResponse
- ? pokemon.Longitude : currentFortData.Longitude;
- var evt = new PokemonCaptureEvent()
+ ? pokemon.Longitude
+ : currentFortData.Longitude;
+ var evt = new PokemonCaptureEvent
{
Status = caughtPokemonResponse.Status,
Latitude = lat,
@@ -216,7 +217,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
evt.FamilyCandies = caughtPokemonResponse.CaptureAward.Candy.Sum();
}
- if (session.LogicSettings.TransferDuplicatePokemonOnCapture && session.LogicSettings.TransferDuplicatePokemon)
+ if (session.LogicSettings.TransferDuplicatePokemonOnCapture &&
+ session.LogicSettings.TransferDuplicatePokemon)
await TransferDuplicatePokemonTask.Execute(session, cancellationToken);
}
@@ -243,7 +245,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
? encounter.WildPokemon?.PokemonData
: encounter?.PokemonData));
evt.Probability =
- Math.Round(probability * 100, 2);
+ Math.Round(probability*100, 2);
evt.Distance = distance;
evt.Pokeball = pokeball;
evt.Attempt = attemptCounter;
@@ -279,22 +281,22 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var masterBallsCount = await session.Inventory.GetItemAmountByType(ItemId.ItemMasterBall);
if (masterBallsCount > 0 && (
- (!session.LogicSettings.PokemonToUseMasterball.Any() && (
- pokemonCp >= session.LogicSettings.UseMasterBallAboveCp ||
- probability < session.LogicSettings.UseMasterBallBelowCatchProbability)) ||
- session.LogicSettings.PokemonToUseMasterball.Contains(pokemonId)))
+ (!session.LogicSettings.PokemonToUseMasterball.Any() && (
+ pokemonCp >= session.LogicSettings.UseMasterBallAboveCp ||
+ probability < session.LogicSettings.UseMasterBallBelowCatchProbability)) ||
+ session.LogicSettings.PokemonToUseMasterball.Contains(pokemonId)))
return ItemId.ItemMasterBall;
if (ultraBallsCount > 0 && (
- pokemonCp >= session.LogicSettings.UseUltraBallAboveCp ||
- iV >= session.LogicSettings.UseUltraBallAboveIv ||
- probability < session.LogicSettings.UseUltraBallBelowCatchProbability))
+ pokemonCp >= session.LogicSettings.UseUltraBallAboveCp ||
+ iV >= session.LogicSettings.UseUltraBallAboveIv ||
+ probability < session.LogicSettings.UseUltraBallBelowCatchProbability))
return ItemId.ItemUltraBall;
if (greatBallsCount > 0 && (
- pokemonCp >= session.LogicSettings.UseGreatBallAboveCp ||
- iV >= session.LogicSettings.UseGreatBallAboveIv ||
- probability < session.LogicSettings.UseGreatBallBelowCatchProbability))
+ pokemonCp >= session.LogicSettings.UseGreatBallAboveCp ||
+ iV >= session.LogicSettings.UseGreatBallAboveIv ||
+ probability < session.LogicSettings.UseGreatBallBelowCatchProbability))
return ItemId.ItemGreatBall;
if (pokeBallsCount > 0)
@@ -320,7 +322,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
await session.Client.Encounter.UseCaptureItem(encounterId, ItemId.ItemRazzBerry, spawnPointId);
berry.Count -= 1;
- session.EventDispatcher.Send(new UseBerryEvent { BerryType = ItemId.ItemRazzBerry, Count = berry.Count });
+ session.EventDispatcher.Send(new UseBerryEvent {BerryType = ItemId.ItemRazzBerry, Count = berry.Count});
}
}
}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Tasks/DisplayPokemonStatsTask.cs b/PokemonGo.RocketBot.Logic/Tasks/DisplayPokemonStatsTask.cs
index cb5fbd3..5c077f6 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/DisplayPokemonStatsTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/DisplayPokemonStatsTask.cs
@@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
using System.Threading.Tasks;
using PokemonGo.RocketBot.Logic.DataDumper;
@@ -69,7 +70,9 @@ namespace PokemonGo.RocketBot.Logic.Tasks
try
{
Dumper.ClearDumpFile(session, dumpFileName);
- Dumper.Dump(session, "pokemonid,pokemonlevel,cp,perfection,stamina,staminamax,move1,move2,candy,ownername,origin,heightm,weightkg,individualattack,individualdefense,individualstamina,cpmultiplier,battlesattacked,battlesdefended,creationtimems,numupgrades,additionalcpmultiplier,favorite,nickname", dumpFileName);
+ Dumper.Dump(session,
+ "pokemonid,pokemonlevel,cp,perfection,stamina,staminamax,move1,move2,candy,ownername,origin,heightm,weightkg,individualattack,individualdefense,individualstamina,cpmultiplier,battlesattacked,battlesdefended,creationtimems,numupgrades,additionalcpmultiplier,favorite,nickname",
+ dumpFileName);
foreach (var pokemon in allPokemonInBag)
{
Dumper.Dump(session,
@@ -77,9 +80,9 @@ namespace PokemonGo.RocketBot.Logic.Tasks
dumpFileName);
}
}
- catch (System.IO.IOException)
+ catch (IOException)
{
- session.EventDispatcher.Send(new ErrorEvent { Message = $"Could not write {dumpFileName} dump file." });
+ session.EventDispatcher.Send(new ErrorEvent {Message = $"Could not write {dumpFileName} dump file."});
}
}
}
diff --git a/PokemonGo.RocketBot.Logic/Tasks/EggsListTask.cs b/PokemonGo.RocketBot.Logic/Tasks/EggsListTask.cs
index 9e3e9af..e9ea610 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/EggsListTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/EggsListTask.cs
@@ -4,8 +4,8 @@ using System.Linq;
using System.Threading.Tasks;
using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.State;
-using POGOProtos.Inventory.Item;
using PokemonGo.RocketBot.Logic.Utils;
+using POGOProtos.Inventory.Item;
#endregion
diff --git a/PokemonGo.RocketBot.Logic/Tasks/EvolvePokemonTask.cs b/PokemonGo.RocketBot.Logic/Tasks/EvolvePokemonTask.cs
index d3480e0..7f36ca8 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/EvolvePokemonTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/EvolvePokemonTask.cs
@@ -1,16 +1,16 @@
#region using directives
using System;
+using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using PokemonGo.RocketBot.Logic.Common;
using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.State;
using PokemonGo.RocketBot.Logic.Utils;
-using POGOProtos.Inventory.Item;
-using PokemonGo.RocketBot.Logic.Common;
-using System.Collections.Generic;
using POGOProtos.Data;
+using POGOProtos.Inventory.Item;
#endregion
@@ -42,7 +42,9 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var totalPokemon = await session.Inventory.GetPokemons();
var totalEggs = await session.Inventory.GetEggs();
- var pokemonNeededInInventory = (maxStorage - totalEggs.Count()) * session.LogicSettings.EvolveKeptPokemonsAtStorageUsagePercentage / 100.0f;
+ var pokemonNeededInInventory = (maxStorage - totalEggs.Count())*
+ session.LogicSettings.EvolveKeptPokemonsAtStorageUsagePercentage/
+ 100.0f;
var needPokemonToStartEvolve = Math.Round(
Math.Max(0,
Math.Min(pokemonNeededInInventory, session.Profile.PlayerData.MaxPokemonStorage)));
@@ -54,8 +56,10 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
session.EventDispatcher.Send(new WarnEvent
{
- Message = session.Translation.GetTranslation(TranslationString.UseLuckyEggsMinPokemonAmountTooHigh,
- luckyEggMin, maxStorage)
+ Message =
+ session.Translation.GetTranslation(
+ TranslationString.UseLuckyEggsMinPokemonAmountTooHigh,
+ luckyEggMin, maxStorage)
});
return;
}
@@ -63,12 +67,13 @@ namespace PokemonGo.RocketBot.Logic.Tasks
if (deltaCount > 0)
{
- session.EventDispatcher.Send(new UpdateEvent()
+ session.EventDispatcher.Send(new UpdateEvent
{
- Message = session.Translation.GetTranslation(TranslationString.WaitingForMorePokemonToEvolve,
- pokemonToEvolve.Count, deltaCount, totalPokemon.Count(), needPokemonToStartEvolve, session.LogicSettings.EvolveKeptPokemonsAtStorageUsagePercentage)
+ Message =
+ session.Translation.GetTranslation(TranslationString.WaitingForMorePokemonToEvolve,
+ pokemonToEvolve.Count, deltaCount, totalPokemon.Count(), needPokemonToStartEvolve,
+ session.LogicSettings.EvolveKeptPokemonsAtStorageUsagePercentage)
});
- return;
}
else
{
@@ -79,7 +84,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
await evolve(session, pokemonToEvolve);
}
}
- else if (session.LogicSettings.EvolveAllPokemonWithEnoughCandy || session.LogicSettings.EvolveAllPokemonAboveIv)
+ else if (session.LogicSettings.EvolveAllPokemonWithEnoughCandy ||
+ session.LogicSettings.EvolveAllPokemonAboveIv)
{
if (await shouldUseLuckyEgg(session, pokemonToEvolve))
{
@@ -103,7 +109,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
_lastLuckyEggTime = DateTime.Now;
await session.Client.Inventory.UseItemXpBoost();
await session.Inventory.RefreshCachedInventory();
- if (luckyEgg != null) session.EventDispatcher.Send(new UseLuckyEggEvent { Count = luckyEgg.Count });
+ if (luckyEgg != null) session.EventDispatcher.Send(new UseLuckyEggEvent {Count = luckyEgg.Count});
DelayingUtils.Delay(session.LogicSettings.DelayBetweenPlayerActions, 0);
}
@@ -127,7 +133,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
}
}
- private static async Task<Boolean> shouldUseLuckyEgg(ISession session, List<PokemonData> pokemonToEvolve)
+ private static async Task<bool> shouldUseLuckyEgg(ISession session, List<PokemonData> pokemonToEvolve)
{
var inventoryContent = await session.Inventory.GetItems();
@@ -140,36 +146,34 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
return true;
}
- else
- {
- var evolvablePokemon = await session.Inventory.GetPokemons();
+ var evolvablePokemon = await session.Inventory.GetPokemons();
- var deltaPokemonToUseLuckyEgg = session.LogicSettings.UseLuckyEggsMinPokemonAmount -
- pokemonToEvolve.Count;
+ var deltaPokemonToUseLuckyEgg = session.LogicSettings.UseLuckyEggsMinPokemonAmount -
+ pokemonToEvolve.Count;
- var availableSpace = session.Profile.PlayerData.MaxPokemonStorage - evolvablePokemon.Count();
+ var availableSpace = session.Profile.PlayerData.MaxPokemonStorage - evolvablePokemon.Count();
- if (deltaPokemonToUseLuckyEgg > availableSpace)
- {
- var possibleLimitInThisIteration = pokemonToEvolve.Count + availableSpace;
+ if (deltaPokemonToUseLuckyEgg > availableSpace)
+ {
+ var possibleLimitInThisIteration = pokemonToEvolve.Count + availableSpace;
- session.EventDispatcher.Send(new NoticeEvent()
- {
- Message = session.Translation.GetTranslation(TranslationString.UseLuckyEggsMinPokemonAmountTooHigh,
+ session.EventDispatcher.Send(new NoticeEvent
+ {
+ Message =
+ session.Translation.GetTranslation(TranslationString.UseLuckyEggsMinPokemonAmountTooHigh,
session.LogicSettings.UseLuckyEggsMinPokemonAmount, possibleLimitInThisIteration)
- });
- }
- else
+ });
+ }
+ else
+ {
+ session.EventDispatcher.Send(new NoticeEvent
{
- session.EventDispatcher.Send(new NoticeEvent()
- {
- Message = session.Translation.GetTranslation(TranslationString.CatchMorePokemonToUseLuckyEgg,
- deltaPokemonToUseLuckyEgg)
- });
- }
+ Message = session.Translation.GetTranslation(TranslationString.CatchMorePokemonToUseLuckyEgg,
+ deltaPokemonToUseLuckyEgg)
+ });
}
}
return false;
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Tasks/EvolveSpecificPokemonTask.cs b/PokemonGo.RocketBot.Logic/Tasks/EvolveSpecificPokemonTask.cs
index 03d5c8b..e101684 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/EvolveSpecificPokemonTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/EvolveSpecificPokemonTask.cs
@@ -1,14 +1,10 @@
#region using directives
using System.Linq;
-using System.Threading;
using System.Threading.Tasks;
using PokemonGo.RocketBot.Logic.Event;
-using PokemonGo.RocketBot.Logic.PoGoUtils;
using PokemonGo.RocketBot.Logic.State;
using PokemonGo.RocketBot.Logic.Utils;
-using PokemonGo.RocketBot.Logic.Logging;
-using PokemonGo.RocketBot.Logic.Common;
#endregion
diff --git a/PokemonGo.RocketBot.Logic/Tasks/Farm.cs b/PokemonGo.RocketBot.Logic/Tasks/Farm.cs
index 3af5302..d04d257 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/Farm.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/Farm.cs
@@ -23,7 +23,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
public void Run(CancellationToken cancellationToken)
{
- if (_session.LogicSettings.EvolveAllPokemonAboveIv || _session.LogicSettings.EvolveAllPokemonWithEnoughCandy
+ if (_session.LogicSettings.EvolveAllPokemonAboveIv || _session.LogicSettings.EvolveAllPokemonWithEnoughCandy
|| _session.LogicSettings.UseLuckyEggsWhileEvolving || _session.LogicSettings.KeepPokemonsThatCanEvolve)
{
EvolvePokemonTask.Execute(_session, cancellationToken).Wait(cancellationToken);
diff --git a/PokemonGo.RocketBot.Logic/Tasks/FarmPokestopsGPXTask.cs b/PokemonGo.RocketBot.Logic/Tasks/FarmPokestopsGPXTask.cs
index 98aa270..74b1580 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/FarmPokestopsGPXTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/FarmPokestopsGPXTask.cs
@@ -7,11 +7,11 @@ using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using PokemonGo.RocketAPI.Extensions;
using PokemonGo.RocketBot.Logic.Common;
using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.State;
using PokemonGo.RocketBot.Logic.Utils;
-using PokemonGo.RocketAPI.Extensions;
using POGOProtos.Map.Fort;
#endregion
@@ -120,7 +120,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
await RecycleItemsTask.Execute(session, cancellationToken);
if (session.LogicSettings.EvolveAllPokemonWithEnoughCandy ||
- session.LogicSettings.EvolveAllPokemonAboveIv ||
+ session.LogicSettings.EvolveAllPokemonAboveIv ||
session.LogicSettings.UseLuckyEggsWhileEvolving ||
session.LogicSettings.KeepPokemonsThatCanEvolve)
{
@@ -196,7 +196,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
//so do not make it more than 40 because it will never get close to those stops.
private static async Task<List<FortData>> GetPokeStops(ISession session)
{
- var mapObjects = await session.Client.Map.GetMapObjects();
+ var mapObjects = await session.Client.Map.GetMapObjects();
// Wasn't sure how to make this pretty. Edit as needed.
var pokeStops = mapObjects.Item1.MapCells.SelectMany(i => i.Forts)
diff --git a/PokemonGo.RocketBot.Logic/Tasks/FarmPokestopsTask.cs b/PokemonGo.RocketBot.Logic/Tasks/FarmPokestopsTask.cs
index 1c1a832..19ad55a 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/FarmPokestopsTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/FarmPokestopsTask.cs
@@ -6,12 +6,12 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using GeoCoordinatePortable;
+using PokemonGo.RocketAPI.Extensions;
using PokemonGo.RocketBot.Logic.Common;
using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.Logging;
using PokemonGo.RocketBot.Logic.State;
using PokemonGo.RocketBot.Logic.Utils;
-using PokemonGo.RocketAPI.Extensions;
using POGOProtos.Map.Fort;
using POGOProtos.Networking.Responses;
@@ -21,11 +21,11 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
public static class FarmPokestopsTask
{
+ public delegate void LootPokestopDelegate(FortData pokestop);
+
public static int TimesZeroXPawarded;
private static int _storeRi;
- public delegate void LootPokestopDelegate(FortData pokestop);
-
public static async Task Execute(ISession session, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
@@ -46,7 +46,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
session.Settings.DefaultLatitude,
session.Settings.DefaultLongitude,
LocationUtils.getElevation(session.Settings.DefaultLatitude,
- session.Settings.DefaultLongitude)),
+ session.Settings.DefaultLongitude)),
null,
session,
cancellationToken);
@@ -55,7 +55,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var pokestopList = await GetPokeStops(session);
//get optimized route
- var pokeStops = RouteOptimizeUtil.Optimize(pokestopList.ToArray(), session.Client.CurrentLatitude, session.Client.CurrentLongitude);
+ var pokeStops = RouteOptimizeUtil.Optimize(pokestopList.ToArray(), session.Client.CurrentLatitude,
+ session.Client.CurrentLongitude);
var stopsHit = 0;
var rc = new Random(); //initialize pokestop random cleanup counter first time
@@ -70,7 +71,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
});
}
- session.EventDispatcher.Send(new PokeStopListEvent { Forts = pokestopList });
+ session.EventDispatcher.Send(new PokeStopListEvent {Forts = pokestopList});
foreach (var pokeStop in pokeStops)
{
@@ -80,10 +81,10 @@ namespace PokemonGo.RocketBot.Logic.Tasks
session.Client.CurrentLongitude, pokeStop.Latitude, pokeStop.Longitude);
var fortInfo = await session.Client.Fort.GetFort(pokeStop.Id, pokeStop.Latitude, pokeStop.Longitude);
- session.EventDispatcher.Send(new FortTargetEvent { Name = fortInfo.Name, Distance = distance });
+ session.EventDispatcher.Send(new FortTargetEvent {Name = fortInfo.Name, Distance = distance});
await session.Navigation.Move(new GeoCoordinate(pokeStop.Latitude, pokeStop.Longitude,
- LocationUtils.getElevation(pokeStop.Latitude, pokeStop.Longitude)),
+ LocationUtils.getElevation(pokeStop.Latitude, pokeStop.Longitude)),
async () =>
{
// Catch normal map Pokemon
@@ -119,9 +120,10 @@ namespace PokemonGo.RocketBot.Logic.Tasks
if (timesZeroXPawarded > zeroCheck)
{
- if ((int)fortSearch.CooldownCompleteTimestampMs != 0)
+ if ((int) fortSearch.CooldownCompleteTimestampMs != 0)
{
- break; // Check if successfully looted, if so program can continue as this was "false alarm".
+ break;
+ // Check if successfully looted, if so program can continue as this was "false alarm".
}
fortTry += 1;
@@ -176,7 +178,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
await eggWalker.ApplyDistance(distance, cancellationToken);
- if (++stopsHit >= _storeRi) //TODO: OR item/pokemon bag is full //check stopsHit against storeRI random without dividing.
+ if (++stopsHit >= _storeRi)
+ //TODO: OR item/pokemon bag is full //check stopsHit against storeRI random without dividing.
{
_storeRi = rc.Next(6, 12); //set new storeRI for new random value
stopsHit = 0;
@@ -237,7 +240,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
LocationUtils.CalculateDistanceInMeters(
session.Settings.DefaultLatitude, session.Settings.DefaultLongitude,
i.Latitude, i.Longitude) < session.LogicSettings.MaxTravelDistanceInMeters ||
- session.LogicSettings.MaxTravelDistanceInMeters == 0)
+ session.LogicSettings.MaxTravelDistanceInMeters == 0)
);
return pokeStops.ToList();
@@ -250,4 +253,4 @@ namespace PokemonGo.RocketBot.Logic.Tasks
public static event LootPokestopDelegate LootPokestopEvent;
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Tasks/FavoritePokemonTask.cs b/PokemonGo.RocketBot.Logic/Tasks/FavoritePokemonTask.cs
index 68f63cc..ea0172b 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/FavoritePokemonTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/FavoritePokemonTask.cs
@@ -26,14 +26,16 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var perfection = Math.Round(PokemonInfo.CalculatePokemonPerfection(pokemon));
- if (session.LogicSettings.AutoFavoritePokemon && perfection >= session.LogicSettings.FavoriteMinIvPercentage && pokemon.Favorite!=1)
+ if (session.LogicSettings.AutoFavoritePokemon &&
+ perfection >= session.LogicSettings.FavoriteMinIvPercentage && pokemon.Favorite != 1)
{
await session.Client.Inventory.SetFavoritePokemon(pokemon.Id, true);
session.EventDispatcher.Send(new NoticeEvent
{
Message =
- session.Translation.GetTranslation(TranslationString.PokemonFavorite, perfection, session.Translation.GetPokemonTranslation(pokemon.PokemonId), pokemon.Cp)
+ session.Translation.GetTranslation(TranslationString.PokemonFavorite, perfection,
+ session.Translation.GetPokemonTranslation(pokemon.PokemonId), pokemon.Cp)
});
}
}
diff --git a/PokemonGo.RocketBot.Logic/Tasks/GetPokeDexCount.cs b/PokemonGo.RocketBot.Logic/Tasks/GetPokeDexCount.cs
index 651f118..d309301 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/GetPokeDexCount.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/GetPokeDexCount.cs
@@ -1,25 +1,30 @@
-using PokemonGo.RocketBot.Logic.State;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using PokemonGo.RocketBot.Logic.Logging;
using PokemonGo.RocketBot.Logic.Common;
+using PokemonGo.RocketBot.Logic.Logging;
+using PokemonGo.RocketBot.Logic.State;
namespace PokemonGo.RocketBot.Logic.Tasks
{
- class GetPokeDexCount
+ internal class GetPokeDexCount
{
public static async Task Execute(ISession session, CancellationToken cancellationToken)
{
var PokeDex = await session.Inventory.GetPokeDexItems();
- var _totalUniqueEncounters = PokeDex.Select(i => new { Pokemon = i.InventoryItemData.PokedexEntry.PokemonId, Captures = i.InventoryItemData.PokedexEntry.TimesCaptured });
+ var _totalUniqueEncounters =
+ PokeDex.Select(
+ i =>
+ new
+ {
+ Pokemon = i.InventoryItemData.PokedexEntry.PokemonId,
+ Captures = i.InventoryItemData.PokedexEntry.TimesCaptured
+ });
var _totalCaptures = _totalUniqueEncounters.Count(i => i.Captures > 0);
var _totalData = PokeDex.Count();
-
- Logger.Write(session.Translation.GetTranslation(TranslationString.AmountPkmSeenCaught, _totalData, _totalCaptures));
+
+ Logger.Write(session.Translation.GetTranslation(TranslationString.AmountPkmSeenCaught, _totalData,
+ _totalCaptures));
}
}
}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Tasks/InventoryListTask.cs b/PokemonGo.RocketBot.Logic/Tasks/InventoryListTask.cs
index 91c2534..8b93bcc 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/InventoryListTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/InventoryListTask.cs
@@ -1,8 +1,8 @@
-using PokemonGo.RocketBot.Logic.Event;
+using System.Linq;
+using System.Threading.Tasks;
+using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.State;
using PokemonGo.RocketBot.Logic.Utils;
-using System.Linq;
-using System.Threading.Tasks;
namespace PokemonGo.RocketBot.Logic.Tasks
{
@@ -24,4 +24,4 @@ namespace PokemonGo.RocketBot.Logic.Tasks
DelayingUtils.Delay(session.LogicSettings.DelayBetweenPlayerActions, 0);
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Tasks/LevelUpPokemonTask.cs b/PokemonGo.RocketBot.Logic/Tasks/LevelUpPokemonTask.cs
index 9089347..3c57c81 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/LevelUpPokemonTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/LevelUpPokemonTask.cs
@@ -1,12 +1,12 @@
#region using directives
using System.Collections.Generic;
+using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using PokemonGo.RocketBot.Logic.Logging;
-using PokemonGo.RocketBot.Logic.State;
using PokemonGo.RocketBot.Logic.PoGoUtils;
-using System.Linq;
+using PokemonGo.RocketBot.Logic.State;
using POGOProtos.Data;
#endregion
@@ -20,8 +20,6 @@ namespace PokemonGo.RocketBot.Logic.Tasks
public static async Task Execute(ISession session, CancellationToken cancellationToken)
{
-
-
if (session.Inventory.GetStarDust() <= session.LogicSettings.GetMinStarDustForLevelUp)
return;
upgradablePokemon = await session.Inventory.GetPokemonToUpgrade();
@@ -30,8 +28,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var fave = upgradablePokemon.Where(i => i.Favorite == 1);
upgradablePokemon = fave;
}
-
-
+
+
if (upgradablePokemon.Count() == 0)
return;
@@ -46,9 +44,9 @@ namespace PokemonGo.RocketBot.Logic.Tasks
foreach (var pokemon in upgradablePokemon)
{
- if (session.LogicSettings.UseLevelUpList && PokemonToLevel!=null)
+ if (session.LogicSettings.UseLevelUpList && PokemonToLevel != null)
{
- for (int i = 0; i < PokemonToLevel.Count; i++)
+ for (var i = 0; i < PokemonToLevel.Count; i++)
{
if (PokemonToLevel.Contains(pokemon.PokemonId))
{
@@ -66,7 +64,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
Logger.Write("Pokemon Upgraded:" +
session.Translation.GetPokemonTranslation(
upgradeResult.UpgradedPokemon.PokemonId) + ":" +
- upgradeResult.UpgradedPokemon.Cp,LogLevel.LevelUp);
+ upgradeResult.UpgradedPokemon.Cp, LogLevel.LevelUp);
upgradedNumber++;
}
@@ -78,11 +76,11 @@ namespace PokemonGo.RocketBot.Logic.Tasks
break;
}
}
-
}
else
{
- if (PokemonInfo.GetLevel(pokemon) >= session.Inventory.GetPlayerStats().Result.FirstOrDefault().Level + 1) break;
+ if (PokemonInfo.GetLevel(pokemon) >=
+ session.Inventory.GetPlayerStats().Result.FirstOrDefault().Level + 1) break;
var settings = pokemonSettings.Single(x => x.PokemonId == pokemon.PokemonId);
var familyCandy = pokemonFamilies.Single(x => settings.FamilyId == x.FamilyId);
@@ -92,17 +90,17 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var upgradeResult = await session.Inventory.UpgradePokemon(pokemon.Id);
if (upgradeResult.Result.ToString().ToLower().Contains("success"))
{
- Logger.Write("Pokemon Upgraded:" + session.Translation.GetPokemonTranslation(upgradeResult.UpgradedPokemon.PokemonId) + ":" +
- upgradeResult.UpgradedPokemon.Cp, LogLevel.LevelUp);
+ Logger.Write(
+ "Pokemon Upgraded:" +
+ session.Translation.GetPokemonTranslation(upgradeResult.UpgradedPokemon.PokemonId) + ":" +
+ upgradeResult.UpgradedPokemon.Cp, LogLevel.LevelUp);
upgradedNumber++;
}
if (upgradedNumber >= session.LogicSettings.AmountOfTimesToUpgradeLoop)
break;
}
-
-
}
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Tasks/Login.cs b/PokemonGo.RocketBot.Logic/Tasks/Login.cs
index 3fe0593..5106b77 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/Login.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/Login.cs
@@ -1,11 +1,11 @@
#region using directives
using System;
+using PokemonGo.RocketAPI.Enums;
+using PokemonGo.RocketAPI.Exceptions;
using PokemonGo.RocketBot.Logic.Common;
using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.State;
-using PokemonGo.RocketAPI.Enums;
-using PokemonGo.RocketAPI.Exceptions;
#endregion
@@ -45,7 +45,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
throw ae.Flatten().InnerException;
}
- catch(LoginFailedException)
+ catch (LoginFailedException)
{
_session.EventDispatcher.Send(new ErrorEvent
{
diff --git a/PokemonGo.RocketBot.Logic/Tasks/PokemonListTask.cs b/PokemonGo.RocketBot.Logic/Tasks/PokemonListTask.cs
index 106f202..9eb2307 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/PokemonListTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/PokemonListTask.cs
@@ -27,13 +27,14 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var allPokemonInBag = await session.Inventory.GetHighestsCp(1000);
- var pkmWithIv = allPokemonInBag.Select(p => {
+ var pkmWithIv = allPokemonInBag.Select(p =>
+ {
var settings = pokemonSettings.Single(x => x.PokemonId == p.PokemonId);
return Tuple.Create(
p,
PokemonInfo.CalculatePokemonPerfection(p),
pokemonFamilies.Single(x => settings.FamilyId == x.FamilyId).Candy_
- );
+ );
});
session.EventDispatcher.Send(
diff --git a/PokemonGo.RocketBot.Logic/Tasks/RecycleItemsTask.cs b/PokemonGo.RocketBot.Logic/Tasks/RecycleItemsTask.cs
index c63c469..d851dda 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/RecycleItemsTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/RecycleItemsTask.cs
@@ -1,14 +1,14 @@
#region using directives
+using System;
+using System.Threading;
+using System.Threading.Tasks;
using PokemonGo.RocketBot.Logic.Common;
using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.Logging;
using PokemonGo.RocketBot.Logic.State;
using PokemonGo.RocketBot.Logic.Utils;
using POGOProtos.Inventory.Item;
-using System.Threading;
-using System.Threading.Tasks;
-using System;
#endregion
@@ -17,14 +17,15 @@ namespace PokemonGo.RocketBot.Logic.Tasks
public class RecycleItemsTask
{
private static int _diff;
- private static Random rnd = new Random();
+ private static readonly Random rnd = new Random();
public static async Task Execute(ISession session, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
var currentTotalItems = await session.Inventory.GetTotalItemCount();
- if ((session.Profile.PlayerData.MaxItemStorage * session.LogicSettings.RecycleInventoryAtUsagePercentage / 100.0f) > currentTotalItems)
+ if (session.Profile.PlayerData.MaxItemStorage*session.LogicSettings.RecycleInventoryAtUsagePercentage/100.0f >
+ currentTotalItems)
return;
var currentAmountOfPokeballs = await session.Inventory.GetItemAmountByType(ItemId.ItemPokeBall);
@@ -47,7 +48,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
if (session.LogicSettings.DetailedCountsBeforeRecycling)
Logger.Write(session.Translation.GetTranslation(TranslationString.CurrentPotionInv,
currentPotions, currentSuperPotions, currentHyperPotions, currentMaxPotions));
-
+
var currentRevives = await session.Inventory.GetItemAmountByType(ItemId.ItemRevive);
var currentMaxRevives = await session.Inventory.GetItemAmountByType(ItemId.ItemMaxRevive);
@@ -58,14 +59,14 @@ namespace PokemonGo.RocketBot.Logic.Tasks
currentRevives, currentMaxRevives));
var currentAmountOfBerries = await session.Inventory.GetItemAmountByType(ItemId.ItemRazzBerry) +
- await session.Inventory.GetItemAmountByType(ItemId.ItemBlukBerry) +
- await session.Inventory.GetItemAmountByType(ItemId.ItemNanabBerry) +
- await session.Inventory.GetItemAmountByType(ItemId.ItemWeparBerry) +
- await session.Inventory.GetItemAmountByType(ItemId.ItemPinapBerry);
+ await session.Inventory.GetItemAmountByType(ItemId.ItemBlukBerry) +
+ await session.Inventory.GetItemAmountByType(ItemId.ItemNanabBerry) +
+ await session.Inventory.GetItemAmountByType(ItemId.ItemWeparBerry) +
+ await session.Inventory.GetItemAmountByType(ItemId.ItemPinapBerry);
var currentAmountOfIncense = await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseOrdinary) +
- await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseSpicy) +
- await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseCool) +
- await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseFloral);
+ await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseSpicy) +
+ await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseCool) +
+ await session.Inventory.GetItemAmountByType(ItemId.ItemIncenseFloral);
var currentAmountOfLuckyEggs = await session.Inventory.GetItemAmountByType(ItemId.ItemLuckyEgg);
var currentAmountOfLures = await session.Inventory.GetItemAmountByType(ItemId.ItemTroyDisk);
@@ -79,18 +80,19 @@ namespace PokemonGo.RocketBot.Logic.Tasks
if (!session.LogicSettings.VerboseRecycling)
Logger.Write(session.Translation.GetTranslation(TranslationString.RecyclingQuietly), LogLevel.Recycling);
- if (session.LogicSettings.TotalAmountOfPotionsToKeep>=0)
+ if (session.LogicSettings.TotalAmountOfPotionsToKeep >= 0)
await OptimizedRecyclePotions(session, cancellationToken);
- if (session.LogicSettings.TotalAmountOfRevivesToKeep>=0)
+ if (session.LogicSettings.TotalAmountOfRevivesToKeep >= 0)
await OptimizedRecycleRevives(session, cancellationToken);
if (session.LogicSettings.TotalAmountOfBerriesToKeep >= 0)
await OptimizedRecycleBerries(session, cancellationToken);
-
+
await session.Inventory.RefreshCachedInventory();
currentTotalItems = await session.Inventory.GetTotalItemCount();
- if ((session.Profile.PlayerData.MaxItemStorage * session.LogicSettings.RecycleInventoryAtUsagePercentage / 100.0f) > currentTotalItems)
+ if (session.Profile.PlayerData.MaxItemStorage*session.LogicSettings.RecycleInventoryAtUsagePercentage/100.0f >
+ currentTotalItems)
return;
var items = await session.Inventory.GetItemsToRecycle(session);
@@ -102,7 +104,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
await session.Client.Inventory.RecycleItem(item.ItemId, item.Count);
if (session.LogicSettings.VerboseRecycling)
- session.EventDispatcher.Send(new ItemRecycledEvent { Id = item.ItemId, Count = item.Count });
+ session.EventDispatcher.Send(new ItemRecycledEvent {Id = item.ItemId, Count = item.Count});
if (session.LogicSettings.DelayBetweenRecycleActions)
DelayingUtils.Delay(session.LogicSettings.DelayBetweenPlayerActions, 500);
}
@@ -110,10 +112,11 @@ namespace PokemonGo.RocketBot.Logic.Tasks
await session.Inventory.RefreshCachedInventory();
}
- private static async Task RecycleItems(ISession session, CancellationToken cancellationToken, int itemCount, ItemId item)
+ private static async Task RecycleItems(ISession session, CancellationToken cancellationToken, int itemCount,
+ ItemId item)
{
- int itemsToRecycle = 0;
- int itemsToKeep = itemCount - _diff;
+ var itemsToRecycle = 0;
+ var itemsToKeep = itemCount - _diff;
if (itemsToKeep < 0)
itemsToKeep = 0;
itemsToRecycle = itemCount - itemsToKeep;
@@ -123,7 +126,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
cancellationToken.ThrowIfCancellationRequested();
await session.Client.Inventory.RecycleItem(item, itemsToRecycle);
if (session.LogicSettings.VerboseRecycling)
- session.EventDispatcher.Send(new ItemRecycledEvent { Id = item, Count = itemsToRecycle });
+ session.EventDispatcher.Send(new ItemRecycledEvent {Id = item, Count = itemsToRecycle});
if (session.LogicSettings.DelayBetweenRecycleActions)
DelayingUtils.Delay(session.LogicSettings.DelayBetweenPlayerActions, 500);
}
@@ -136,25 +139,28 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var ultraBallsCount = await session.Inventory.GetItemAmountByType(ItemId.ItemUltraBall);
var masterBallsCount = await session.Inventory.GetItemAmountByType(ItemId.ItemMasterBall);
- int totalBallsCount = pokeBallsCount + greatBallsCount + ultraBallsCount + masterBallsCount;
- int random = rnd.Next(-1 * session.LogicSettings.RandomRecycleValue, session.LogicSettings.RandomRecycleValue + 1);
+ var totalBallsCount = pokeBallsCount + greatBallsCount + ultraBallsCount + masterBallsCount;
+ var random = rnd.Next(-1*session.LogicSettings.RandomRecycleValue,
+ session.LogicSettings.RandomRecycleValue + 1);
if (totalBallsCount > session.LogicSettings.TotalAmountOfPokeballsToKeep)
{
if (session.LogicSettings.RandomizeRecycle)
{
_diff = totalBallsCount - session.LogicSettings.TotalAmountOfPokeballsToKeep + random;
- } else {
+ }
+ else
+ {
_diff = totalBallsCount - session.LogicSettings.TotalAmountOfPokeballsToKeep;
}
-
+
if (_diff > 0)
{
await RecycleItems(session, cancellationToken, pokeBallsCount, ItemId.ItemPokeBall);
}
if (_diff > 0)
{
- await RecycleItems(session, cancellationToken, greatBallsCount, ItemId.ItemGreatBall);
+ await RecycleItems(session, cancellationToken, greatBallsCount, ItemId.ItemGreatBall);
}
if (_diff > 0)
{
@@ -173,9 +179,10 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var superPotionCount = await session.Inventory.GetItemAmountByType(ItemId.ItemSuperPotion);
var hyperPotionsCount = await session.Inventory.GetItemAmountByType(ItemId.ItemHyperPotion);
var maxPotionCount = await session.Inventory.GetItemAmountByType(ItemId.ItemMaxPotion);
-
- int totalPotionsCount = potionCount + superPotionCount + hyperPotionsCount + maxPotionCount;
- int random = rnd.Next(-1 * session.LogicSettings.RandomRecycleValue, session.LogicSettings.RandomRecycleValue + 1);
+
+ var totalPotionsCount = potionCount + superPotionCount + hyperPotionsCount + maxPotionCount;
+ var random = rnd.Next(-1*session.LogicSettings.RandomRecycleValue,
+ session.LogicSettings.RandomRecycleValue + 1);
if (totalPotionsCount > session.LogicSettings.TotalAmountOfPotionsToKeep)
{
if (session.LogicSettings.RandomizeRecycle)
@@ -186,7 +193,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
_diff = totalPotionsCount - session.LogicSettings.TotalAmountOfPotionsToKeep;
}
-
+
if (_diff > 0)
{
await RecycleItems(session, cancellationToken, potionCount, ItemId.ItemPotion);
@@ -214,8 +221,9 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var reviveCount = await session.Inventory.GetItemAmountByType(ItemId.ItemRevive);
var maxReviveCount = await session.Inventory.GetItemAmountByType(ItemId.ItemMaxRevive);
- int totalRevivesCount = reviveCount + maxReviveCount;
- int random = rnd.Next(-1 * session.LogicSettings.RandomRecycleValue, session.LogicSettings.RandomRecycleValue + 1);
+ var totalRevivesCount = reviveCount + maxReviveCount;
+ var random = rnd.Next(-1*session.LogicSettings.RandomRecycleValue,
+ session.LogicSettings.RandomRecycleValue + 1);
if (totalRevivesCount > session.LogicSettings.TotalAmountOfRevivesToKeep)
{
if (session.LogicSettings.RandomizeRecycle)
@@ -246,8 +254,9 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var pinap = await session.Inventory.GetItemAmountByType(ItemId.ItemPinapBerry);
var wepar = await session.Inventory.GetItemAmountByType(ItemId.ItemWeparBerry);
- int totalBerryCount = razz + bluk + nanab + pinap + wepar;
- int random = rnd.Next(-1 * session.LogicSettings.RandomRecycleValue, session.LogicSettings.RandomRecycleValue + 1);
+ var totalBerryCount = razz + bluk + nanab + pinap + wepar;
+ var random = rnd.Next(-1*session.LogicSettings.RandomRecycleValue,
+ session.LogicSettings.RandomRecycleValue + 1);
if (totalBerryCount > session.LogicSettings.TotalAmountOfBerriesToKeep)
{
if (session.LogicSettings.RandomizeRecycle)
@@ -258,7 +267,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
_diff = totalBerryCount - session.LogicSettings.TotalAmountOfBerriesToKeep;
}
-
+
if (_diff > 0)
{
await RecycleItems(session, cancellationToken, razz, ItemId.ItemRazzBerry);
@@ -286,4 +295,4 @@ namespace PokemonGo.RocketBot.Logic.Tasks
}
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Tasks/RenamePokemonTask.cs b/PokemonGo.RocketBot.Logic/Tasks/RenamePokemonTask.cs
index 43d471c..954ec93 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/RenamePokemonTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/RenamePokemonTask.cs
@@ -48,7 +48,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
session.EventDispatcher.Send(new NoticeEvent
{
Message =
- session.Translation.GetTranslation(TranslationString.PokemonRename, session.Translation.GetPokemonTranslation(pokemon.PokemonId),
+ session.Translation.GetTranslation(TranslationString.PokemonRename,
+ session.Translation.GetPokemonTranslation(pokemon.PokemonId),
pokemon.Id, oldNickname, newNickname)
});
}
diff --git a/PokemonGo.RocketBot.Logic/Tasks/SnipePokemonTask.cs b/PokemonGo.RocketBot.Logic/Tasks/SnipePokemonTask.cs
index 135f71c..8dc1459 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/SnipePokemonTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/SnipePokemonTask.cs
@@ -1,6 +1,5 @@
#region using directives
-using CloudFlareUtilities;
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -11,7 +10,9 @@ using System.Net.Http;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
+using CloudFlareUtilities;
using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using PokemonGo.RocketBot.Logic.Common;
using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.PoGoUtils;
@@ -20,8 +21,9 @@ using POGOProtos.Enums;
using POGOProtos.Inventory.Item;
using POGOProtos.Map.Pokemon;
using POGOProtos.Networking.Responses;
+using Quobject.Collections.Immutable;
using Quobject.SocketIoClientDotNet.Client;
-using Newtonsoft.Json.Linq;
+using Socket = Quobject.SocketIoClientDotNet.Client.Socket;
#endregion
@@ -90,11 +92,11 @@ namespace PokemonGo.RocketBot.Logic.Tasks
public class PokemonLocation_pokezz
{
-
public double time { get; set; }
public double lat { get; set; }
public double lng { get; set; }
public string iv { get; set; }
+
public double _iv
{
get
@@ -109,8 +111,9 @@ namespace PokemonGo.RocketBot.Logic.Tasks
}
}
}
+
public PokemonId name { get; set; }
- public Boolean verified { get; set; }
+ public bool verified { get; set; }
}
public class PokemonLocation_pokesnipers
@@ -139,6 +142,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
public class ScanResult_pokesnipers
{
public string Status { get; set; }
+
[JsonProperty("results")]
public List<PokemonLocation_pokesnipers> pokemons { get; set; }
}
@@ -154,7 +158,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
public static List<PokemonLocation> LocsVisited = new List<PokemonLocation>();
private static readonly List<SniperInfo> SnipeLocations = new List<SniperInfo>();
private static DateTime _lastSnipe = DateTime.MinValue;
-
+
public static Task AsyncStart(Session session, CancellationToken cancellationToken = default(CancellationToken))
{
return Task.Run(() => Start(session, cancellationToken), cancellationToken);
@@ -194,13 +198,16 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
if (session.LogicSettings.PokemonToSnipe != null)
{
- List<PokemonId> pokemonIds = new List<PokemonId>();
+ var pokemonIds = new List<PokemonId>();
if (session.LogicSettings.SnipePokemonNotInPokedex)
{
var PokeDex = await session.Inventory.GetPokeDexItems();
var pokemonOnlyList = session.LogicSettings.PokemonToSnipe.Pokemon;
- var capturedPokemon = PokeDex.Where(i => i.InventoryItemData.PokedexEntry.TimesCaptured >= 1).Select(i => i.InventoryItemData.PokedexEntry.PokemonId);
- var pokemonToCapture = Enum.GetValues(typeof(PokemonId)).Cast<PokemonId>().Except(capturedPokemon);
+ var capturedPokemon =
+ PokeDex.Where(i => i.InventoryItemData.PokedexEntry.TimesCaptured >= 1)
+ .Select(i => i.InventoryItemData.PokedexEntry.PokemonId);
+ var pokemonToCapture =
+ Enum.GetValues(typeof(PokemonId)).Cast<PokemonId>().Except(capturedPokemon);
pokemonIds = pokemonOnlyList.Union(pokemonToCapture).ToList();
}
else
@@ -211,16 +218,16 @@ namespace PokemonGo.RocketBot.Logic.Tasks
if (session.LogicSettings.UseSnipeLocationServer)
{
var locationsToSnipe = SnipeLocations?.Where(q =>
- (!session.LogicSettings.UseTransferIvForSnipe ||
- (q.IV == 0 && !session.LogicSettings.SnipeIgnoreUnknownIv) ||
- (q.IV >= session.Inventory.GetPokemonTransferFilter(q.Id).KeepMinIvPercentage)) &&
- !LocsVisited.Contains(new PokemonLocation(q.Latitude, q.Longitude))
- && !(q.ExpirationTimestamp != default(DateTime) &&
- q.ExpirationTimestamp > new DateTime(2016) &&
- // make absolutely sure that the server sent a correct datetime
- q.ExpirationTimestamp < DateTime.Now) &&
- (q.Id == PokemonId.Missingno || pokemonIds.Contains(q.Id))).ToList() ??
- new List<SniperInfo>();
+ (!session.LogicSettings.UseTransferIvForSnipe ||
+ (q.IV == 0 && !session.LogicSettings.SnipeIgnoreUnknownIv) ||
+ (q.IV >= session.Inventory.GetPokemonTransferFilter(q.Id).KeepMinIvPercentage)) &&
+ !LocsVisited.Contains(new PokemonLocation(q.Latitude, q.Longitude))
+ && !(q.ExpirationTimestamp != default(DateTime) &&
+ q.ExpirationTimestamp > new DateTime(2016) &&
+ // make absolutely sure that the server sent a correct datetime
+ q.ExpirationTimestamp < DateTime.Now) &&
+ (q.Id == PokemonId.Missingno || pokemonIds.Contains(q.Id))).ToList() ??
+ new List<SniperInfo>();
var _locationsToSnipe = locationsToSnipe.OrderBy(q => q.ExpirationTimestamp).ToList();
@@ -228,7 +235,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
foreach (var location in _locationsToSnipe)
{
- if ((location.ExpirationTimestamp > DateTime.Now.AddSeconds(10)) && (!LocsVisited.Contains(new PokemonLocation(location.Latitude, location.Longitude))))
+ if ((location.ExpirationTimestamp > DateTime.Now.AddSeconds(10)) &&
+ !LocsVisited.Contains(new PokemonLocation(location.Latitude, location.Longitude)))
{
session.EventDispatcher.Send(new SnipeScanEvent
{
@@ -238,10 +246,15 @@ namespace PokemonGo.RocketBot.Logic.Tasks
Iv = location.IV
});
- if (!await CheckPokeballsToSnipe(session.LogicSettings.MinPokeballsWhileSnipe + 1, session, cancellationToken))
+ if (
+ !await
+ CheckPokeballsToSnipe(session.LogicSettings.MinPokeballsWhileSnipe + 1,
+ session, cancellationToken))
return;
- await Snipe(session, pokemonIds, location.Latitude, location.Longitude, cancellationToken);
+ await
+ Snipe(session, pokemonIds, location.Latitude, location.Longitude,
+ cancellationToken);
}
}
}
@@ -254,7 +267,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
foreach (var location in _locationsToSnipe)
{
- if ((location.ExpirationTimestamp > DateTime.Now.AddSeconds(10)) && (!LocsVisited.Contains(new PokemonLocation(location.Latitude, location.Longitude))))
+ if ((location.ExpirationTimestamp > DateTime.Now.AddSeconds(10)) &&
+ !LocsVisited.Contains(new PokemonLocation(location.Latitude, location.Longitude)))
{
session.EventDispatcher.Send(new SnipeScanEvent
{
@@ -264,10 +278,15 @@ namespace PokemonGo.RocketBot.Logic.Tasks
Iv = location.IV
});
- if (!await CheckPokeballsToSnipe(session.LogicSettings.MinPokeballsWhileSnipe + 1, session, cancellationToken))
+ if (
+ !await
+ CheckPokeballsToSnipe(session.LogicSettings.MinPokeballsWhileSnipe + 1,
+ session, cancellationToken))
return;
-
- await Snipe(session, pokemonIds, location.Latitude, location.Longitude, cancellationToken);
+
+ await
+ Snipe(session, pokemonIds, location.Latitude, location.Longitude,
+ cancellationToken);
}
}
}
@@ -280,7 +299,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
foreach (var location in _locationsToSnipe)
{
- if ((location.ExpirationTimestamp > DateTime.Now.AddSeconds(10)) && (!LocsVisited.Contains(new PokemonLocation(location.Latitude, location.Longitude))))
+ if ((location.ExpirationTimestamp > DateTime.Now.AddSeconds(10)) &&
+ !LocsVisited.Contains(new PokemonLocation(location.Latitude, location.Longitude)))
{
session.EventDispatcher.Send(new SnipeScanEvent
{
@@ -290,10 +310,15 @@ namespace PokemonGo.RocketBot.Logic.Tasks
Iv = location.IV
});
- if (!await CheckPokeballsToSnipe(session.LogicSettings.MinPokeballsWhileSnipe + 1, session, cancellationToken))
+ if (
+ !await
+ CheckPokeballsToSnipe(session.LogicSettings.MinPokeballsWhileSnipe + 1,
+ session, cancellationToken))
return;
-
- await Snipe(session, pokemonIds, location.Latitude, location.Longitude, cancellationToken);
+
+ await
+ Snipe(session, pokemonIds, location.Latitude, location.Longitude,
+ cancellationToken);
}
}
}
@@ -306,7 +331,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
foreach (var location in _locationsToSnipe)
{
- if ((location.ExpirationTimestamp > DateTime.Now.AddSeconds(10)) && (!LocsVisited.Contains(new PokemonLocation(location.Latitude, location.Longitude))))
+ if ((location.ExpirationTimestamp > DateTime.Now.AddSeconds(10)) &&
+ !LocsVisited.Contains(new PokemonLocation(location.Latitude, location.Longitude)))
{
session.EventDispatcher.Send(new SnipeScanEvent
{
@@ -316,10 +342,15 @@ namespace PokemonGo.RocketBot.Logic.Tasks
Iv = location.IV
});
- if (!await CheckPokeballsToSnipe(session.LogicSettings.MinPokeballsWhileSnipe + 1, session, cancellationToken))
+ if (
+ !await
+ CheckPokeballsToSnipe(session.LogicSettings.MinPokeballsWhileSnipe + 1,
+ session, cancellationToken))
return;
- await Snipe(session, pokemonIds, location.Latitude, location.Longitude, cancellationToken);
+ await
+ Snipe(session, pokemonIds, location.Latitude, location.Longitude,
+ cancellationToken);
}
}
}
@@ -343,7 +374,12 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
var filteredPokemon = scanResult.pokemons.Where(q => pokemonIds.Contains(q.pokemon_name));
var notVisitedPokemon = filteredPokemon.Where(q => !LocsVisited.Contains(q));
- var notExpiredPokemon = notVisitedPokemon.Where(q => q.expires < (DateTime.Now.ToUniversalTime() - (new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc))).TotalMilliseconds);
+ var notExpiredPokemon =
+ notVisitedPokemon.Where(
+ q =>
+ q.expires <
+ (DateTime.Now.ToUniversalTime() -
+ new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds);
if (notExpiredPokemon.Any())
locationsToSnipe.AddRange(notExpiredPokemon);
@@ -355,22 +391,38 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
foreach (var pokemonLocation in _locationsToSnipe)
{
- if ((pokemonLocation.expires > (((DateTime.Now.ToUniversalTime() - (new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc))).TotalMilliseconds) + 10000)) && (!LocsVisited.Contains(new PokemonLocation(pokemonLocation.latitude, pokemonLocation.longitude))))
+ if ((pokemonLocation.expires >
+ (DateTime.Now.ToUniversalTime() -
+ new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds + 10000) &&
+ !LocsVisited.Contains(new PokemonLocation(pokemonLocation.latitude,
+ pokemonLocation.longitude)))
{
- if (!await CheckPokeballsToSnipe(session.LogicSettings.MinPokeballsWhileSnipe + 1, session, cancellationToken))
+ if (
+ !await
+ CheckPokeballsToSnipe(session.LogicSettings.MinPokeballsWhileSnipe + 1,
+ session, cancellationToken))
return;
-
- await Snipe(session, pokemonIds, location.Latitude, location.Longitude, cancellationToken);
+
+ await
+ Snipe(session, pokemonIds, location.Latitude, location.Longitude,
+ cancellationToken);
}
}
}
- else if (session.LogicSettings.UseSnipeLocationServer && !string.IsNullOrEmpty(scanResult.Status) && scanResult.Status.Contains("fail"))
- session.EventDispatcher.Send(new SnipeEvent{Message = session.Translation.GetTranslation(TranslationString.SnipeServerOffline)});
+ else if (session.LogicSettings.UseSnipeLocationServer &&
+ !string.IsNullOrEmpty(scanResult.Status) && scanResult.Status.Contains("fail"))
+ session.EventDispatcher.Send(new SnipeEvent
+ {
+ Message =
+ session.Translation.GetTranslation(TranslationString.SnipeServerOffline)
+ });
else
- session.EventDispatcher.Send(new SnipeEvent{Message = session.Translation.GetTranslation(TranslationString.NoPokemonToSnipe)});
+ session.EventDispatcher.Send(new SnipeEvent
+ {
+ Message = session.Translation.GetTranslation(TranslationString.NoPokemonToSnipe)
+ });
}
}
-
}
}
}
@@ -385,7 +437,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var CurrentLongitude = session.Client.CurrentLongitude;
var catchedPokemon = false;
- session.EventDispatcher.Send(new SnipeModeEvent { Active = true });
+ session.EventDispatcher.Send(new SnipeModeEvent {Active = true});
List<MapPokemon> catchablePokemon;
try
@@ -407,7 +459,9 @@ namespace PokemonGo.RocketBot.Logic.Tasks
}
finally
{
- await session.Client.Player.UpdatePlayerLocation(CurrentLatitude, CurrentLongitude, session.Client.CurrentAltitude);
+ await
+ session.Client.Player.UpdatePlayerLocation(CurrentLatitude, CurrentLongitude,
+ session.Client.CurrentAltitude);
}
if (catchablePokemon.Count == 0)
@@ -417,24 +471,27 @@ namespace PokemonGo.RocketBot.Logic.Tasks
if (!LocsVisited.Contains(new PokemonLocation(latitude, longitude)))
LocsVisited.Add(new PokemonLocation(latitude, longitude));
}
-
+
foreach (var pokemon in catchablePokemon)
{
EncounterResponse encounter;
try
{
- await session.Client.Player.UpdatePlayerLocation(latitude, longitude, session.Client.CurrentAltitude);
+ await
+ session.Client.Player.UpdatePlayerLocation(latitude, longitude, session.Client.CurrentAltitude);
- encounter = session.Client.Encounter.EncounterPokemon(pokemon.EncounterId, pokemon.SpawnPointId).Result;
+ encounter =
+ session.Client.Encounter.EncounterPokemon(pokemon.EncounterId, pokemon.SpawnPointId).Result;
}
finally
{
- await session.Client.Player.UpdatePlayerLocation(CurrentLatitude, CurrentLongitude, session.Client.CurrentAltitude);
+ await
+ session.Client.Player.UpdatePlayerLocation(CurrentLatitude, CurrentLongitude,
+ session.Client.CurrentAltitude);
}
if (encounter.Status == EncounterResponse.Types.Status.EncounterSuccess)
{
-
if (!LocsVisited.Contains(new PokemonLocation(latitude, longitude)))
LocsVisited.Add(new PokemonLocation(latitude, longitude));
//Also add exact pokemon location to LocsVisited, some times the server one differ a little.
@@ -496,14 +553,13 @@ namespace PokemonGo.RocketBot.Logic.Tasks
_lastSnipe = DateTime.Now;
- session.EventDispatcher.Send(new SnipeModeEvent { Active = false });
+ session.EventDispatcher.Send(new SnipeModeEvent {Active = false});
await Task.Delay(session.LogicSettings.DelayBetweenPlayerActions, cancellationToken);
-
}
private static ScanResult SnipeScanForPokemon(ISession session, Location location)
{
- var formatter = new NumberFormatInfo { NumberDecimalSeparator = "." };
+ var formatter = new NumberFormatInfo {NumberDecimalSeparator = "."};
var offset = session.LogicSettings.SnipingScanOffset;
// 0.003 = half a mile; maximum 0.06 is 10 miles
@@ -531,14 +587,19 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var resp = request.GetResponse();
var reader = new StreamReader(resp.GetResponseStream());
- var fullresp = reader.ReadToEnd().Replace(" M", "Male").Replace(" F", "Female").Replace("Farfetch'd", "Farfetchd").Replace("Mr.Maleime", "MrMime");
+ var fullresp =
+ reader.ReadToEnd()
+ .Replace(" M", "Male")
+ .Replace(" F", "Female")
+ .Replace("Farfetch'd", "Farfetchd")
+ .Replace("Mr.Maleime", "MrMime");
scanResult = JsonConvert.DeserializeObject<ScanResult>(fullresp);
}
catch (Exception ex)
{
// most likely System.IO.IOException
- session.EventDispatcher.Send(new ErrorEvent { Message = ex.Message });
+ session.EventDispatcher.Send(new ErrorEvent {Message = ex.Message});
scanResult = new ScanResult
{
Status = "fail",
@@ -551,38 +612,43 @@ namespace PokemonGo.RocketBot.Logic.Tasks
private static List<SniperInfo> GetSniperInfoFrom_pokezz(ISession session, List<PokemonId> pokemonIds)
{
var options = new IO.Options();
- options.Transports = Quobject.Collections.Immutable.ImmutableList.Create<string>("websocket");
+ options.Transports = ImmutableList.Create("websocket");
var socket = IO.Socket("http://pokezz.com", options);
var hasError = false;
- ManualResetEventSlim waitforbroadcast = new ManualResetEventSlim(false);
+ var waitforbroadcast = new ManualResetEventSlim(false);
- List<PokemonLocation_pokezz> pokemons = new List<PokemonLocation_pokezz>();
+ var pokemons = new List<PokemonLocation_pokezz>();
- socket.On("pokemons", (msg) =>
+ socket.On("pokemons", msg =>
{
socket.Close();
- JArray data = JArray.FromObject(msg);
+ var data = JArray.FromObject(msg);
foreach (var pokeToken in data.Children())
{
- var Token = pokeToken.ToString().Replace(" M", "Male").Replace(" F", "Female").Replace("Farfetch'd", "Farfetchd").Replace("Mr.Maleime", "MrMime");
+ var Token =
+ pokeToken.ToString()
+ .Replace(" M", "Male")
+ .Replace(" F", "Female")
+ .Replace("Farfetch'd", "Farfetchd")
+ .Replace("Mr.Maleime", "MrMime");
pokemons.Add(JToken.Parse(Token).ToObject<PokemonLocation_pokezz>());
}
waitforbroadcast.Set();
});
- socket.On(Quobject.SocketIoClientDotNet.Client.Socket.EVENT_ERROR, () =>
+ socket.On(Socket.EVENT_ERROR, () =>
{
socket.Close();
hasError = true;
waitforbroadcast.Set();
});
- socket.On(Quobject.SocketIoClientDotNet.Client.Socket.EVENT_CONNECT_ERROR, () =>
+ socket.On(Socket.EVENT_CONNECT_ERROR, () =>
{
socket.Close();
hasError = true;
@@ -599,7 +665,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
SnipInfo.Latitude = pokemon.lat;
SnipInfo.Longitude = pokemon.lng;
SnipInfo.TimeStampAdded = DateTime.Now;
- SnipInfo.ExpirationTimestamp = new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(Math.Round(pokemon.time / 1000d)).ToLocalTime();
+ SnipInfo.ExpirationTimestamp =
+ new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(Math.Round(pokemon.time/1000d)).ToLocalTime();
SnipInfo.IV = pokemon._iv;
if (pokemon.verified || !session.LogicSettings.GetOnlyVerifiedSniperInfoFromPokezz)
SnipeLocations.Add(SnipInfo);
@@ -607,28 +674,24 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var locationsToSnipe = SnipeLocations?.Where(q =>
(!session.LogicSettings.UseTransferIvForSnipe ||
- (q.IV == 0 && !session.LogicSettings.SnipeIgnoreUnknownIv) ||
- (q.IV >= session.Inventory.GetPokemonTransferFilter(q.Id).KeepMinIvPercentage)) &&
+ (q.IV == 0 && !session.LogicSettings.SnipeIgnoreUnknownIv) ||
+ (q.IV >= session.Inventory.GetPokemonTransferFilter(q.Id).KeepMinIvPercentage)) &&
!LocsVisited.Contains(new PokemonLocation(q.Latitude, q.Longitude))
&& !(q.ExpirationTimestamp != default(DateTime) &&
- q.ExpirationTimestamp > new DateTime(2016) &&
- // make absolutely sure that the server sent a correct datetime
- q.ExpirationTimestamp < DateTime.Now) &&
+ q.ExpirationTimestamp > new DateTime(2016) &&
+ // make absolutely sure that the server sent a correct datetime
+ q.ExpirationTimestamp < DateTime.Now) &&
(q.Id == PokemonId.Missingno || pokemonIds.Contains(q.Id))).ToList() ??
- new List<SniperInfo>();
+ new List<SniperInfo>();
return locationsToSnipe.OrderBy(q => q.ExpirationTimestamp).ToList();
}
- else
- {
- session.EventDispatcher.Send(new ErrorEvent {Message = "(Pokezz.com) Connection Error"});
- return new List<SniperInfo>();
- }
+ session.EventDispatcher.Send(new ErrorEvent {Message = "(Pokezz.com) Connection Error"});
+ return new List<SniperInfo>();
}
private static List<SniperInfo> GetSniperInfoFrom_pokesnipers(ISession session, List<PokemonId> pokemonIds)
{
-
var uri = $"http://pokesnipers.com/api/v1/pokemon.json";
ScanResult_pokesnipers scanResult_pokesnipers;
@@ -640,7 +703,12 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var client = new HttpClient(handler);
// Use the HttpClient as usual. Any JS challenge will be solved automatically for you.
- var fullresp = client.GetStringAsync(uri).Result.Replace(" M", "Male").Replace(" F", "Female").Replace("Farfetch'd", "Farfetchd").Replace("Mr.Maleime", "MrMime");
+ var fullresp =
+ client.GetStringAsync(uri)
+ .Result.Replace(" M", "Male")
+ .Replace(" F", "Female")
+ .Replace("Farfetch'd", "Farfetchd")
+ .Replace("Mr.Maleime", "MrMime");
scanResult_pokesnipers = JsonConvert.DeserializeObject<ScanResult_pokesnipers>(fullresp);
}
@@ -658,7 +726,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
var SnipInfo = new SniperInfo();
SnipInfo.Id = pokemon.name;
- string[] coordsArray = pokemon.coords.Split(',');
+ var coordsArray = pokemon.coords.Split(',');
SnipInfo.Latitude = Convert.ToDouble(coordsArray[0], CultureInfo.InvariantCulture);
SnipInfo.Longitude = Convert.ToDouble(coordsArray[1], CultureInfo.InvariantCulture);
SnipInfo.TimeStampAdded = DateTime.Now;
@@ -673,25 +741,23 @@ namespace PokemonGo.RocketBot.Logic.Tasks
}
var locationsToSnipe = SnipeLocations?.Where(q =>
(!session.LogicSettings.UseTransferIvForSnipe ||
- (q.IV == 0 && !session.LogicSettings.SnipeIgnoreUnknownIv) ||
- (q.IV >= session.Inventory.GetPokemonTransferFilter(q.Id).KeepMinIvPercentage)) &&
+ (q.IV == 0 && !session.LogicSettings.SnipeIgnoreUnknownIv) ||
+ (q.IV >= session.Inventory.GetPokemonTransferFilter(q.Id).KeepMinIvPercentage)) &&
!LocsVisited.Contains(new PokemonLocation(q.Latitude, q.Longitude))
&& !(q.ExpirationTimestamp != default(DateTime) &&
- q.ExpirationTimestamp > new DateTime(2016) &&
- // make absolutely sure that the server sent a correct datetime
- q.ExpirationTimestamp < DateTime.Now) &&
+ q.ExpirationTimestamp > new DateTime(2016) &&
+ // make absolutely sure that the server sent a correct datetime
+ q.ExpirationTimestamp < DateTime.Now) &&
(q.Id == PokemonId.Missingno || pokemonIds.Contains(q.Id))).ToList() ??
- new List<SniperInfo>();
+ new List<SniperInfo>();
return locationsToSnipe.OrderBy(q => q.ExpirationTimestamp).ToList();
}
- else
- return new List<SniperInfo>();
+ return new List<SniperInfo>();
}
private static List<SniperInfo> GetSniperInfoFrom_pokewatchers(ISession session, List<PokemonId> pokemonIds)
{
-
var uri = $"http://pokewatchers.com/api.php?act=grab";
ScanResult_pokewatchers scanResult_pokewatchers;
@@ -703,14 +769,19 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var client = new HttpClient(handler);
// Use the HttpClient as usual. Any JS challenge will be solved automatically for you.
- var fullresp = "{ \"pokemons\":" + client.GetStringAsync(uri).Result.Replace(" M", "Male").Replace(" F", "Female").Replace("Farfetch'd", "Farfetchd").Replace("Mr.Maleime", "MrMime") +"}";
+ var fullresp = "{ \"pokemons\":" +
+ client.GetStringAsync(uri)
+ .Result.Replace(" M", "Male")
+ .Replace(" F", "Female")
+ .Replace("Farfetch'd", "Farfetchd")
+ .Replace("Mr.Maleime", "MrMime") + "}";
scanResult_pokewatchers = JsonConvert.DeserializeObject<ScanResult_pokewatchers>(fullresp);
}
catch (Exception ex)
{
// most likely System.IO.IOException
- session.EventDispatcher.Send(new ErrorEvent { Message = "(PokeWatchers.com) " + ex.Message });
+ session.EventDispatcher.Send(new ErrorEvent {Message = "(PokeWatchers.com) " + ex.Message});
return new List<SniperInfo>();
}
if (scanResult_pokewatchers.pokemons != null)
@@ -721,11 +792,15 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
var SnipInfo = new SniperInfo();
SnipInfo.Id = pokemon.pokemon;
- string[] coordsArray = pokemon.cords.Split(',');
+ var coordsArray = pokemon.cords.Split(',');
SnipInfo.Latitude = Convert.ToDouble(coordsArray[0], CultureInfo.InvariantCulture);
SnipInfo.Longitude = Convert.ToDouble(coordsArray[1], CultureInfo.InvariantCulture);
- SnipInfo.TimeStampAdded = new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(Math.Round(pokemon.timeadded / 1000d)).ToLocalTime();
- SnipInfo.ExpirationTimestamp = new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(Math.Round(pokemon.timeend / 1000d)).ToLocalTime();
+ SnipInfo.TimeStampAdded =
+ new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(Math.Round(pokemon.timeadded/1000d))
+ .ToLocalTime();
+ SnipInfo.ExpirationTimestamp =
+ new DateTime(1970, 1, 1, 0, 0, 0, 0).AddSeconds(Math.Round(pokemon.timeend/1000d))
+ .ToLocalTime();
SnipeLocations.Add(SnipInfo);
}
catch
@@ -734,20 +809,19 @@ namespace PokemonGo.RocketBot.Logic.Tasks
}
var locationsToSnipe = SnipeLocations?.Where(q =>
(!session.LogicSettings.UseTransferIvForSnipe ||
- (q.IV == 0 && !session.LogicSettings.SnipeIgnoreUnknownIv) ||
- (q.IV >= session.Inventory.GetPokemonTransferFilter(q.Id).KeepMinIvPercentage)) &&
+ (q.IV == 0 && !session.LogicSettings.SnipeIgnoreUnknownIv) ||
+ (q.IV >= session.Inventory.GetPokemonTransferFilter(q.Id).KeepMinIvPercentage)) &&
!LocsVisited.Contains(new PokemonLocation(q.Latitude, q.Longitude))
&& !(q.ExpirationTimestamp != default(DateTime) &&
- q.ExpirationTimestamp > new DateTime(2016) &&
- // make absolutely sure that the server sent a correct datetime
- q.ExpirationTimestamp < DateTime.Now) &&
+ q.ExpirationTimestamp > new DateTime(2016) &&
+ // make absolutely sure that the server sent a correct datetime
+ q.ExpirationTimestamp < DateTime.Now) &&
(q.Id == PokemonId.Missingno || pokemonIds.Contains(q.Id))).ToList() ??
- new List<SniperInfo>();
+ new List<SniperInfo>();
return locationsToSnipe.OrderBy(q => q.ExpirationTimestamp).ToList();
}
- else
- return new List<SniperInfo>();
+ return new List<SniperInfo>();
}
public static async Task Start(Session session, CancellationToken cancellationToken)
@@ -784,9 +858,12 @@ namespace PokemonGo.RocketBot.Logic.Tasks
SnipeLocations.RemoveAll(x => DateTime.Now > x.TimeStampAdded.AddMinutes(15));
SnipeLocations.Add(info);
}
- catch (System.IO.IOException)
+ catch (IOException)
{
- session.EventDispatcher.Send(new ErrorEvent {Message = "The connection to the sniping location server was lost."});
+ session.EventDispatcher.Send(new ErrorEvent
+ {
+ Message = "The connection to the sniping location server was lost."
+ });
}
}
}
@@ -797,10 +874,10 @@ namespace PokemonGo.RocketBot.Logic.Tasks
catch (Exception ex)
{
// most likely System.IO.IOException
- session.EventDispatcher.Send(new ErrorEvent { Message = ex.ToString() });
+ session.EventDispatcher.Send(new ErrorEvent {Message = ex.ToString()});
}
await Task.Delay(100, cancellationToken);
}
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Tasks/TransferDuplicatePokemonTask.cs b/PokemonGo.RocketBot.Logic/Tasks/TransferDuplicatePokemonTask.cs
index db228ff..996470c 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/TransferDuplicatePokemonTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/TransferDuplicatePokemonTask.cs
@@ -7,7 +7,6 @@ using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.PoGoUtils;
using PokemonGo.RocketBot.Logic.State;
using PokemonGo.RocketBot.Logic.Utils;
-using POGOProtos.Data;
#endregion
@@ -23,11 +22,11 @@ namespace PokemonGo.RocketBot.Logic.Tasks
await
session.Inventory.GetDuplicatePokemonToTransfer(
session.LogicSettings.PokemonsNotToTransfer,
- session.LogicSettings.PokemonsToEvolve,
+ session.LogicSettings.PokemonsToEvolve,
session.LogicSettings.KeepPokemonsThatCanEvolve,
session.LogicSettings.PrioritizeIvOverCp);
- var orderedPokemon = duplicatePokemons.OrderBy( poke => poke.Cp );
+ var orderedPokemon = duplicatePokemons.OrderBy(poke => poke.Cp);
var pokemonSettings = await session.Inventory.GetPokemonSettings();
var pokemonFamilies = await session.Inventory.GetPokemonFamilies();
diff --git a/PokemonGo.RocketBot.Logic/Tasks/TransferPokemonTask.cs b/PokemonGo.RocketBot.Logic/Tasks/TransferPokemonTask.cs
index cfc4957..0a3e8b0 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/TransferPokemonTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/TransferPokemonTask.cs
@@ -2,6 +2,8 @@
using System.Linq;
using System.Threading.Tasks;
+using PokemonGo.RocketBot.Logic.Event;
+using PokemonGo.RocketBot.Logic.PoGoUtils;
using PokemonGo.RocketBot.Logic.State;
using PokemonGo.RocketBot.Logic.Utils;
@@ -35,13 +37,13 @@ namespace PokemonGo.RocketBot.Logic.Tasks
family.Candy_++;
// Broadcast event as everyone would benefit
- session.EventDispatcher.Send(new Logic.Event.TransferPokemonEvent
+ session.EventDispatcher.Send(new TransferPokemonEvent
{
Id = pokemon.PokemonId,
- Perfection = Logic.PoGoUtils.PokemonInfo.CalculatePokemonPerfection(pokemon),
+ Perfection = PokemonInfo.CalculatePokemonPerfection(pokemon),
Cp = pokemon.Cp,
BestCp = bestPokemonOfType.Cp,
- BestPerfection = Logic.PoGoUtils.PokemonInfo.CalculatePokemonPerfection(bestPokemonOfType),
+ BestPerfection = PokemonInfo.CalculatePokemonPerfection(bestPokemonOfType),
FamilyCandies = family.Candy_
});
diff --git a/PokemonGo.RocketBot.Logic/Tasks/TransferWeakPokemonTask.cs b/PokemonGo.RocketBot.Logic/Tasks/TransferWeakPokemonTask.cs
index 99d901c..9142885 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/TransferWeakPokemonTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/TransferWeakPokemonTask.cs
@@ -7,8 +7,8 @@ using System.Threading.Tasks;
using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.PoGoUtils;
using PokemonGo.RocketBot.Logic.State;
-using POGOProtos.Data;
using PokemonGo.RocketBot.Logic.Utils;
+using POGOProtos.Data;
#endregion
@@ -24,22 +24,23 @@ namespace PokemonGo.RocketBot.Logic.Tasks
var pokemonDatas = pokemons as IList<PokemonData> ?? pokemons.ToList();
var pokemonsFiltered =
pokemonDatas.Where(pokemon => !session.LogicSettings.PokemonsNotToTransfer.Contains(pokemon.PokemonId))
- .ToList().OrderBy( poke => poke.Cp );
+ .ToList().OrderBy(poke => poke.Cp);
if (session.LogicSettings.KeepPokemonsThatCanEvolve)
pokemonsFiltered =
pokemonDatas.Where(pokemon => !session.LogicSettings.PokemonsToEvolve.Contains(pokemon.PokemonId))
- .ToList().OrderBy( poke => poke.Cp );
+ .ToList().OrderBy(poke => poke.Cp);
- var orderedPokemon = pokemonsFiltered.OrderBy( poke => poke.Cp );
+ var orderedPokemon = pokemonsFiltered.OrderBy(poke => poke.Cp);
- foreach (var pokemon in orderedPokemon )
+ foreach (var pokemon in orderedPokemon)
{
cancellationToken.ThrowIfCancellationRequested();
if ((pokemon.Cp >= session.LogicSettings.KeepMinCp) ||
(PokemonInfo.CalculatePokemonPerfection(pokemon) >= session.LogicSettings.KeepMinIvPercentage &&
session.LogicSettings.PrioritizeIvOverCp) ||
- (PokemonInfo.GetLevel(pokemon) >= session.LogicSettings.KeepMinLvl && session.LogicSettings.UseKeepMinLvl) ||
+ (PokemonInfo.GetLevel(pokemon) >= session.LogicSettings.KeepMinLvl &&
+ session.LogicSettings.UseKeepMinLvl) ||
pokemon.Favorite == 1)
continue;
diff --git a/PokemonGo.RocketBot.Logic/Tasks/UseIncenseConstantlyTask.cs b/PokemonGo.RocketBot.Logic/Tasks/UseIncenseConstantlyTask.cs
index 64656ef..1de7609 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/UseIncenseConstantlyTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/UseIncenseConstantlyTask.cs
@@ -1,14 +1,14 @@
using System.Threading;
using System.Threading.Tasks;
-using POGOProtos.Inventory.Item;
using PokemonGo.RocketBot.Logic.Common;
using PokemonGo.RocketBot.Logic.Logging;
-using POGOProtos.Networking.Responses;
using PokemonGo.RocketBot.Logic.State;
+using POGOProtos.Inventory.Item;
+using POGOProtos.Networking.Responses;
namespace PokemonGo.RocketBot.Logic.Tasks
{
- class UseIncenseConstantlyTask
+ internal class UseIncenseConstantlyTask
{
public static async Task Execute(ISession session, CancellationToken cancellationToken)
{
@@ -21,10 +21,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
Logger.Write(session.Translation.GetTranslation(TranslationString.NoIncenseAvailable));
return;
}
- else
- {
- Logger.Write(session.Translation.GetTranslation(TranslationString.UseIncenseAmount, currentAmountOfIncense));
- }
+ Logger.Write(session.Translation.GetTranslation(TranslationString.UseIncenseAmount, currentAmountOfIncense));
var UseIncense = await session.Inventory.UseIncenseConstantly();
@@ -36,10 +33,11 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
Logger.Write(session.Translation.GetTranslation(TranslationString.NoIncenseAvailable));
}
- else if (UseIncense.Result == UseIncenseResponse.Types.Result.IncenseAlreadyActive || (UseIncense.AppliedIncense == null))
+ else if (UseIncense.Result == UseIncenseResponse.Types.Result.IncenseAlreadyActive ||
+ (UseIncense.AppliedIncense == null))
{
Logger.Write(session.Translation.GetTranslation(TranslationString.UseIncenseActive));
}
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Tasks/UseIncubatorsTask.cs b/PokemonGo.RocketBot.Logic/Tasks/UseIncubatorsTask.cs
index 6cd6ec9..8cb9021 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/UseIncubatorsTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/UseIncubatorsTask.cs
@@ -74,7 +74,7 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
// Unlimited incubators prefer short eggs, limited incubators prefer long eggs
// Special case: If only one incubator is available at all, it will prefer long eggs
- var egg = (incubator.ItemId == ItemId.ItemIncubatorBasicUnlimited && incubators.Count > 1)
+ var egg = incubator.ItemId == ItemId.ItemIncubatorBasicUnlimited && incubators.Count > 1
? unusedEggs.FirstOrDefault()
: unusedEggs.LastOrDefault();
diff --git a/PokemonGo.RocketBot.Logic/Tasks/UseLuckyEggConstantlyTask.cs b/PokemonGo.RocketBot.Logic/Tasks/UseLuckyEggConstantlyTask.cs
index 12758ff..426f4bb 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/UseLuckyEggConstantlyTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/UseLuckyEggConstantlyTask.cs
@@ -1,14 +1,14 @@
using System.Threading;
using System.Threading.Tasks;
+using PokemonGo.RocketBot.Logic.Common;
+using PokemonGo.RocketBot.Logic.Logging;
using PokemonGo.RocketBot.Logic.State;
using POGOProtos.Inventory.Item;
-using PokemonGo.RocketBot.Logic.Logging;
-using PokemonGo.RocketBot.Logic.Common;
using POGOProtos.Networking.Responses;
namespace PokemonGo.RocketBot.Logic.Tasks
{
- class UseLuckyEggConstantlyTask
+ internal class UseLuckyEggConstantlyTask
{
public static async Task Execute(ISession session, CancellationToken cancellationToken)
{
@@ -21,10 +21,8 @@ namespace PokemonGo.RocketBot.Logic.Tasks
Logger.Write(session.Translation.GetTranslation(TranslationString.NoEggsAvailable));
return;
}
- else
- {
- Logger.Write(session.Translation.GetTranslation(TranslationString.UseLuckyEggAmount, currentAmountOfLuckyEggs));
- }
+ Logger.Write(session.Translation.GetTranslation(TranslationString.UseLuckyEggAmount,
+ currentAmountOfLuckyEggs));
var UseEgg = await session.Inventory.UseLuckyEggConstantly();
@@ -36,11 +34,11 @@ namespace PokemonGo.RocketBot.Logic.Tasks
{
Logger.Write(session.Translation.GetTranslation(TranslationString.NoEggsAvailable));
}
- else if (UseEgg.Result == UseItemXpBoostResponse.Types.Result.ErrorXpBoostAlreadyActive || (UseEgg.AppliedItems == null))
+ else if (UseEgg.Result == UseItemXpBoostResponse.Types.Result.ErrorXpBoostAlreadyActive ||
+ (UseEgg.AppliedItems == null))
{
Logger.Write(session.Translation.GetTranslation(TranslationString.UseLuckyEggActive));
}
}
-
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Tasks/UseNearbyPokestopsTask.cs b/PokemonGo.RocketBot.Logic/Tasks/UseNearbyPokestopsTask.cs
index 2019e80..1c3a563 100644
--- a/PokemonGo.RocketBot.Logic/Tasks/UseNearbyPokestopsTask.cs
+++ b/PokemonGo.RocketBot.Logic/Tasks/UseNearbyPokestopsTask.cs
@@ -5,10 +5,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using PokemonGo.RocketAPI.Extensions;
using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.State;
using PokemonGo.RocketBot.Logic.Utils;
-using PokemonGo.RocketAPI.Extensions;
using POGOProtos.Map.Fort;
#endregion
diff --git a/PokemonGo.RocketBot.Logic/Utils/DeviceInfoHelper.cs b/PokemonGo.RocketBot.Logic/Utils/DeviceInfoHelper.cs
index 019bbf3..17a374c 100644
--- a/PokemonGo.RocketBot.Logic/Utils/DeviceInfoHelper.cs
+++ b/PokemonGo.RocketBot.Logic/Utils/DeviceInfoHelper.cs
@@ -1,483 +1,512 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Collections.Generic;
namespace PokemonGo.RocketBot.Logic.Utils
{
public static class DeviceInfoHelper
{
- public static Dictionary<string, Dictionary<string, string>> DeviceInfoSets = new Dictionary<string, Dictionary<string, string>>() {
- { "lg-optimus-g",
- new Dictionary<string,string>()
+ public static Dictionary<string, Dictionary<string, string>> DeviceInfoSets = new Dictionary
+ <string, Dictionary<string, string>>
+ {
+ {
+ "lg-optimus-g",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "geehrc" },
- { "AndroidBootloader", "MAKOZ10f" },
- { "DeviceBrand", "LGE" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "LG-LS970" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "cm_ls970" },
- { "FirmwareBrand", "cm_ls970" },
- { "FirmwareFingerprint", "google/occam/mako:4.2.2/JDQ39/573038:user/release-keys" },
- { "FirmwareTags", "test-keys" },
- { "FirmwareType", "userdebug" },
- { "HardwareManufacturer", "LGE" },
- { "HardwareModel", "LG-LS970" }
+ {"AndroidBoardName", "geehrc"},
+ {"AndroidBootloader", "MAKOZ10f"},
+ {"DeviceBrand", "LGE"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "LG-LS970"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "cm_ls970"},
+ {"FirmwareBrand", "cm_ls970"},
+ {"FirmwareFingerprint", "google/occam/mako:4.2.2/JDQ39/573038:user/release-keys"},
+ {"FirmwareTags", "test-keys"},
+ {"FirmwareType", "userdebug"},
+ {"HardwareManufacturer", "LGE"},
+ {"HardwareModel", "LG-LS970"}
}
},
- { "nexus7gen2",
- new Dictionary<string, string>()
+ {
+ "nexus7gen2",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "flo" },
- { "AndroidBootloader", "FLO-04.07" },
- { "DeviceBrand", "google" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "Nexus 7" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "razor" },
- { "FirmwareBrand", "razor" },
- { "FirmwareFingerprint", "google/razor/flo:6.0.1/MOB30P/2960889:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "asus" },
- { "HardwareModel", "Nexus 7" }
+ {"AndroidBoardName", "flo"},
+ {"AndroidBootloader", "FLO-04.07"},
+ {"DeviceBrand", "google"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "Nexus 7"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "razor"},
+ {"FirmwareBrand", "razor"},
+ {"FirmwareFingerprint", "google/razor/flo:6.0.1/MOB30P/2960889:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "asus"},
+ {"HardwareModel", "Nexus 7"}
}
},
- { "nexus7gen1",
- new Dictionary<string, string>()
+ {
+ "nexus7gen1",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "grouper" },
- { "AndroidBootloader", "4.23" },
- { "DeviceBrand", "google" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "Nexus 7" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "nakasi" },
- { "FirmwareBrand", "nakasi" },
- { "FirmwareFingerprint", "google/nakasi/grouper:5.1.1/LMY47V/1836172:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "asus" },
- { "HardwareModel", "Nexus 7" }
+ {"AndroidBoardName", "grouper"},
+ {"AndroidBootloader", "4.23"},
+ {"DeviceBrand", "google"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "Nexus 7"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "nakasi"},
+ {"FirmwareBrand", "nakasi"},
+ {"FirmwareFingerprint", "google/nakasi/grouper:5.1.1/LMY47V/1836172:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "asus"},
+ {"HardwareModel", "Nexus 7"}
}
},
- { "htc10",
- new Dictionary<string, string>()
+ {
+ "htc10",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "msm8996" },
- { "AndroidBootloader", "1.0.0.0000" },
- { "DeviceBrand", "HTC" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "HTC 10" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "pmewl_00531" },
- { "FirmwareBrand", "pmewl_00531" },
- { "FirmwareFingerprint", "htc/pmewl_00531/htc_pmewl:6.0.1/MMB29M/770927.1:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "HTC" },
- { "HardwareModel", "HTC 10" }
+ {"AndroidBoardName", "msm8996"},
+ {"AndroidBootloader", "1.0.0.0000"},
+ {"DeviceBrand", "HTC"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "HTC 10"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "pmewl_00531"},
+ {"FirmwareBrand", "pmewl_00531"},
+ {"FirmwareFingerprint", "htc/pmewl_00531/htc_pmewl:6.0.1/MMB29M/770927.1:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "HTC"},
+ {"HardwareModel", "HTC 10"}
}
},
- { "galaxy6",
- new Dictionary<string, string>()
+ {
+ "galaxy6",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "universal7420" },
- { "AndroidBootloader", "G920FXXU3DPEK" },
- { "DeviceBrand", "samsung" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "zeroflte" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "SM-G920F" },
- { "FirmwareBrand", "zerofltexx" },
- { "FirmwareFingerprint", "samsung/zerofltexx/zeroflte:6.0.1/MMB29K/G920FXXU3DPEK:user/release-keys" },
- { "FirmwareTags", "dev-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "samsung" },
- { "HardwareModel", "samsungexynos7420" }
+ {"AndroidBoardName", "universal7420"},
+ {"AndroidBootloader", "G920FXXU3DPEK"},
+ {"DeviceBrand", "samsung"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "zeroflte"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "SM-G920F"},
+ {"FirmwareBrand", "zerofltexx"},
+ {"FirmwareFingerprint", "samsung/zerofltexx/zeroflte:6.0.1/MMB29K/G920FXXU3DPEK:user/release-keys"},
+ {"FirmwareTags", "dev-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "samsung"},
+ {"HardwareModel", "samsungexynos7420"}
}
},
- { "galaxy-s5-gold",
- new Dictionary<string, string>()
+ {
+ "galaxy-s5-gold",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "MSM8974" },
- { "AndroidBootloader", "G900FXXU1CPEH" },
- { "DeviceBrand", "samsung" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "SM-G900F" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "kltexx" },
- { "FirmwareBrand", "kltexx" },
- { "FirmwareFingerprint", "samsung/kltexx/klte:6.0.1/MMB29M/G900FXXU1CPEH:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "samsung" },
- { "HardwareModel", "SM-G900F" }
+ {"AndroidBoardName", "MSM8974"},
+ {"AndroidBootloader", "G900FXXU1CPEH"},
+ {"DeviceBrand", "samsung"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "SM-G900F"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "kltexx"},
+ {"FirmwareBrand", "kltexx"},
+ {"FirmwareFingerprint", "samsung/kltexx/klte:6.0.1/MMB29M/G900FXXU1CPEH:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "samsung"},
+ {"HardwareModel", "SM-G900F"}
}
},
- { "lg-optimus-f6",
- new Dictionary<string, string>()
+ {
+ "lg-optimus-f6",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "f6t" },
- { "AndroidBootloader", "1.0.0.0000" },
- { "DeviceBrand", "lge" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "LG-D500" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "f6_tmo_us" },
- { "FirmwareBrand", "f6_tmo_us" },
- { "FirmwareFingerprint", "lge/f6_tmo_us/f6:4.1.2/JZO54K/D50010h.1384764249:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "LGE" },
- { "HardwareModel", "LG-D500" }
+ {"AndroidBoardName", "f6t"},
+ {"AndroidBootloader", "1.0.0.0000"},
+ {"DeviceBrand", "lge"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "LG-D500"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "f6_tmo_us"},
+ {"FirmwareBrand", "f6_tmo_us"},
+ {"FirmwareFingerprint", "lge/f6_tmo_us/f6:4.1.2/JZO54K/D50010h.1384764249:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "LGE"},
+ {"HardwareModel", "LG-D500"}
}
},
- { "nexus-5x",
- new Dictionary<string, string>()
+ {
+ "nexus-5x",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "bullhead" },
- { "AndroidBootloader", "BHZ10k" },
- { "DeviceBrand", "google" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "Nexus 5X" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "bullhead" },
- { "FirmwareBrand", "bullhead" },
- { "FirmwareFingerprint", "google/bullhead/bullhead:6.0.1/MTC19T/2741993:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "LGE" },
- { "HardwareModel", "Nexus 5X" }
+ {"AndroidBoardName", "bullhead"},
+ {"AndroidBootloader", "BHZ10k"},
+ {"DeviceBrand", "google"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "Nexus 5X"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "bullhead"},
+ {"FirmwareBrand", "bullhead"},
+ {"FirmwareFingerprint", "google/bullhead/bullhead:6.0.1/MTC19T/2741993:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "LGE"},
+ {"HardwareModel", "Nexus 5X"}
}
},
- { "galaxy-s7-edge",
- new Dictionary<string, string>()
+ {
+ "galaxy-s7-edge",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "msm8996" },
- { "AndroidBootloader", "G935TUVU3APG1" },
- { "DeviceBrand", "samsung" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "SM-G935T" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "hero2qltetmo" },
- { "FirmwareBrand", "hero2qltetmo" },
- { "FirmwareFingerprint", "samsung/hero2qltetmo/hero2qltetmo:6.0.1/MMB29M/G935TUVU3APG1:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "samsung" },
- { "HardwareModel", "SM-G935T" }
+ {"AndroidBoardName", "msm8996"},
+ {"AndroidBootloader", "G935TUVU3APG1"},
+ {"DeviceBrand", "samsung"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "SM-G935T"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "hero2qltetmo"},
+ {"FirmwareBrand", "hero2qltetmo"},
+ {
+ "FirmwareFingerprint",
+ "samsung/hero2qltetmo/hero2qltetmo:6.0.1/MMB29M/G935TUVU3APG1:user/release-keys"
+ },
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "samsung"},
+ {"HardwareModel", "SM-G935T"}
}
},
- { "asus-zenfone2",
- new Dictionary<string, string>()
+ {
+ "asus-zenfone2",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "moorefield" },
- { "AndroidBootloader", "" },
- { "DeviceBrand", "asus" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "ASUS_Z00AD" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "WW_Z00A" },
- { "FirmwareBrand", "WW_Z00A" },
- { "FirmwareFingerprint", "asus/WW_Z00A/Z00A_1:5.0/LRX21V/2.20.40.194_20160713_6971_user:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "asus" },
- { "HardwareModel", "ASUS_Z00AD" }
+ {"AndroidBoardName", "moorefield"},
+ {"AndroidBootloader", ""},
+ {"DeviceBrand", "asus"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "ASUS_Z00AD"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "WW_Z00A"},
+ {"FirmwareBrand", "WW_Z00A"},
+ {
+ "FirmwareFingerprint",
+ "asus/WW_Z00A/Z00A_1:5.0/LRX21V/2.20.40.194_20160713_6971_user:user/release-keys"
+ },
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "asus"},
+ {"HardwareModel", "ASUS_Z00AD"}
}
},
- { "xperia-z5",
- new Dictionary<string, string>()
+ {
+ "xperia-z5",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "msm8994" },
- { "AndroidBootloader", "s1" },
- { "DeviceBrand", "Sony" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "E6653" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "E6653" },
- { "FirmwareBrand", "E6653" },
- { "FirmwareFingerprint", "Sony/E6653/E6653:6.0.1/32.2.A.0.224/456768306:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "Sony" },
- { "HardwareModel", "E6653" }
+ {"AndroidBoardName", "msm8994"},
+ {"AndroidBootloader", "s1"},
+ {"DeviceBrand", "Sony"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "E6653"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "E6653"},
+ {"FirmwareBrand", "E6653"},
+ {"FirmwareFingerprint", "Sony/E6653/E6653:6.0.1/32.2.A.0.224/456768306:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "Sony"},
+ {"HardwareModel", "E6653"}
}
},
- { "galaxy-s4",
- new Dictionary<string, string>()
+ {
+ "galaxy-s4",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "MSM8960" },
- { "AndroidBootloader", "I337MVLUGOH1" },
- { "DeviceBrand", "samsung" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "SGH-I337M" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "jfltevl" },
- { "FirmwareBrand", "jfltevl" },
- { "FirmwareFingerprint", "samsung/jfltevl/jfltecan:5.0.1/LRX22C/I337MVLUGOH1:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "samsung" },
- { "HardwareModel", "SGH-I337M" }
+ {"AndroidBoardName", "MSM8960"},
+ {"AndroidBootloader", "I337MVLUGOH1"},
+ {"DeviceBrand", "samsung"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "SGH-I337M"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "jfltevl"},
+ {"FirmwareBrand", "jfltevl"},
+ {"FirmwareFingerprint", "samsung/jfltevl/jfltecan:5.0.1/LRX22C/I337MVLUGOH1:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "samsung"},
+ {"HardwareModel", "SGH-I337M"}
}
},
- { "nexus-6p",
- new Dictionary<string, string>()
+ {
+ "nexus-6p",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "angler" },
- { "AndroidBootloader", "angler-03.52" },
- { "DeviceBrand", "google" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "Nexus 6P" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "angler" },
- { "FirmwareBrand", "angler" },
- { "FirmwareFingerprint", "google/angler/angler:6.0.1/MTC19X/2960136:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "Huawei" },
- { "HardwareModel", "Nexus 6P" }
+ {"AndroidBoardName", "angler"},
+ {"AndroidBootloader", "angler-03.52"},
+ {"DeviceBrand", "google"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "Nexus 6P"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "angler"},
+ {"FirmwareBrand", "angler"},
+ {"FirmwareFingerprint", "google/angler/angler:6.0.1/MTC19X/2960136:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "Huawei"},
+ {"HardwareModel", "Nexus 6P"}
}
},
- { "sony-z3-compact",
- new Dictionary<string, string>()
+ {
+ "sony-z3-compact",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "MSM8974" },
- { "AndroidBootloader", "s1" },
- { "DeviceBrand", "docomo" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "SO-02G" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "SO-02G" },
- { "FirmwareBrand", "SO-02G" },
- { "FirmwareFingerprint", "docomo/SO-02G/SO-02G:5.0.2/23.1.B.1.317/2161656255:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "Sony" },
- { "HardwareModel", "SO-02G" }
+ {"AndroidBoardName", "MSM8974"},
+ {"AndroidBootloader", "s1"},
+ {"DeviceBrand", "docomo"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "SO-02G"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "SO-02G"},
+ {"FirmwareBrand", "SO-02G"},
+ {"FirmwareFingerprint", "docomo/SO-02G/SO-02G:5.0.2/23.1.B.1.317/2161656255:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "Sony"},
+ {"HardwareModel", "SO-02G"}
}
},
- { "lg-v10",
- new Dictionary<string, string>()
+ {
+ "lg-v10",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "MSM8992" },
- { "AndroidBootloader", "" },
- { "DeviceBrand", "LG" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "V10" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "pplus" },
- { "FirmwareBrand", "pplus" },
- { "FirmwareFingerprint", "LG/pplus/pplus:5.1.1/LYZ28J/kasp3rd02071120:eng/test-keys" },
- { "FirmwareTags", "test-keys" },
- { "FirmwareType", "eng" },
- { "HardwareManufacturer", "LG" },
- { "HardwareModel", "V10" }
+ {"AndroidBoardName", "MSM8992"},
+ {"AndroidBootloader", ""},
+ {"DeviceBrand", "LG"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "V10"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "pplus"},
+ {"FirmwareBrand", "pplus"},
+ {"FirmwareFingerprint", "LG/pplus/pplus:5.1.1/LYZ28J/kasp3rd02071120:eng/test-keys"},
+ {"FirmwareTags", "test-keys"},
+ {"FirmwareType", "eng"},
+ {"HardwareManufacturer", "LG"},
+ {"HardwareModel", "V10"}
}
},
- { "galaxy-tab3",
- new Dictionary<string, string>()
+ {
+ "galaxy-tab3",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "smdk4x12" },
- { "AndroidBootloader", "T310UEUCOI1" },
- { "DeviceBrand", "samsung" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "SM-T310" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "lt01wifiue" },
- { "FirmwareBrand", "lt01wifiue" },
- { "FirmwareFingerprint", "samsung/lt01wifiue/lt01wifi:4.4.2/KOT49H/T310UEUCOI1:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "samsung" },
- { "HardwareModel", "SM-T310" }
+ {"AndroidBoardName", "smdk4x12"},
+ {"AndroidBootloader", "T310UEUCOI1"},
+ {"DeviceBrand", "samsung"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "SM-T310"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "lt01wifiue"},
+ {"FirmwareBrand", "lt01wifiue"},
+ {"FirmwareFingerprint", "samsung/lt01wifiue/lt01wifi:4.4.2/KOT49H/T310UEUCOI1:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "samsung"},
+ {"HardwareModel", "SM-T310"}
}
},
- { "lg-g4",
- new Dictionary<string, string>()
+ {
+ "lg-g4",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "msm8992" },
- { "AndroidBootloader", "" },
- { "DeviceBrand", "lge" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "VS986" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "p1_vzw" },
- { "FirmwareBrand", "p1_vzw" },
- { "FirmwareFingerprint", "lge/p1_vzw/p1:5.1/LMY47D/151541507ff1b:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "LGE" },
- { "HardwareModel", "VS986" }
+ {"AndroidBoardName", "msm8992"},
+ {"AndroidBootloader", ""},
+ {"DeviceBrand", "lge"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "VS986"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "p1_vzw"},
+ {"FirmwareBrand", "p1_vzw"},
+ {"FirmwareFingerprint", "lge/p1_vzw/p1:5.1/LMY47D/151541507ff1b:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "LGE"},
+ {"HardwareModel", "VS986"}
}
},
- { "nexus5",
- new Dictionary<string, string>()
+ {
+ "nexus5",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "hammerhead" },
- { "AndroidBootloader", "HHZ20b" },
- { "DeviceBrand", "google" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "Nexus 5" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "hammerhead" },
- { "FirmwareBrand", "hammerhead" },
- { "FirmwareFingerprint", "google/hammerhead/hammerhead:6.0.1/MOB30M/2862625:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "LGE" },
- { "HardwareModel", "Nexus 5" }
+ {"AndroidBoardName", "hammerhead"},
+ {"AndroidBootloader", "HHZ20b"},
+ {"DeviceBrand", "google"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "Nexus 5"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "hammerhead"},
+ {"FirmwareBrand", "hammerhead"},
+ {"FirmwareFingerprint", "google/hammerhead/hammerhead:6.0.1/MOB30M/2862625:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "LGE"},
+ {"HardwareModel", "Nexus 5"}
}
},
- { "xoom",
- new Dictionary<string, string>()
+ {
+ "xoom",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "" },
- { "AndroidBootloader", "1050" },
- { "DeviceBrand", "motorola" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "Xoom" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "tervigon" },
- { "FirmwareBrand", "tervigon" },
- { "FirmwareFingerprint", "motorola/tervigon/wingray:4.1.2/JZO54K/485486:user/release-keys" },
- { "FirmwareTags", "test-keys" },
- { "FirmwareType", "userdebug" },
- { "HardwareManufacturer", "Motorola" },
- { "HardwareModel", "Xoom" }
+ {"AndroidBoardName", ""},
+ {"AndroidBootloader", "1050"},
+ {"DeviceBrand", "motorola"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "Xoom"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "tervigon"},
+ {"FirmwareBrand", "tervigon"},
+ {"FirmwareFingerprint", "motorola/tervigon/wingray:4.1.2/JZO54K/485486:user/release-keys"},
+ {"FirmwareTags", "test-keys"},
+ {"FirmwareType", "userdebug"},
+ {"HardwareManufacturer", "Motorola"},
+ {"HardwareModel", "Xoom"}
}
},
- { "galaxy-note-edge",
- new Dictionary<string, string>()
+ {
+ "galaxy-note-edge",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "APQ8084" },
- { "AndroidBootloader", "N915W8VLU1CPE2" },
- { "DeviceBrand", "samsung" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "SM-N915W8" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "tbltecan" },
- { "FirmwareBrand", "tbltecan" },
- { "FirmwareFingerprint", "samsung/tbltecan/tbltecan:6.0.1/MMB29M/N915W8VLU1CPE2:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "samsung" },
- { "HardwareModel", "SM-N915W8" }
+ {"AndroidBoardName", "APQ8084"},
+ {"AndroidBootloader", "N915W8VLU1CPE2"},
+ {"DeviceBrand", "samsung"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "SM-N915W8"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "tbltecan"},
+ {"FirmwareBrand", "tbltecan"},
+ {"FirmwareFingerprint", "samsung/tbltecan/tbltecan:6.0.1/MMB29M/N915W8VLU1CPE2:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "samsung"},
+ {"HardwareModel", "SM-N915W8"}
}
},
- { "amazon-fire-cm12",
- new Dictionary<string, string>()
+ {
+ "amazon-fire-cm12",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "ford" },
- { "AndroidBootloader", "" },
- { "DeviceBrand", "google" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "KFFOWI" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "cm_ford" },
- { "FirmwareBrand", "cm_ford" },
- { "FirmwareFingerprint", "google/cm_ford/ford:5.1.1/LMY48Y/ba503d5e70:userdebug/test-keys" },
- { "FirmwareTags", "test-keys" },
- { "FirmwareType", "userdebug" },
- { "HardwareManufacturer", "amzn" },
- { "HardwareModel", "KFFOWI" }
+ {"AndroidBoardName", "ford"},
+ {"AndroidBootloader", ""},
+ {"DeviceBrand", "google"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "KFFOWI"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "cm_ford"},
+ {"FirmwareBrand", "cm_ford"},
+ {"FirmwareFingerprint", "google/cm_ford/ford:5.1.1/LMY48Y/ba503d5e70:userdebug/test-keys"},
+ {"FirmwareTags", "test-keys"},
+ {"FirmwareType", "userdebug"},
+ {"HardwareManufacturer", "amzn"},
+ {"HardwareModel", "KFFOWI"}
}
},
- { "nexus4-chroma",
- new Dictionary<string, string>()
+ {
+ "nexus4-chroma",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "MAKO" },
- { "AndroidBootloader", "MAKOZ30f" },
- { "DeviceBrand", "google" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "Nexus 4" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "occam" },
- { "FirmwareBrand", "occam" },
- { "FirmwareFingerprint", "google/occam/mako:6.0.1/MOB30Y/3067468:user/release-keys" },
- { "FirmwareTags", "test-keys" },
- { "FirmwareType", "userdebug" },
- { "HardwareManufacturer", "LGE" },
- { "HardwareModel", "Nexus 4" }
+ {"AndroidBoardName", "MAKO"},
+ {"AndroidBootloader", "MAKOZ30f"},
+ {"DeviceBrand", "google"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "Nexus 4"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "occam"},
+ {"FirmwareBrand", "occam"},
+ {"FirmwareFingerprint", "google/occam/mako:6.0.1/MOB30Y/3067468:user/release-keys"},
+ {"FirmwareTags", "test-keys"},
+ {"FirmwareType", "userdebug"},
+ {"HardwareManufacturer", "LGE"},
+ {"HardwareModel", "Nexus 4"}
}
},
- { "melrose-s9",
- new Dictionary<string, string>()
+ {
+ "melrose-s9",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "g15" },
- { "AndroidBootloader", "" },
- { "DeviceBrand", "alps" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "MELROSE S9" },
- { "DeviceModelBoot", "mtk" },
- { "DeviceModelIdentifier", "g15" },
- { "FirmwareBrand", "g15" },
- { "FirmwareFingerprint", "alps/g15/g15:4.4.2/KOT49H/:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "alps" },
- { "HardwareModel", "MELROSE S9" }
+ {"AndroidBoardName", "g15"},
+ {"AndroidBootloader", ""},
+ {"DeviceBrand", "alps"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "MELROSE S9"},
+ {"DeviceModelBoot", "mtk"},
+ {"DeviceModelIdentifier", "g15"},
+ {"FirmwareBrand", "g15"},
+ {"FirmwareFingerprint", "alps/g15/g15:4.4.2/KOT49H/:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "alps"},
+ {"HardwareModel", "MELROSE S9"}
}
},
- { "yureka",
- new Dictionary<string, string>()
+ {
+ "yureka",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "MSM8916" },
- { "AndroidBootloader", "tomato-12-gf7e8024" },
- { "DeviceBrand", "YU" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "AO5510" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "YUREKA" },
- { "FirmwareBrand", "YUREKA" },
- { "FirmwareFingerprint", "YU/YUREKA/YUREKA:5.0.2/LRX22G/YNG1TAS1K0:user/release-keys" },
- { "FirmwareTags", "test-keys" },
- { "FirmwareType", "userdebug" },
- { "HardwareManufacturer", "YU" },
- { "HardwareModel", "AO5510" }
+ {"AndroidBoardName", "MSM8916"},
+ {"AndroidBootloader", "tomato-12-gf7e8024"},
+ {"DeviceBrand", "YU"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "AO5510"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "YUREKA"},
+ {"FirmwareBrand", "YUREKA"},
+ {"FirmwareFingerprint", "YU/YUREKA/YUREKA:5.0.2/LRX22G/YNG1TAS1K0:user/release-keys"},
+ {"FirmwareTags", "test-keys"},
+ {"FirmwareType", "userdebug"},
+ {"HardwareManufacturer", "YU"},
+ {"HardwareModel", "AO5510"}
}
},
- { "note3",
- new Dictionary<string, string>()
+ {
+ "note3",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "MSM8974" },
- { "AndroidBootloader", "N900PVPUEOK2" },
- { "DeviceBrand", "samsung" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "SM-N900P" },
- { "DeviceModelBoot", "qcom" },
- { "DeviceModelIdentifier", "cm_hltespr" },
- { "FirmwareBrand", "cm_hltespr" },
- { "FirmwareFingerprint", "samsung/hltespr/hltespr:5.0/LRX21V/N900PVPUEOH1:user/release-keys" },
- { "FirmwareTags", "test-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "samsung" },
- { "HardwareModel", "SM-N900P" }
+ {"AndroidBoardName", "MSM8974"},
+ {"AndroidBootloader", "N900PVPUEOK2"},
+ {"DeviceBrand", "samsung"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "SM-N900P"},
+ {"DeviceModelBoot", "qcom"},
+ {"DeviceModelIdentifier", "cm_hltespr"},
+ {"FirmwareBrand", "cm_hltespr"},
+ {"FirmwareFingerprint", "samsung/hltespr/hltespr:5.0/LRX21V/N900PVPUEOH1:user/release-keys"},
+ {"FirmwareTags", "test-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "samsung"},
+ {"HardwareModel", "SM-N900P"}
}
},
- { "galaxy-tab-s84",
- new Dictionary<string, string>()
+ {
+ "galaxy-tab-s84",
+ new Dictionary<string, string>
{
- { "AndroidBoardName", "universal5420" },
- { "AndroidBootloader", "T705XXU1BOL2" },
- { "DeviceBrand", "samsung" },
- { "DeviceId", "8525f5d8201f78b5" },
- { "DeviceModel", "Samsung Galaxy Tab S 8.4 LTE" },
- { "DeviceModelBoot", "universal5420" },
- { "DeviceModelIdentifier", "LRX22G.T705XXU1BOL2" },
- { "FirmwareBrand", "Samsung Galaxy Tab S 8.4 LTE" },
- { "FirmwareFingerprint", "samsung/klimtltexx/klimtlte:5.0.2/LRX22G/T705XXU1BOL2:user/release-keys" },
- { "FirmwareTags", "release-keys" },
- { "FirmwareType", "user" },
- { "HardwareManufacturer", "samsung" },
- { "HardwareModel", "SM-T705" }
+ {"AndroidBoardName", "universal5420"},
+ {"AndroidBootloader", "T705XXU1BOL2"},
+ {"DeviceBrand", "samsung"},
+ {"DeviceId", "8525f5d8201f78b5"},
+ {"DeviceModel", "Samsung Galaxy Tab S 8.4 LTE"},
+ {"DeviceModelBoot", "universal5420"},
+ {"DeviceModelIdentifier", "LRX22G.T705XXU1BOL2"},
+ {"FirmwareBrand", "Samsung Galaxy Tab S 8.4 LTE"},
+ {"FirmwareFingerprint", "samsung/klimtltexx/klimtlte:5.0.2/LRX22G/T705XXU1BOL2:user/release-keys"},
+ {"FirmwareTags", "release-keys"},
+ {"FirmwareType", "user"},
+ {"HardwareManufacturer", "samsung"},
+ {"HardwareModel", "SM-T705"}
}
- },
-
+ }
};
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Utils/ErrorHandler.cs b/PokemonGo.RocketBot.Logic/Utils/ErrorHandler.cs
index 315ae3d..7ee197f 100644
--- a/PokemonGo.RocketBot.Logic/Utils/ErrorHandler.cs
+++ b/PokemonGo.RocketBot.Logic/Utils/ErrorHandler.cs
@@ -1,38 +1,35 @@
-using PokemonGo.RocketBot.Logic.Logging;
-using System;
-using System.Collections.Generic;
+using System;
using System.Diagnostics;
-using System.Linq;
using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
+using System.Threading;
+using PokemonGo.RocketBot.Logic.Logging;
namespace PokemonGo.RocketBot.Logic.Utils
{
- class ErrorHandler
+ internal class ErrorHandler
{
/// <summary>
- /// Alerts that a fatal error has occurred, displaying a message and exiting the application
+ /// Alerts that a fatal error has occurred, displaying a message and exiting the application
/// </summary>
/// <param name="strMessage">Optional message to display - Leave NULL to exclude message</param>
/// <param name="timeout">The total seconds the messag will display before shutting down</param>
- public static void ThrowFatalError( string strMessage, int timeout, LogLevel level, bool boolRestart = false )
+ public static void ThrowFatalError(string strMessage, int timeout, LogLevel level, bool boolRestart = false)
{
- if( strMessage != null)
- Logger.Write( strMessage, level );
+ if (strMessage != null)
+ Logger.Write(strMessage, level);
- Console.Write( "Ending Application... " );
+ Console.Write("Ending Application... ");
- for( int i = timeout; i > 0; i-- )
+ for (var i = timeout; i > 0; i--)
{
- Console.Write( "\b" + i );
- System.Threading.Thread.Sleep( 1000 );
+ Console.Write("\b" + i);
+ Thread.Sleep(1000);
}
- if( boolRestart )
- Process.Start( Assembly.GetEntryAssembly().Location );
+ if (boolRestart)
+ Process.Start(Assembly.GetEntryAssembly().Location);
- Environment.Exit( -1 );
+ Environment.Exit(-1);
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Utils/LocationUtils.cs b/PokemonGo.RocketBot.Logic/Utils/LocationUtils.cs
index 0e41110..a134280 100644
--- a/PokemonGo.RocketBot.Logic/Utils/LocationUtils.cs
+++ b/PokemonGo.RocketBot.Logic/Utils/LocationUtils.cs
@@ -2,9 +2,6 @@
using System;
using GeoCoordinatePortable;
-using System.Net;
-using Newtonsoft.Json.Linq;
-using System.IO;
#endregion
@@ -30,10 +27,10 @@ namespace PokemonGo.RocketBot.Logic.Utils
public static double getElevation(double lat, double lon)
{
- Random random = new Random();
+ var random = new Random();
double maximum = 11.0f;
double minimum = 8.6f;
- double return1 = random.NextDouble() * (maximum - minimum) + minimum;
+ var return1 = random.NextDouble()*(maximum - minimum) + minimum;
return return1;
}
@@ -63,7 +60,8 @@ namespace PokemonGo.RocketBot.Logic.Utils
// adjust toLonRadians to be in the range -180 to +180...
targetLongitudeRadians = (targetLongitudeRadians + 3*Math.PI)%(2*Math.PI) - Math.PI;
- return new GeoCoordinate(ToDegrees(targetLatitudeRadians), ToDegrees(targetLongitudeRadians), getElevation(sourceLocation.Latitude, sourceLocation.Longitude));
+ return new GeoCoordinate(ToDegrees(targetLatitudeRadians), ToDegrees(targetLongitudeRadians),
+ getElevation(sourceLocation.Latitude, sourceLocation.Longitude));
}
public static GeoCoordinate CreateWaypoint(GeoCoordinate sourceLocation, double distanceInMeters,
@@ -122,4 +120,4 @@ namespace PokemonGo.RocketBot.Logic.Utils
return degrees*(Math.PI/180);
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Utils/NecroWebClient.cs b/PokemonGo.RocketBot.Logic/Utils/NecroWebClient.cs
index 23f7ad6..d74cef3 100644
--- a/PokemonGo.RocketBot.Logic/Utils/NecroWebClient.cs
+++ b/PokemonGo.RocketBot.Logic/Utils/NecroWebClient.cs
@@ -7,9 +7,9 @@ namespace PokemonGo.RocketBot.Logic.Utils
{
protected override WebRequest GetWebRequest(Uri uri)
{
- WebRequest w = base.GetWebRequest(uri);
+ var w = base.GetWebRequest(uri);
w.Timeout = 5000;
return w;
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Utils/RouteOptimizeUtil.cs b/PokemonGo.RocketBot.Logic/Utils/RouteOptimizeUtil.cs
index d9b044c..e7d0917 100644
--- a/PokemonGo.RocketBot.Logic/Utils/RouteOptimizeUtil.cs
+++ b/PokemonGo.RocketBot.Logic/Utils/RouteOptimizeUtil.cs
@@ -2,8 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using POGOProtos.Map.Fort;
-using GMap.NET.WindowsForms;
-using PokemonGo.RocketBot.Logic.Logging;
namespace PokemonGo.RocketBot.Logic.Utils
{
@@ -48,8 +46,8 @@ namespace PokemonGo.RocketBot.Logic.Utils
{
for (var ci = 0; ci < n; ci++)
{
- var bi = (ai + 1) % n;
- var di = (ci + 1) % n;
+ var bi = (ai + 1)%n;
+ var di = (ci + 1)%n;
var a = pokeStops[ai];
var b = pokeStops[bi];
@@ -79,7 +77,7 @@ namespace PokemonGo.RocketBot.Logic.Utils
List<FortData> optimizedRoute;
if (bestI > bestJ)
{
- optimizedRoute = new List<FortData> { pokeStops[0] };
+ optimizedRoute = new List<FortData> {pokeStops[0]};
optimizedRoute.AddRange(pokeStops.Skip(bestI));
optimizedRoute.Reverse(1, n - bestI);
optimizedRoute.AddRange(pokeStops.GetRange(bestJ + 1, bestI - bestJ - 1));
@@ -117,12 +115,12 @@ namespace PokemonGo.RocketBot.Logic.Utils
private static float GetDistance(double lat1, double lng1, double lat2, double lng2)
{
const double R = 6371e3;
- Func<double, float> toRad = x => (float)(x * (Math.PI / 180));
+ Func<double, float> toRad = x => (float) (x*(Math.PI/180));
lat1 = toRad(lat1);
lat2 = toRad(lat2);
var dLng = toRad(lng2 - lng1);
- return (float)(Math.Acos(Math.Sin(lat1) * Math.Sin(lat2) + Math.Cos(lat1) * Math.Cos(lat2) * Math.Cos(dLng)) * R);
+ return (float) (Math.Acos(Math.Sin(lat1)*Math.Sin(lat2) + Math.Cos(lat1)*Math.Cos(lat2)*Math.Cos(dLng))*R);
}
private static void OnRouteOptimizeEvent(List<FortData> optimizedroute)
@@ -131,7 +129,5 @@ namespace PokemonGo.RocketBot.Logic.Utils
}
public static event RouteOptimizeDelegate RouteOptimizeEvent;
-
}
-
}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Utils/Statistics.cs b/PokemonGo.RocketBot.Logic/Utils/Statistics.cs
index 368ce94..0280046 100644
--- a/PokemonGo.RocketBot.Logic/Utils/Statistics.cs
+++ b/PokemonGo.RocketBot.Logic/Utils/Statistics.cs
@@ -4,12 +4,10 @@
using System;
using System.Linq;
-using POGOProtos.Networking.Responses;
using System.Threading.Tasks;
using PokemonGo.RocketBot.Logic.Logging;
-using POGOProtos.Inventory.Item;
-using Google.Protobuf.Collections;
using PokemonGo.RocketBot.Logic.State;
+using POGOProtos.Networking.Responses;
#endregion
@@ -24,15 +22,15 @@ namespace PokemonGo.RocketBot.Logic.Utils
public class Statistics
{
private readonly DateTime _initSessionDateTime = DateTime.Now;
-
+
private StatsExport _exportStats;
private string _playerName;
+ public int LevelForRewards = -1;
public int TotalExperience;
public int TotalItemsRemoved;
public int TotalPokemons;
public int TotalPokemonTransferred;
public int TotalStardust;
- public int LevelForRewards = -1;
public void Dirty(Inventory inventory)
{
@@ -63,26 +61,26 @@ namespace PokemonGo.RocketBot.Logic.Utils
hours = Math.Truncate(TimeSpan.FromHours(time).TotalHours);
minutes = TimeSpan.FromHours(time).Minutes;
}
-
- if( LevelForRewards == -1 || stat.Level >= LevelForRewards )
+
+ if (LevelForRewards == -1 || stat.Level >= LevelForRewards)
{
- LevelUpRewardsResponse Result = Execute( inventory ).Result;
+ var Result = Execute(inventory).Result;
- if( Result.ToString().ToLower().Contains( "awarded_already" ) )
+ if (Result.ToString().ToLower().Contains("awarded_already"))
LevelForRewards = stat.Level + 1;
- if( Result.ToString().ToLower().Contains( "success" ) )
+ if (Result.ToString().ToLower().Contains("success"))
{
- Logger.Write( "Leveled up: " + stat.Level, LogLevel.Info );
+ Logger.Write("Leveled up: " + stat.Level, LogLevel.Info);
- RepeatedField<ItemAward> items = Result.ItemsAwarded;
+ var items = Result.ItemsAwarded;
- if( items.Any<ItemAward>() )
+ if (items.Any())
{
- Logger.Write( "- Received Items -", LogLevel.Info );
- foreach( ItemAward item in items )
+ Logger.Write("- Received Items -", LogLevel.Info);
+ foreach (var item in items)
{
- Logger.Write( $"[ITEM] {item.ItemId} x {item.ItemCount} ", LogLevel.Info );
+ Logger.Write($"[ITEM] {item.ItemId} x {item.ItemCount} ", LogLevel.Info);
}
}
}
@@ -91,8 +89,8 @@ namespace PokemonGo.RocketBot.Logic.Utils
LevelForRewards = stat.Level;
if (Result2.ToString().ToLower().Contains("success"))
{
- string[] tokens = Result2.Result.ToString().Split(new[] { "itemId" }, StringSplitOptions.None);
- Logging.Logger.Write("Items Awarded:" + Result2.ItemsAwarded.ToString());
+ var tokens = Result2.Result.ToString().Split(new[] {"itemId"}, StringSplitOptions.None);
+ Logger.Write("Items Awarded:" + Result2.ItemsAwarded);
}
output = new StatsExport
{
@@ -112,9 +110,9 @@ namespace PokemonGo.RocketBot.Logic.Utils
return Result;
}
- public async Task<LevelUpRewardsResponse> Execute( Inventory inventory )
+ public async Task<LevelUpRewardsResponse> Execute(Inventory inventory)
{
- var Result = await inventory.GetLevelUpRewards( inventory );
+ var Result = await inventory.GetLevelUpRewards(inventory);
return Result;
}
@@ -163,4 +161,4 @@ namespace PokemonGo.RocketBot.Logic.Utils
public long LevelupXp;
public double MinutesUntilLevel;
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Utils/StringUtils.cs b/PokemonGo.RocketBot.Logic/Utils/StringUtils.cs
index cd3d2cc..94c3804 100644
--- a/PokemonGo.RocketBot.Logic/Utils/StringUtils.cs
+++ b/PokemonGo.RocketBot.Logic/Utils/StringUtils.cs
@@ -11,6 +11,12 @@ namespace PokemonGo.RocketBot.Logic.Utils
{
public static class StringUtils
{
+ private static readonly Func<bool, bool, bool> AndFunc = (x, y) => x && y;
+ private static readonly Func<bool, bool, bool> OrFunc = (x, y) => x || y;
+
+ private static readonly Func<string, Func<bool, bool, bool>> GetBoolOperator =
+ myOperator => myOperator.ToLower().Equals("and") ? AndFunc : OrFunc;
+
public static string GetSummedFriendlyNameOfItemAwardList(IEnumerable<ItemAward> items)
{
var enumerable = items as IList<ItemAward> ?? items.ToList();
@@ -25,12 +31,6 @@ namespace PokemonGo.RocketBot.Logic.Utils
.Aggregate((a, b) => $"{a}, {b}");
}
-
- private static readonly Func<bool, bool, bool> AndFunc = (x, y) => x && y;
- private static readonly Func<bool, bool, bool> OrFunc = (x, y) => x || y;
- private static readonly Func<string, Func<bool, bool, bool>> GetBoolOperator =
- myOperator => myOperator.ToLower().Equals("and") ? AndFunc : OrFunc;
-
public static bool BoolFunc(this bool expr, bool expr2, string operatorStr)
{
return GetBoolOperator(operatorStr)(expr, expr2);
@@ -50,6 +50,5 @@ namespace PokemonGo.RocketBot.Logic.Utils
{
return operatorStr.ToLower().Equals("and") ? !expr : expr;
}
-
}
}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Utils/WebClientExtensions.cs b/PokemonGo.RocketBot.Logic/Utils/WebClientExtensions.cs
index 030cc12..6de0e46 100644
--- a/PokemonGo.RocketBot.Logic/Utils/WebClientExtensions.cs
+++ b/PokemonGo.RocketBot.Logic/Utils/WebClientExtensions.cs
@@ -1,12 +1,7 @@
using System;
-using System.Collections.Generic;
-using System.IO;
-using System.IO.Compression;
-using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
-using System.Threading.Tasks;
namespace PokemonGo.RocketBot.Logic.Utils
{
@@ -14,7 +9,8 @@ namespace PokemonGo.RocketBot.Logic.Utils
{
public static string DownloadString(this WebClient webClient, Uri uri)
{
- webClient.Headers[HttpRequestHeader.UserAgent] = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2";
+ webClient.Headers[HttpRequestHeader.UserAgent] =
+ "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2";
webClient.Encoding = Encoding.UTF8;
byte[] rawData = null;
string error;
@@ -40,11 +36,11 @@ namespace PokemonGo.RocketBot.Logic.Utils
error = null;
}
- if ( error == null || rawData == null )
+ if (error == null || rawData == null)
return null;
var encoding = WebUtils.GetEncodingFrom(webClient.ResponseHeaders, Encoding.UTF8);
return encoding.GetString(rawData);
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Utils/WebUtils.cs b/PokemonGo.RocketBot.Logic/Utils/WebUtils.cs
index a0e2d24..7c93bd8 100644
--- a/PokemonGo.RocketBot.Logic/Utils/WebUtils.cs
+++ b/PokemonGo.RocketBot.Logic/Utils/WebUtils.cs
@@ -1,9 +1,7 @@
using System;
-using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
-using System.Threading.Tasks;
namespace PokemonGo.RocketBot.Logic.Utils
{
@@ -55,4 +53,4 @@ namespace PokemonGo.RocketBot.Logic.Utils
}
}
}
-}
+}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/Utils/dijkstras.cs b/PokemonGo.RocketBot.Logic/Utils/dijkstras.cs
index aa93463..d0f16b0 100644
--- a/PokemonGo.RocketBot.Logic/Utils/dijkstras.cs
+++ b/PokemonGo.RocketBot.Logic/Utils/dijkstras.cs
@@ -3,9 +3,10 @@ using System.Collections.Generic;
namespace PokemonGo.RocketBot.Logic.Utils
{
- class Graph
+ internal class Graph
{
- Dictionary<char, Dictionary<char, int>> vertices = new Dictionary<char, Dictionary<char, int>>();
+ private readonly Dictionary<char, Dictionary<char, int>> vertices =
+ new Dictionary<char, Dictionary<char, int>>();
public void add_vertex(char name, Dictionary<char, int> edges)
{
@@ -73,19 +74,19 @@ namespace PokemonGo.RocketBot.Logic.Utils
}
}
- class MainClass
+ internal class MainClass
{
public static void Main(string[] args)
{
- Graph g = new Graph();
- g.add_vertex('A', new Dictionary<char, int>() { { 'B', 7 }, { 'C', 8 } });
- g.add_vertex('B', new Dictionary<char, int>() { { 'A', 7 }, { 'F', 2 } });
- g.add_vertex('C', new Dictionary<char, int>() { { 'A', 8 }, { 'F', 6 }, { 'G', 4 } });
- g.add_vertex('D', new Dictionary<char, int>() { { 'F', 8 } });
- g.add_vertex('E', new Dictionary<char, int>() { { 'H', 1 } });
- g.add_vertex('F', new Dictionary<char, int>() { { 'B', 2 }, { 'C', 6 }, { 'D', 8 }, { 'G', 9 }, { 'H', 3 } });
- g.add_vertex('G', new Dictionary<char, int>() { { 'C', 4 }, { 'F', 9 } });
- g.add_vertex('H', new Dictionary<char, int>() { { 'E', 1 }, { 'F', 3 } });
+ var g = new Graph();
+ g.add_vertex('A', new Dictionary<char, int> {{'B', 7}, {'C', 8}});
+ g.add_vertex('B', new Dictionary<char, int> {{'A', 7}, {'F', 2}});
+ g.add_vertex('C', new Dictionary<char, int> {{'A', 8}, {'F', 6}, {'G', 4}});
+ g.add_vertex('D', new Dictionary<char, int> {{'F', 8}});
+ g.add_vertex('E', new Dictionary<char, int> {{'H', 1}});
+ g.add_vertex('F', new Dictionary<char, int> {{'B', 2}, {'C', 6}, {'D', 8}, {'G', 9}, {'H', 3}});
+ g.add_vertex('G', new Dictionary<char, int> {{'C', 4}, {'F', 9}});
+ g.add_vertex('H', new Dictionary<char, int> {{'E', 1}, {'F', 3}});
g.shortest_path('A', 'H').ForEach(x => Console.WriteLine(x));
}
diff --git a/PokemonGo.RocketBot.Logic/app.config b/PokemonGo.RocketBot.Logic/app.config
index 588df31..83b016d 100644
--- a/PokemonGo.RocketBot.Logic/app.config
+++ b/PokemonGo.RocketBot.Logic/app.config
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
+
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
@@ -12,4 +13,7 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
-<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /></startup></configuration>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
+ </startup>
+</configuration>
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Logic/packages.config b/PokemonGo.RocketBot.Logic/packages.config
index c8b80be..d7ed144 100644
--- a/PokemonGo.RocketBot.Logic/packages.config
+++ b/PokemonGo.RocketBot.Logic/packages.config
@@ -1,15 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
+
<packages>
- <package id="C5" version="2.2.5073.27396" targetFramework="net452" />
+ <package id="C5" version="2.4.5947.17249" targetFramework="net452" />
<package id="CloudFlareUtilities" version="0.2.1-alpha" targetFramework="net452" />
<package id="EngineIoClientDotNet" version="0.9.22" targetFramework="net452" />
<package id="GeoCoordinate" version="1.1.0" targetFramework="net45" />
<package id="GMap.NET.WindowsForms" version="1.7.1" targetFramework="net452" />
- <package id="Google.Protobuf" version="3.0.0-beta4" targetFramework="net45" />
+ <package id="Google.Protobuf" version="3.0.0" targetFramework="net452" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net452" />
+ <package id="Microsoft.NETCore.Platforms" version="1.0.1" targetFramework="net452" />
+ <package id="NETStandard.Library" version="1.6.0" targetFramework="net452" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
- <package id="S2Geometry" version="1.0.1" targetFramework="net452" />
+ <package id="S2Geometry" version="1.0.3" targetFramework="net452" />
<package id="SocketIoClientDotNet" version="0.9.13" targetFramework="net452" />
+ <package id="System.Collections" version="4.0.11" targetFramework="net452" />
+ <package id="System.Collections.Concurrent" version="4.0.12" targetFramework="net452" />
+ <package id="System.Diagnostics.Debug" version="4.0.11" targetFramework="net452" />
+ <package id="System.Diagnostics.Tools" version="4.0.1" targetFramework="net452" />
+ <package id="System.Diagnostics.Tracing" version="4.1.0" targetFramework="net452" />
+ <package id="System.Globalization" version="4.0.11" targetFramework="net452" />
+ <package id="System.IO" version="4.1.0" targetFramework="net452" />
+ <package id="System.IO.Compression" version="4.1.0" targetFramework="net452" />
+ <package id="System.Linq" version="4.1.0" targetFramework="net452" />
+ <package id="System.Linq.Expressions" version="4.1.0" targetFramework="net452" />
+ <package id="System.Net.Http" version="4.1.0" targetFramework="net452" />
+ <package id="System.Net.Primitives" version="4.0.11" targetFramework="net452" />
+ <package id="System.ObjectModel" version="4.0.12" targetFramework="net452" />
+ <package id="System.Reflection" version="4.1.0" targetFramework="net452" />
+ <package id="System.Reflection.Extensions" version="4.0.1" targetFramework="net452" />
+ <package id="System.Reflection.Primitives" version="4.0.1" targetFramework="net452" />
+ <package id="System.Resources.ResourceManager" version="4.0.1" targetFramework="net452" />
+ <package id="System.Runtime" version="4.1.0" targetFramework="net452" />
+ <package id="System.Runtime.Extensions" version="4.1.0" targetFramework="net452" />
+ <package id="System.Runtime.InteropServices" version="4.1.0" targetFramework="net452" />
+ <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.0.0" targetFramework="net452" />
+ <package id="System.Runtime.Numerics" version="4.0.1" targetFramework="net452" />
+ <package id="System.Text.Encoding" version="4.0.11" targetFramework="net452" />
+ <package id="System.Text.Encoding.Extensions" version="4.0.11" targetFramework="net452" />
+ <package id="System.Text.RegularExpressions" version="4.1.0" targetFramework="net452" />
+ <package id="System.Threading" version="4.0.11" targetFramework="net452" />
+ <package id="System.Threading.Tasks" version="4.0.11" targetFramework="net452" />
+ <package id="System.Threading.Timer" version="4.0.1" targetFramework="net452" />
+ <package id="System.Xml.ReaderWriter" version="4.0.11" targetFramework="net452" />
+ <package id="System.Xml.XDocument" version="4.0.11" targetFramework="net452" />
<package id="Telegram.Bot" version="10.3.1" targetFramework="net452" />
<package id="WebSocket4Net" version="0.14.1" targetFramework="net452" />
</packages>
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Window/ConsoleEventListener.cs b/PokemonGo.RocketBot.Window/ConsoleEventListener.cs
index 8b5eb11..ab27d46 100644
--- a/PokemonGo.RocketBot.Window/ConsoleEventListener.cs
+++ b/PokemonGo.RocketBot.Window/ConsoleEventListener.cs
@@ -7,6 +7,7 @@ using PokemonGo.RocketBot.Logic.Common;
using PokemonGo.RocketBot.Logic.Event;
using PokemonGo.RocketBot.Logic.Logging;
using PokemonGo.RocketBot.Logic.State;
+using PokemonGo.RocketBot.Window.Forms;
using POGOProtos.Enums;
using POGOProtos.Inventory.Item;
using POGOProtos.Networking.Responses;
@@ -21,11 +22,8 @@ namespace PokemonGo.RocketBot.Window
private static void HandleEvent(HumanWalkingEvent humanWalkingEvent, ISession session)
{
if (session.LogicSettings.ShowVariantWalking)
- Logger.Write(
- session.Translation.GetTranslation(TranslationString.HumanWalkingVariant,
- humanWalkingEvent.OldWalkingSpeed,
- humanWalkingEvent.CurrentWalkingSpeed),
- LogLevel.Info, ConsoleColor.DarkCyan);
+ MainForm.SetSpeedLable("Current Speed: " + Math.Round(humanWalkingEvent.CurrentWalkingSpeed, 2) +
+ " km/h");
}
private static void HandleEvent(ProfileEvent profileEvent, ISession session)
diff --git a/PokemonGo.RocketBot.Window/Forms/MainForm.cs b/PokemonGo.RocketBot.Window/Forms/MainForm.cs
index e90bb4d..465c4b6 100644
--- a/PokemonGo.RocketBot.Window/Forms/MainForm.cs
+++ b/PokemonGo.RocketBot.Window/Forms/MainForm.cs
@@ -14,6 +14,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using BrightIdeasSoftware;
+using GeoCoordinatePortable;
using GMap.NET;
using GMap.NET.MapProviders;
using GMap.NET.WindowsForms;
@@ -54,6 +55,7 @@ namespace PokemonGo.RocketBot.Window.Forms
private readonly List<PointLatLng> _playerLocations = new List<PointLatLng>();
private readonly GMapOverlay _playerOverlay = new GMapOverlay("players");
+ private readonly GMapOverlay _playerRouteOverlay = new GMapOverlay("playerroutes");
private readonly GMapOverlay _pokemonsOverlay = new GMapOverlay("pokemons");
private readonly GMapOverlay _pokestopsOverlay = new GMapOverlay("pokestops");
private readonly GMapOverlay _searchAreaOverlay = new GMapOverlay("areas");
@@ -61,6 +63,7 @@ namespace PokemonGo.RocketBot.Window.Forms
private PointLatLng _currentLatLng;
private ConsoleLogger _logger;
private StateMachine _machine;
+ private List<PointLatLng> _routePoints;
private GlobalSettings _settings;
public MainForm()
@@ -80,6 +83,11 @@ namespace PokemonGo.RocketBot.Window.Forms
Analytics.Client.Identify(MachineIdHelper.GetMachineId(), new Traits());
Analytics.Client.Track(MachineIdHelper.GetMachineId(), "App started");
+ speedLable.Parent = gMapControl1;
+ showMoreCheckBox.Parent = gMapControl1;
+ followTrainerCheckBox.Parent = gMapControl1;
+ togglePrecalRoute.Parent = gMapControl1;
+
InitializeBot();
InitializePokemonForm();
InitializeMap();
@@ -110,6 +118,7 @@ namespace PokemonGo.RocketBot.Window.Forms
gMapControl1.Overlays.Add(_pokestopsOverlay);
gMapControl1.Overlays.Add(_pokemonsOverlay);
gMapControl1.Overlays.Add(_playerOverlay);
+ gMapControl1.Overlays.Add(_playerRouteOverlay);
_playerMarker = new GMapMarkerTrainer(new PointLatLng(lat, lng),
ResourceHelper.GetImage("Trainer_Front"));
@@ -213,6 +222,11 @@ namespace PokemonGo.RocketBot.Window.Forms
_session.EventDispatcher.Send(new OptimizeRouteEvent {OptimizedRoute = optimizedroute});
RouteOptimizeUtil.RouteOptimizeEvent += InitializePokestopsAndRoute;
+ Navigation.GetHumanizeRouteEvent +=
+ (route, destination) =>
+ _session.EventDispatcher.Send(new GetHumanizeRouteEvent {Route = route, Destination = destination});
+ Navigation.GetHumanizeRouteEvent += UpdateMap;
+
FarmPokestopsTask.LootPokestopEvent +=
pokestop => _session.EventDispatcher.Send(new LootPokestopEvent {Pokestop = pokestop});
FarmPokestopsTask.LootPokestopEvent += UpdateMap;
@@ -255,10 +269,10 @@ namespace PokemonGo.RocketBot.Window.Forms
(from pokeStop in pokeStops
where pokeStop != null
select new PointLatLng(pokeStop.Latitude, pokeStop.Longitude)).ToList();
- foreach(var pks in pokeStops)
- Logger.Write(pks.Latitude + ", " + pks.Longitude);
- // Temporary removed it since the route is calculated on the fly with gmap api's
+ _routePoints = routePoint;
+ togglePrecalRoute.Enabled = true;
+
var route = new GMapRoute(routePoint, "Walking Path")
{
Stroke = new Pen(Color.FromArgb(128, 0, 179, 253), 4)
@@ -288,6 +302,54 @@ namespace PokemonGo.RocketBot.Window.Forms
}, null);
}
+ private void UpdateMap(List<GeoCoordinate> route, GeoCoordinate destination)
+ {
+ var routePointLatLngs = new List<PointLatLng>();
+ foreach (var item in route)
+ {
+ routePointLatLngs.Add(new PointLatLng(item.Latitude, item.Longitude));
+ }
+ var routes = new GMapRoute(routePointLatLngs, routePointLatLngs.ToString())
+ {
+ Stroke = new Pen(Color.FromArgb(128, 0, 179, 253), 4) {DashStyle = DashStyle.Dash}
+ };
+ _playerRouteOverlay.Routes.Add(routes);
+ /* Logger.Write("new call");
+ List<PointLatLng> routePointLatLngs = new List<PointLatLng>();
+ Logger.Write("new route size: " +route.Count);
+ PointLatLng destinationPointLatLng = new PointLatLng(destination.Latitude, destination.Longitude);
+ foreach (var item in route)
+ {
+ routePointLatLngs.Add(new PointLatLng(item.Latitude, item.Longitude));
+ }
+
+ List<PointLatLng> routePointsDistinct = new List<PointLatLng>(_routePoints.Distinct());
+
+ int listPosition;
+ for (listPosition = 0; listPosition < routePointsDistinct.Count; listPosition++)
+ {
+ Logger.Write("listPosition: " + listPosition);
+ var item = routePointsDistinct[listPosition];
+ if (item == destinationPointLatLng)
+ break;
+ }
+
+ if (listPosition == 0)
+ return;
+
+ //routePointsDistinct.Remove(destinationPointLatLng);
+ routePointsDistinct.InsertRange(listPosition, routePointLatLngs);
+ //routePointsDistinct.Remove(routePointsDistinct[listPosition - 1]);
+
+
+ _pokestopsOverlay.Routes.Clear();
+ var routes = new GMapRoute(routePointsDistinct, "Walking Path")
+ {
+ Stroke = new Pen(Color.FromArgb(128, 0, 179, 253), 4)
+ };
+ _pokestopsOverlay.Routes.Add(routes);*/
+ }
+
private void UpdateMap(FortData pokestop)
{
SynchronizationContext.Post(o =>
@@ -342,6 +404,8 @@ namespace PokemonGo.RocketBot.Window.Forms
? new GMapMarkerTrainer(latlng, ResourceHelper.GetImage("Trainer_Right"))
: new GMapMarkerTrainer(latlng, ResourceHelper.GetImage("Trainer_Left"));
_playerOverlay.Markers.Add(_playerMarker);
+ if (followTrainerCheckBox.Checked)
+ gMapControl1.Position = latlng;
}, null);
_currentLatLng = latlng;
@@ -403,6 +467,54 @@ namespace PokemonGo.RocketBot.Window.Forms
{
}
+ private void gMapControl1_Load(object sender, EventArgs e)
+ {
+ }
+
+ private void showMoreCheckBox_CheckedChanged(object sender, EventArgs e)
+ {
+ if (showMoreCheckBox.Checked)
+ {
+ followTrainerCheckBox.Visible = true;
+ togglePrecalRoute.Visible = true;
+ }
+ else
+ {
+ followTrainerCheckBox.Visible = false;
+ togglePrecalRoute.Visible = false;
+ }
+ }
+
+ private void followTrainerCheckBox_CheckedChanged(object sender, EventArgs e)
+ {
+ if (followTrainerCheckBox.Checked)
+ {
+ gMapControl1.CanDragMap = false;
+ gMapControl1.Position = _currentLatLng;
+ }
+ else
+ {
+ gMapControl1.CanDragMap = true;
+ }
+ }
+
+ private void togglePrecalRoute_CheckedChanged(object sender, EventArgs e)
+ {
+ if (togglePrecalRoute.Checked)
+ {
+ _pokestopsOverlay.Routes.Clear();
+ var route = new GMapRoute(_routePoints, "Walking Path")
+ {
+ Stroke = new Pen(Color.FromArgb(128, 0, 179, 253), 4)
+ };
+ _pokestopsOverlay.Routes.Add(route);
+ }
+ else
+ {
+ _pokestopsOverlay.Routes.Clear();
+ }
+ }
+
#region INTERFACE
public static void ColoredConsoleWrite(Color color, string text)
@@ -421,6 +533,16 @@ namespace PokemonGo.RocketBot.Window.Forms
Instance.logTextBox.AppendText(message);
}
+ public static void SetSpeedLable(string text)
+ {
+ if (Instance.InvokeRequired)
+ {
+ Instance.Invoke(new Action<string>(SetSpeedLable), text);
+ return;
+ }
+ Instance.speedLable.Text = text;
+ }
+
public static void SetStatusText(string text)
{
if (Instance.InvokeRequired)
@@ -791,7 +913,10 @@ namespace PokemonGo.RocketBot.Window.Forms
var inventoryAppliedItems =
await _session.Inventory.GetAppliedItems();
- var appliedItems = inventoryAppliedItems.Where(aItems => aItems?.Item != null).SelectMany(aItems => aItems.Item).ToDictionary(item => item.ItemId, item => Utils.FromUnixTimeUtc(item.ExpireMs));
+ var appliedItems =
+ inventoryAppliedItems.Where(aItems => aItems?.Item != null)
+ .SelectMany(aItems => aItems.Item)
+ .ToDictionary(item => item.ItemId, item => Utils.FromUnixTimeUtc(item.ExpireMs));
PokemonObject.Initilize(itemTemplates);
@@ -827,7 +952,8 @@ namespace PokemonGo.RocketBot.Window.Forms
inventory.InventoryDelta.InventoryItems
.Select(i => i.InventoryItemData?.PokemonData)
.Count(p => p != null && p.IsEgg);
- lblPokemonList.Text = $"{pokemoncount + eggcount} / {profile.PlayerData.MaxPokemonStorage} ({pokemoncount} pokemon, {eggcount} eggs)";
+ lblPokemonList.Text =
+ $"{pokemoncount + eggcount} / {profile.PlayerData.MaxPokemonStorage} ({pokemoncount} pokemon, {eggcount} eggs)";
var items =
inventory.InventoryDelta.InventoryItems
@@ -1029,10 +1155,5 @@ namespace PokemonGo.RocketBot.Window.Forms
}
#endregion POKEMON LIST
-
- private void gMapControl1_Load(object sender, EventArgs e)
- {
-
- }
}
}
\ No newline at end of file
diff --git a/PokemonGo.RocketBot.Window/Forms/MainForm.designer.cs b/PokemonGo.RocketBot.Window/Forms/MainForm.designer.cs
index 39ee085..9ec6e51 100644
--- a/PokemonGo.RocketBot.Window/Forms/MainForm.designer.cs
+++ b/PokemonGo.RocketBot.Window/Forms/MainForm.designer.cs
@@ -64,6 +64,10 @@ namespace PokemonGo.RocketBot.Window.Forms
this.btnRefresh = new System.Windows.Forms.Button();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
+ this.togglePrecalRoute = new System.Windows.Forms.CheckBox();
+ this.followTrainerCheckBox = new System.Windows.Forms.CheckBox();
+ this.showMoreCheckBox = new System.Windows.Forms.CheckBox();
+ this.speedLable = new System.Windows.Forms.Label();
this.lblInventory = new System.Windows.Forms.Label();
this.flpItems = new System.Windows.Forms.FlowLayoutPanel();
this.lblPokemonList = new System.Windows.Forms.Label();
@@ -92,7 +96,7 @@ namespace PokemonGo.RocketBot.Window.Forms
this.logTextBox.Name = "logTextBox";
this.logTextBox.ReadOnly = true;
this.logTextBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.ForcedVertical;
- this.logTextBox.Size = new System.Drawing.Size(611, 267);
+ this.logTextBox.Size = new System.Drawing.Size(611, 244);
this.logTextBox.TabIndex = 0;
this.logTextBox.Text = "";
//
@@ -101,7 +105,7 @@ namespace PokemonGo.RocketBot.Window.Forms
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.statusLabel});
- this.statusStrip1.Location = new System.Drawing.Point(0, 541);
+ this.statusStrip1.Location = new System.Drawing.Point(0, 498);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(1254, 22);
this.statusStrip1.TabIndex = 1;
@@ -110,7 +114,7 @@ namespace PokemonGo.RocketBot.Window.Forms
// statusLabel
//
this.statusLabel.Name = "statusLabel";
- this.statusLabel.Size = new System.Drawing.Size(39, 17);
+ this.statusLabel.Size = new System.Drawing.Size(43, 17);
this.statusLabel.Text = "Status";
//
// menuStrip1
@@ -121,14 +125,14 @@ namespace PokemonGo.RocketBot.Window.Forms
this.todoToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
- this.menuStrip1.Size = new System.Drawing.Size(1254, 24);
+ this.menuStrip1.Size = new System.Drawing.Size(1254, 25);
this.menuStrip1.TabIndex = 2;
this.menuStrip1.Text = "menuStrip1";
//
// startStopBotToolStripMenuItem
//
this.startStopBotToolStripMenuItem.Name = "startStopBotToolStripMenuItem";
- this.startStopBotToolStripMenuItem.Size = new System.Drawing.Size(77, 20);
+ this.startStopBotToolStripMenuItem.Size = new System.Drawing.Size(85, 21);
this.startStopBotToolStripMenuItem.Text = "▶ Start Bot";
this.startStopBotToolStripMenuItem.Click += new System.EventHandler(this.startStopBotToolStripMenuItem_Click);
//
@@ -136,7 +140,7 @@ namespace PokemonGo.RocketBot.Window.Forms
//
this.todoToolStripMenuItem.Enabled = false;
this.todoToolStripMenuItem.Name = "todoToolStripMenuItem";
- this.todoToolStripMenuItem.Size = new System.Drawing.Size(490, 20);
+ this.todoToolStripMenuItem.Size = new System.Drawing.Size(540, 21);
this.todoToolStripMenuItem.Text = "Settings (Not finish yet, please go to the config folder and set your information" +
" manually)";
this.todoToolStripMenuItem.Click += new System.EventHandler(this.todoToolStripMenuItem_Click);
@@ -175,7 +179,7 @@ namespace PokemonGo.RocketBot.Window.Forms
this.gMapControl1.ScaleMode = GMap.NET.WindowsForms.ScaleModes.Integer;
this.gMapControl1.SelectedAreaFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(65)))), ((int)(((byte)(105)))), ((int)(((byte)(225)))));
this.gMapControl1.ShowTileGridLines = false;
- this.gMapControl1.Size = new System.Drawing.Size(605, 239);
+ this.gMapControl1.Size = new System.Drawing.Size(605, 219);
this.gMapControl1.TabIndex = 23;
this.gMapControl1.Zoom = 0D;
this.gMapControl1.Load += new System.EventHandler(this.gMapControl1_Load);
@@ -229,7 +233,7 @@ namespace PokemonGo.RocketBot.Window.Forms
this.olvPokemonList.Name = "olvPokemonList";
this.olvPokemonList.RowHeight = 32;
this.olvPokemonList.ShowGroups = false;
- this.olvPokemonList.Size = new System.Drawing.Size(633, 328);
+ this.olvPokemonList.Size = new System.Drawing.Size(633, 299);
this.olvPokemonList.SmallImageList = this.smallPokemonImageList;
this.olvPokemonList.TabIndex = 25;
this.olvPokemonList.UseCompatibleStateImageBehavior = false;
@@ -363,9 +367,9 @@ namespace PokemonGo.RocketBot.Window.Forms
| System.Windows.Forms.AnchorStyles.Right)));
this.btnRefresh.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnRefresh.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.btnRefresh.Location = new System.Drawing.Point(3, 488);
+ this.btnRefresh.Location = new System.Drawing.Point(3, 446);
this.btnRefresh.Name = "btnRefresh";
- this.btnRefresh.Size = new System.Drawing.Size(633, 28);
+ this.btnRefresh.Size = new System.Drawing.Size(633, 26);
this.btnRefresh.TabIndex = 26;
this.btnRefresh.Text = "Refresh";
this.btnRefresh.UseVisualStyleBackColor = true;
@@ -374,7 +378,7 @@ namespace PokemonGo.RocketBot.Window.Forms
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.splitContainer1.Location = new System.Drawing.Point(0, 24);
+ this.splitContainer1.Location = new System.Drawing.Point(0, 25);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
@@ -388,7 +392,7 @@ namespace PokemonGo.RocketBot.Window.Forms
this.splitContainer1.Panel2.Controls.Add(this.lblPokemonList);
this.splitContainer1.Panel2.Controls.Add(this.olvPokemonList);
this.splitContainer1.Panel2.Controls.Add(this.btnRefresh);
- this.splitContainer1.Size = new System.Drawing.Size(1254, 517);
+ this.splitContainer1.Size = new System.Drawing.Size(1254, 473);
this.splitContainer1.SplitterDistance = 611;
this.splitContainer1.TabIndex = 27;
//
@@ -405,19 +409,83 @@ namespace PokemonGo.RocketBot.Window.Forms
//
// splitContainer2.Panel2
//
+ this.splitContainer2.Panel2.Controls.Add(this.togglePrecalRoute);
+ this.splitContainer2.Panel2.Controls.Add(this.followTrainerCheckBox);
+ this.splitContainer2.Panel2.Controls.Add(this.showMoreCheckBox);
+ this.splitContainer2.Panel2.Controls.Add(this.speedLable);
this.splitContainer2.Panel2.Controls.Add(this.gMapControl1);
- this.splitContainer2.Size = new System.Drawing.Size(611, 517);
- this.splitContainer2.SplitterDistance = 267;
+ this.splitContainer2.Size = new System.Drawing.Size(611, 473);
+ this.splitContainer2.SplitterDistance = 244;
this.splitContainer2.TabIndex = 0;
//
+ // togglePrecalRoute
+ //
+ this.togglePrecalRoute.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.togglePrecalRoute.AutoSize = true;
+ this.togglePrecalRoute.BackColor = System.Drawing.Color.Transparent;
+ this.togglePrecalRoute.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.togglePrecalRoute.Checked = true;
+ this.togglePrecalRoute.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.togglePrecalRoute.Enabled = false;
+ this.togglePrecalRoute.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.togglePrecalRoute.Location = new System.Drawing.Point(420, 53);
+ this.togglePrecalRoute.Name = "togglePrecalRoute";
+ this.togglePrecalRoute.Size = new System.Drawing.Size(184, 19);
+ this.togglePrecalRoute.TabIndex = 27;
+ this.togglePrecalRoute.Text = "Toggle Pre-Calculated Route";
+ this.togglePrecalRoute.UseVisualStyleBackColor = false;
+ this.togglePrecalRoute.Visible = false;
+ this.togglePrecalRoute.CheckedChanged += new System.EventHandler(this.togglePrecalRoute_CheckedChanged);
+ //
+ // followTrainerCheckBox
+ //
+ this.followTrainerCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.followTrainerCheckBox.AutoSize = true;
+ this.followTrainerCheckBox.BackColor = System.Drawing.Color.Transparent;
+ this.followTrainerCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.followTrainerCheckBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.followTrainerCheckBox.Location = new System.Drawing.Point(472, 28);
+ this.followTrainerCheckBox.Name = "followTrainerCheckBox";
+ this.followTrainerCheckBox.Size = new System.Drawing.Size(132, 19);
+ this.followTrainerCheckBox.TabIndex = 26;
+ this.followTrainerCheckBox.Text = "Map Follow Trainer";
+ this.followTrainerCheckBox.UseVisualStyleBackColor = false;
+ this.followTrainerCheckBox.Visible = false;
+ this.followTrainerCheckBox.CheckedChanged += new System.EventHandler(this.followTrainerCheckBox_CheckedChanged);
+ //
+ // showMoreCheckBox
+ //
+ this.showMoreCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.showMoreCheckBox.AutoSize = true;
+ this.showMoreCheckBox.BackColor = System.Drawing.Color.Transparent;
+ this.showMoreCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.showMoreCheckBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.showMoreCheckBox.Location = new System.Drawing.Point(453, 3);
+ this.showMoreCheckBox.Name = "showMoreCheckBox";
+ this.showMoreCheckBox.Size = new System.Drawing.Size(151, 19);
+ this.showMoreCheckBox.TabIndex = 25;
+ this.showMoreCheckBox.Text = "Show Advance Options";
+ this.showMoreCheckBox.UseVisualStyleBackColor = false;
+ this.showMoreCheckBox.CheckedChanged += new System.EventHandler(this.showMoreCheckBox_CheckedChanged);
+ //
+ // speedLable
+ //
+ this.speedLable.AutoSize = true;
+ this.speedLable.BackColor = System.Drawing.Color.Transparent;
+ this.speedLable.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.speedLable.Location = new System.Drawing.Point(1, 3);
+ this.speedLable.Name = "speedLable";
+ this.speedLable.Size = new System.Drawing.Size(0, 15);
+ this.speedLable.TabIndex = 24;
+ //
// lblInventory
//
this.lblInventory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblInventory.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lblInventory.Location = new System.Drawing.Point(3, 472);
+ this.lblInventory.Location = new System.Drawing.Point(3, 432);
this.lblInventory.Name = "lblInventory";
- this.lblInventory.Size = new System.Drawing.Size(633, 13);
+ this.lblInventory.Size = new System.Drawing.Size(633, 12);
this.lblInventory.TabIndex = 33;
this.lblInventory.Text = "0 / 0 ";
this.lblInventory.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
@@ -430,9 +498,9 @@ namespace PokemonGo.RocketBot.Window.Forms
this.flpItems.BackColor = System.Drawing.SystemColors.Window;
this.flpItems.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flpItems.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
- this.flpItems.Location = new System.Drawing.Point(3, 348);
+ this.flpItems.Location = new System.Drawing.Point(3, 317);
this.flpItems.Name = "flpItems";
- this.flpItems.Size = new System.Drawing.Size(633, 120);
+ this.flpItems.Size = new System.Drawing.Size(633, 111);
this.flpItems.TabIndex = 32;
//
// lblPokemonList
@@ -440,18 +508,18 @@ namespace PokemonGo.RocketBot.Window.Forms
this.lblPokemonList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblPokemonList.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lblPokemonList.Location = new System.Drawing.Point(3, 333);
+ this.lblPokemonList.Location = new System.Drawing.Point(3, 303);
this.lblPokemonList.Name = "lblPokemonList";
- this.lblPokemonList.Size = new System.Drawing.Size(633, 12);
+ this.lblPokemonList.Size = new System.Drawing.Size(633, 11);
this.lblPokemonList.TabIndex = 27;
this.lblPokemonList.Text = "0 / 0";
this.lblPokemonList.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// MainForm
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(1254, 563);
+ this.ClientSize = new System.Drawing.Size(1254, 520);
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStrip1);
@@ -474,6 +542,7 @@ namespace PokemonGo.RocketBot.Window.Forms
this.splitContainer1.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
+ this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.ResumeLayout(false);
@@ -518,5 +587,9 @@ namespace PokemonGo.RocketBot.Window.Forms
private BrightIdeasSoftware.OLVColumn pkmnLevel;
private BrightIdeasSoftware.OLVColumn pkmnMove1;
private BrightIdeasSoftware.OLVColumn pkmnMove2;
+ private Label speedLable;
+ private CheckBox togglePrecalRoute;
+ private CheckBox followTrainerCheckBox;
+ private CheckBox showMoreCheckBox;
}
}
diff --git a/PokemonGo.RocketBot.Window/PokemonGo.RocketBot.Window.csproj b/PokemonGo.RocketBot.Window/PokemonGo.RocketBot.Window.csproj
index e91f81c..674d74e 100644
--- a/PokemonGo.RocketBot.Window/PokemonGo.RocketBot.Window.csproj
+++ b/PokemonGo.RocketBot.Window/PokemonGo.RocketBot.Window.csproj
@@ -91,6 +91,10 @@
<HintPath>..\packages\Analytics.2.0.2\lib\Analytics.NET.dll</HintPath>
<Private>True</Private>
</Reference>
+ <Reference Include="GeoCoordinatePortable, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\packages\GeoCoordinate.1.1.0\lib\portable-net45+wp80+win+wpa81\GeoCoordinatePortable.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
<Reference Include="GMap.NET.Core, Version=1.7.0.0, Culture=neutral, PublicKeyToken=b85b9027b614afef, processorArchitecture=MSIL">
<HintPath>..\packages\GMap.NET.WindowsForms.1.7.1\lib\net40\GMap.NET.Core.dll</HintPath>
<Private>True</Private>
diff --git a/PokemonGo.RocketBot.Window/packages.config b/PokemonGo.RocketBot.Window/packages.config
index a4501d6..be2074c 100644
--- a/PokemonGo.RocketBot.Window/packages.config
+++ b/PokemonGo.RocketBot.Window/packages.config
@@ -6,6 +6,7 @@
<package id="C5" version="2.4.5947.17249" targetFramework="net452" />
<package id="Costura.Fody" version="1.3.3.0" targetFramework="net45" developmentDependency="true" />
<package id="Fody" version="1.29.4" targetFramework="net45" developmentDependency="true" />
+ <package id="GeoCoordinate" version="1.1.0" targetFramework="net452" />
<package id="GMap.NET.WindowsForms" version="1.7.1" targetFramework="net452" />
<package id="Google.Apis" version="1.15.0" targetFramework="net452" />
<package id="Google.Apis.Auth" version="1.15.0" targetFramework="net452" />
You may download the files in Public Git.