tehp / OpenPoGoWeb

Web View for OpenPoGoBot
77 stars 58 forks source link

[FIX] Experience Bar #126

Closed FilipiMor closed 8 years ago

FilipiMor commented 8 years ago

The bar was showing "(total_experience/next_level_xp) * 100". That is, "nonsense", it would always show almost full. Now it's fixed, ((total_experience - current_level_xp) / next_level_xp) * 100

Also changed the way next level exp need is show, can remove if needed.

BobbyWibowo commented 8 years ago

In my version I only store an array of the required EXP to level up from a certain level to the next level. Then it simply uses loop to calculate total required EXPs from the array. Thus the array ends up only eating 6 lines. (ref: https://github.com/BobbyWibowo/OpenPoGoWeb/blob/wchill/refactor/js/main.js line 45)

FilipiMor commented 8 years ago

Perfect, I haven't checked that branch, sorry.

BobbyWibowo commented 8 years ago

That's actually my personal build, which I'm not going to submit to this repo since it's kinda too heavily modified. I linked that as an improvement suggestion since you're making a PR.

Reaver01 commented 8 years ago

👍

Approved with PullApprove

MaxLeiter commented 8 years ago

:+1: thanks!

Approved with PullApprove