Skip to content

Commit

Permalink
Merge pull request #1089 from Ilses/clean-TransferFilter
Browse files Browse the repository at this point in the history
Remove unnecessary if nesting
  • Loading branch information
Yamashi authored Jul 28, 2016
2 parents 42fbdef + 6ec8aeb commit e0a0631
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions PoGo.NecroBot.Logic/Inventory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,9 @@ public async Task<IEnumerable<PokemonData>> GetPokemonToEvolve(IEnumerable<Pokem

public TransferFilter GetPokemonTransferFilter(PokemonId pokemon)
{
if (_logicSettings.PokemonsTransferFilter != null)
if (_logicSettings.PokemonsTransferFilter != null && _logicSettings.PokemonsTransferFilter.ContainsKey(pokemon))
{
if (_logicSettings.PokemonsTransferFilter.ContainsKey(pokemon))
return _logicSettings.PokemonsTransferFilter[pokemon];
return _logicSettings.PokemonsTransferFilter[pokemon];
}
return new TransferFilter(_logicSettings.KeepMinCp, _logicSettings.KeepMinIvPercentage,
_logicSettings.KeepMinDuplicatePokemon);
Expand Down

0 comments on commit e0a0631

Please sign in to comment.