Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/Beta-Build'
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian committed Aug 2, 2016
2 parents 00ff46e + 6d209c3 commit f885b69
Show file tree
Hide file tree
Showing 161 changed files with 2,530 additions and 120 deletions.
4 changes: 4 additions & 0 deletions PokemonGo/RocketAPI/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,10 @@ public async Task UseRazzBerry(Client client, ulong encounterId, string spawnPoi
ColoredConsoleWrite(ConsoleColor.Green, $"Using a Razz Berry, we have {RazzBerry.Count} left");
await Task.Delay(2000);
}
else
{
ColoredConsoleWrite(ConsoleColor.Red, $"You don't have any Razz Berry to use.");
}
}

public async Task<UseItemRequest> UseItemXpBoost(ItemId itemId)
Expand Down
35 changes: 0 additions & 35 deletions PokemonGo/RocketAPI/Window/CueTextBox.cs

This file was deleted.

46 changes: 16 additions & 30 deletions PokemonGo/RocketAPI/Window/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ private void InitializeMap()
S2GMapDrawer.DrawS2Cells(S2Helper.GetNearbyCellIds(ClientSettings.DefaultLongitude, ClientSettings.DefaultLatitude), searchAreaOverlay);
}

public static void ResetMap()
{
Instance.gMapControl1.Position = new PointLatLng(ClientSettings.DefaultLatitude, ClientSettings.DefaultLongitude);
Instance.playerMarker.Position = new PointLatLng(ClientSettings.DefaultLatitude, ClientSettings.DefaultLongitude);
Instance.searchAreaOverlay.Polygons.Clear();
S2GMapDrawer.DrawS2Cells(S2Helper.GetNearbyCellIds(ClientSettings.DefaultLongitude, ClientSettings.DefaultLatitude), Instance.searchAreaOverlay);
}

public static ISettings ClientSettings;
private static int Currentlevel = -1;
private static int TotalExperience = 0;
Expand Down Expand Up @@ -134,7 +142,7 @@ public void CheckVersion()
// makes sense to display your version and say what the current one is on github
ColoredConsoleWrite(Color.Green, "Your version is " + Assembly.GetExecutingAssembly().GetName().Version);
ColoredConsoleWrite(Color.Green, "Github version is " + gitVersion);
ColoredConsoleWrite(Color.Green, "You can find it at www.GitHub.com/1461748123/Pokemon-Go-Rocket-API");
ColoredConsoleWrite(Color.Green, "You can find it at www.GitHub.com/1461748123/Pokemon-Go-Rocket-API/releases");
}
catch (Exception)
{
Expand Down Expand Up @@ -210,19 +218,7 @@ private async Task EvolveAllGivenPokemons(Client client, IEnumerable<PokemonData
{
foreach (var pokemon in pokemonToEvolve)
{
/*
enum Holoholo.Rpc.Types.EvolvePokemonOutProto.Result {
UNSET = 0;
SUCCESS = 1;
FAILED_POKEMON_MISSING = 2;
FAILED_INSUFFICIENT_RESOURCES = 3;
FAILED_POKEMON_CANNOT_EVOLVE = 4;
FAILED_POKEMON_IS_DEPLOYED = 5;
}
}*/

var countOfEvolvedUnits = 0;
var xpCount = 0;

EvolvePokemonOut evolvePokemonOutProto;
do
Expand All @@ -236,23 +232,21 @@ enum Holoholo.Rpc.Types.EvolvePokemonOutProto.Result {
$"Evolved {pokemon.PokemonId} successfully for {evolvePokemonOutProto.ExpAwarded}xp");

countOfEvolvedUnits++;
xpCount += evolvePokemonOutProto.ExpAwarded;
TotalExperience += evolvePokemonOutProto.ExpAwarded;
}
else
{
var result = evolvePokemonOutProto.Result;
/*
ColoredConsoleWrite(ConsoleColor.White, $"Failed to evolve {pokemon.PokemonId}. " +
ColoredConsoleWrite(Color.White, $"Failed to evolve {pokemon.PokemonId}. " +
$"EvolvePokemonOutProto.Result was {result}");
ColoredConsoleWrite(ConsoleColor.White, $"Due to above error, stopping evolving {pokemon.PokemonId}");
*/
ColoredConsoleWrite(Color.White, $"Due to above error, stopping evolving {pokemon.PokemonId}");
}
} while (evolvePokemonOutProto.Result == 1);
/*
if (countOfEvolvedUnits > 0)
ColoredConsoleWrite(Color.Cyan,
$"Evolved {countOfEvolvedUnits} pieces of {pokemon.PokemonId} for {xpCount}xp");

*/
await Task.Delay(3000);
}
}
Expand Down Expand Up @@ -1269,16 +1263,7 @@ private void InitializePokemonForm()

private Image GetPokemonImage(int pokemonId)
{
var Sprites = AppDomain.CurrentDomain.BaseDirectory + "Sprites\\";
string location = Sprites + pokemonId + ".png";
if (!Directory.Exists(Sprites))
Directory.CreateDirectory(Sprites);
if (!File.Exists(location))
{
WebClient wc = new WebClient();
wc.DownloadFile("http://pokeapi.co/media/sprites/pokemon/" + pokemonId + ".png", @location);
}
return Image.FromFile(location);
return (Image)Properties.Resources.ResourceManager.GetObject("Pokemon_" + pokemonId);
}

private async void ReloadPokemonList()
Expand Down Expand Up @@ -1384,6 +1369,7 @@ private async void EvolvePokemon(PokemonData pokemon)
{
message = $"{pokemon.PokemonId} successfully evolved into {evolvePokemonResponse.EvolvedPokemon.PokemonType}\n{evolvePokemonResponse.ExpAwarded} experience awarded\n{evolvePokemonResponse.CandyAwarded} candy awarded";
caption = $"{pokemon.PokemonId} evolved into {evolvePokemonResponse.EvolvedPokemon.PokemonType}";
TotalExperience += (evolvePokemonResponse.ExpAwarded);
ReloadPokemonList();
}
else
Expand Down
Loading

0 comments on commit f885b69

Please sign in to comment.