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

Wrong level_stats calculation #4553

Closed
Gurzeh opened this issue Aug 22, 2016 · 4 comments
Closed

Wrong level_stats calculation #4553

Gurzeh opened this issue Aug 22, 2016 · 4 comments

Comments

@Gurzeh
Copy link
Contributor

Gurzeh commented Aug 22, 2016

Expected Behavior

at any level, level_stats should show (like the app):
XP earned at the current level / XP to pass next level

Actual Behavior

in fact, level_apps shows (XP previous level + XP earned at the current level) / (XP previous level + XP to pass next level)
Ex: Level 16 is 20.000 and level 17 also, so when it starts, it shows 50% where it should show 0%
Level 16 (20,095 / 40,000, 50%)

Your FULL config.json (remove your username, password, gmapkey and any other private info)

http://pastebin.com/XzFy46Tv

Output when issue occurred

2016-08-22 14:57:34,214 [UpdateLiveStats] [INFO] [log_stats] XXX | Uptime : 0:19:01 | Earned 2,200 Stardust | +4,500 XP | 14,200 XP/h | Visited 15 stops | Level 16 (20,095 / 40,000, 50%)

Other Information

OS: OSX Capitan
Branch: dev
Git Commit: 4f2e976
Python Version: Python 2.7.12

@Gurzeh
Copy link
Contributor Author

Gurzeh commented Aug 22, 2016

The code uses prev_level_xp, but it should use the current_level_xp
For example, if player is at level 11, which is 55,000 reaching level 12 which is 65,000
it should use (experience - 55,000) / (65,000 - 55,000)
where in fact it uses level 9 value 45,000 and calculates (experience - 45,000) / (65,000 - 45,000)

@mjmadsen where can I find some doc on the different api calls? in PokemonGo-Map? or directly in some rep in PokemonGo-Bot project?

@mjmadsen mjmadsen added the Bug label Aug 22, 2016
@mjmadsen
Copy link
Contributor

Sorry, I do not. We could easily hardcore those values - I don't expect them to change much.

@Gurzeh
Copy link
Contributor Author

Gurzeh commented Aug 22, 2016

@mjmadsen Yes, I'm doing it. Will provide a pull request

@mjmadsen
Copy link
Contributor

Merged! If there is a problem with the merge. please create a new issue.

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

No branches or pull requests

3 participants