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

Fix crash with upgrade pokemon #5564

Merged
merged 2 commits into from
Sep 20, 2016
Merged

Fix crash with upgrade pokemon #5564

merged 2 commits into from
Sep 20, 2016

Conversation

julienlavergne
Copy link
Contributor

@julienlavergne julienlavergne commented Sep 20, 2016

for i in range(pokemon.level, upgrade_level, 0.5):
upgrade_cost = self.pokemon_upgrade_cost[2 * (i - 1)]
for i in range(int(pokemon.level * 2), int(upgrade_level * 2)):
upgrade_cost = self.pokemon_upgrade_cost[i - 2]
Copy link
Contributor

Choose a reason for hiding this comment

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

what kind of crash is it fixing? I don't see any difference between old and new code - it looks exactly the same (steps are twice as big, but "*2" is omitted when the couner variable is used, so...)

Can you show the logfile with the crash?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You cannot create a range with a decimal step

Copy link
Contributor

@DBa2016 DBa2016 left a comment

Choose a reason for hiding this comment

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

Makes sense for me

Copy link
Contributor

@DeXtroTip DeXtroTip left a comment

Choose a reason for hiding this comment

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

👍

@julienlavergne
Copy link
Contributor Author

need the pull approve stuff otherwise I cannot merge :s. Thank you

@YvesHenri YvesHenri merged commit 8f82b36 into PokemonGoF:dev Sep 20, 2016
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