Skip to content

Commit

Permalink
Update zwift_offline.py
Browse files Browse the repository at this point in the history
  • Loading branch information
oldnapalm committed Jan 7, 2024
1 parent 6de55de commit 7c79404
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zwift_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1283,8 +1283,7 @@ def api_users_login():
levels = [x for x in economy_config['cycling_levels'] if x['level'] >= current_level]
if len(levels) > 1 and profile.total_xp > levels[1]['xp']:
offset = profile.total_xp - levels[0]['xp']
levels = [x for x in economy_config['cycling_levels'] if x['xp'] <= profile.total_xp]
transition_end = levels[-1]['level']
transition_end = [x for x in levels if x['xp'] <= profile.total_xp][-1]['level']
for level in economy_config['cycling_levels']:
if level['level'] >= current_level:
level['xp'] += offset
Expand Down

0 comments on commit 7c79404

Please sign in to comment.