diff --git a/PokemonGo.RocketAPI.Console/App.config b/PokemonGo.RocketAPI.Console/App.config
index 2a304d0ff..6c961c701 100644
--- a/PokemonGo.RocketAPI.Console/App.config
+++ b/PokemonGo.RocketAPI.Console/App.config
@@ -61,6 +61,9 @@
False
+
+ 1
+
diff --git a/PokemonGo.RocketAPI.Console/Settings.cs b/PokemonGo.RocketAPI.Console/Settings.cs
index 152278e31..512d614cc 100644
--- a/PokemonGo.RocketAPI.Console/Settings.cs
+++ b/PokemonGo.RocketAPI.Console/Settings.cs
@@ -29,6 +29,7 @@ public class Settings : ISettings
public bool TransferDuplicatePokemon => UserSettings.Default.TransferDuplicatePokemon;
public int DelayBetweenPokemonCatch => UserSettings.Default.DelayBetweenPokemonCatch;
public bool UsePokemonToNotCatchFilter => UserSettings.Default.UsePokemonToNotCatchFilter;
+ public int KeepMinDuplicatePokemon => UserSettings.Default.KeepMinDuplicatePokemon;
public string GoogleRefreshToken
{
diff --git a/PokemonGo.RocketAPI.Console/UserSettings.Designer.cs b/PokemonGo.RocketAPI.Console/UserSettings.Designer.cs
index 9927b34b1..8e29db06a 100644
--- a/PokemonGo.RocketAPI.Console/UserSettings.Designer.cs
+++ b/PokemonGo.RocketAPI.Console/UserSettings.Designer.cs
@@ -190,5 +190,17 @@ public bool UsePokemonToNotCatchFilter {
this["UsePokemonToNotCatchFilter"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("1")]
+ public int KeepMinDuplicatePokemon {
+ get {
+ return ((int)(this["KeepMinDuplicatePokemon"]));
+ }
+ set {
+ this["KeepMinDuplicatePokemon"] = value;
+ }
+ }
}
}
diff --git a/PokemonGo.RocketAPI.Console/UserSettings.settings b/PokemonGo.RocketAPI.Console/UserSettings.settings
index 9fc3a8f75..dfca3bb06 100644
--- a/PokemonGo.RocketAPI.Console/UserSettings.settings
+++ b/PokemonGo.RocketAPI.Console/UserSettings.settings
@@ -44,5 +44,8 @@
False
+
+ 1
+
\ No newline at end of file
diff --git a/PokemonGo.RocketAPI.Logic/Inventory.cs b/PokemonGo.RocketAPI.Logic/Inventory.cs
index 5503e518c..b9e75d2d7 100644
--- a/PokemonGo.RocketAPI.Logic/Inventory.cs
+++ b/PokemonGo.RocketAPI.Logic/Inventory.cs
@@ -72,7 +72,7 @@ public async Task> GetDuplicatePokemonToTransfer(
p =>
p.OrderByDescending(x => x.Cp)
.ThenBy(n => n.StaminaMax)
- .Skip(1)
+ .Skip(_client.Settings.KeepMinDuplicatePokemon)
.ToList());
}
diff --git a/PokemonGo.RocketAPI/ISettings.cs b/PokemonGo.RocketAPI/ISettings.cs
index 1f3aa2a33..c064e8011 100644
--- a/PokemonGo.RocketAPI/ISettings.cs
+++ b/PokemonGo.RocketAPI/ISettings.cs
@@ -24,6 +24,7 @@ public interface ISettings
bool TransferDuplicatePokemon { get; }
int DelayBetweenPokemonCatch { get; }
bool UsePokemonToNotCatchFilter { get; }
+ int KeepMinDuplicatePokemon { get; }
ICollection> ItemRecycleFilter { get; }
ICollection PokemonsToEvolve { get; }