Fix TransferPokemon logic

FeroxRev [2016-07-21 07:39:59]
Fix TransferPokemon logic
Filename
PokemonGo.RocketAPI.Logic/Inventory.cs
PokemonGo.RocketAPI.Logic/Logic.cs
diff --git a/PokemonGo.RocketAPI.Logic/Inventory.cs b/PokemonGo.RocketAPI.Logic/Inventory.cs
index 0835c3a..22553b5 100644
--- a/PokemonGo.RocketAPI.Logic/Inventory.cs
+++ b/PokemonGo.RocketAPI.Logic/Inventory.cs
@@ -30,7 +30,7 @@ namespace PokemonGo.RocketAPI.Logic
             return myPokemon.OrderBy(x => x.Cp)
                 .GroupBy(p => p.PokemonId)
                 .Where(x => x.Count() > 1)
-                .SelectMany(p => p.ToList());
+                .SelectMany(p => p.Skip(1).ToList());
         }
     }
 }
diff --git a/PokemonGo.RocketAPI.Logic/Logic.cs b/PokemonGo.RocketAPI.Logic/Logic.cs
index 464e593..9ff9318 100644
--- a/PokemonGo.RocketAPI.Logic/Logic.cs
+++ b/PokemonGo.RocketAPI.Logic/Logic.cs
@@ -30,17 +30,17 @@ namespace PokemonGo.RocketAPI.Logic

             var client = new Client(_clientSettings);

+            if (_clientSettings.AuthType == AuthType.Ptc)
+                await client.DoPtcLogin(_clientSettings.PtcUsername, _clientSettings.PtcPassword);
+            else if (_clientSettings.AuthType == AuthType.Google)
+                await client.DoGoogleLogin();
+
             while (true)
             {
                 try
                 {
-                    if (_clientSettings.AuthType == AuthType.Ptc)
-                        await client.DoPtcLogin(_clientSettings.PtcUsername, _clientSettings.PtcPassword);
-                    else if (_clientSettings.AuthType == AuthType.Google)
-                        await client.DoGoogleLogin();
-
                     await client.SetServer();
-                    await RepeatAction(10, async () => await ExecuteFarmingPokestopsAndPokemons(client));
+                    //await RepeatAction(10, async () => await ExecuteFarmingPokestopsAndPokemons(client));
                     await TransferDuplicatePokemon();

                     /*
You may download the files in Public Git.