Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a logic error in GetDuplicatePokemonToTransfer & reduced size of GetXpDiff #490

Merged
merged 3 commits into from
Jul 26, 2016

Conversation

5andr0
Copy link
Contributor

@5andr0 5andr0 commented Jul 25, 2016

With KeepPokemonsThatCanEvolve=true it also kept all pokemons that couldn't evolve. Added KeepPokemonsThatCanEvolve to Settings

…f GetXpDiff

With KeepPokemonsThatCanEvolve=true it previously also kept all pokemons
that couldn't evolve. Added KeepPokemonsThatCanEvolve to Settings
continue;
var amountToSkip = _client.Settings.KeepMinDuplicatePokemon;

if (settings.CandyToEvolve > 0 && familyCandy.Candy / settings.CandyToEvolve > amountToSkip)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract familyCandy.Candy / settings.CandyToEvolve out as you use it twice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sry i thought i'd rather save a line..

@maximegmd maximegmd merged commit fb18c88 into NecronomiconCoding:master Jul 26, 2016
if (settings.CandyToEvolve == 0)
continue;
var amountToSkip = _logicClient.Settings.KeepMinDuplicatePokemon;
var amountPossible = familyCandy.Candy / settings.CandyToEvolve;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight snag with a possible divide by zero here by moving it out like this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right the condition that was removed should not have been removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mijanx
Was a little hasty moving it out. Fixed here: 508

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants