fix(stats): bump level cap to 9999 and related corrections

This commit is contained in:
Sabe Jones
2021-03-11 16:44:34 -06:00
parent d7aa448676
commit d2795f3ac9
7 changed files with 19 additions and 5 deletions

View File

@@ -115,6 +115,7 @@ import { toNextLevel } from '@/../../common/script/statHelpers';
import { shouldDo } from '@/../../common/script/cron';
import { onOnboardingComplete } from '@/../../common/script/libs/onboarding';
import { mapState } from '@/libs/store';
import { MAX_LEVEL_HARD_CAP } from '@/../../common/script/constants';
import notifications from '@/mixins/notifications';
import guide from '@/mixins/guide';
@@ -651,7 +652,7 @@ export default {
const lvlUps = afterLvl - beforeLvl;
let exp = afterExp - beforeExp;
if (lvlUps > 0) {
if (lvlUps > 0 || afterLvl >= MAX_LEVEL_HARD_CAP) {
let level = Math.trunc(beforeLvl);
exp += toNextLevel(level);