From 42eb32e7d9cf50e5981f69a29a39d84d174ac2a6 Mon Sep 17 00:00:00 2001 From: PocketMobsters Date: Sat, 23 Jul 2016 18:43:23 -0500 Subject: [PATCH 1/2] Modified Sorting by IV to not be API extended --- PokemonGo.RocketAPI.Logic/Inventory.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PokemonGo.RocketAPI.Logic/Inventory.cs b/PokemonGo.RocketAPI.Logic/Inventory.cs index 9130b3988..d3f9eb4fb 100644 --- a/PokemonGo.RocketAPI.Logic/Inventory.cs +++ b/PokemonGo.RocketAPI.Logic/Inventory.cs @@ -29,7 +29,7 @@ public async Task> GetDuplicatePokemonToTransfer( { var myPokemon = await GetPokemons(); - var pokemonList = myPokemon.Where(p => p.DeployedFortId == 0 && p.Favorite == 0 && p.Cp < _client.Settings.KeepMinCP).ToList(); //Don't evolve pokemon in gyms + var pokemonList = myPokemon.Where(p => p.DeployedFortId == 0 && p.Favorite == 0).ToList(); //Don't evolve pokemon in gyms if (filter != null) { pokemonList = pokemonList.Where(p => !filter.Contains(p.PokemonId)).ToList(); @@ -57,7 +57,7 @@ public async Task> GetDuplicatePokemonToTransfer( if (prioritizeIVoverCP) { results.AddRange(pokemonList.Where(x => x.PokemonId == pokemon.Key) - .OrderByDescending(x => x.CalculateIV()) + .OrderByDescending(x => PokemonInfo.CalculatePokemonPerfection(x)) .ThenBy(n => n.StaminaMax) .Skip(amountToSkip) .ToList()); @@ -81,7 +81,7 @@ public async Task> GetDuplicatePokemonToTransfer( .Where(x => x.Count() > 1) .SelectMany( p => - p.OrderByDescending(x => x.CalculateIV()) + p.OrderByDescending(x => PokemonInfo.CalculatePokemonPerfection(x)) .ThenBy(n => n.StaminaMax) .Skip(_client.Settings.KeepMinDuplicatePokemon) .ToList()); From c1fc318f9d1afcb9aefffa1807e09e2b6d5fa612 Mon Sep 17 00:00:00 2001 From: PocketMobsters Date: Sat, 23 Jul 2016 18:46:04 -0500 Subject: [PATCH 2/2] Modified Sorting by IV to not be API extended --- PokemonGo.RocketAPI.Logic/Inventory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PokemonGo.RocketAPI.Logic/Inventory.cs b/PokemonGo.RocketAPI.Logic/Inventory.cs index d3f9eb4fb..9b9b60d69 100644 --- a/PokemonGo.RocketAPI.Logic/Inventory.cs +++ b/PokemonGo.RocketAPI.Logic/Inventory.cs @@ -29,7 +29,7 @@ public async Task> GetDuplicatePokemonToTransfer( { var myPokemon = await GetPokemons(); - var pokemonList = myPokemon.Where(p => p.DeployedFortId == 0 && p.Favorite == 0).ToList(); //Don't evolve pokemon in gyms + var pokemonList = myPokemon.Where(p => p.DeployedFortId == 0 && p.Favorite == 0 && p.Cp < _client.Settings.KeepMinCP).ToList(); if (filter != null) { pokemonList = pokemonList.Where(p => !filter.Contains(p.PokemonId)).ToList();