fix(api): correct world, cap level

This commit is contained in:
Sabe Jones
2021-03-10 15:36:17 -06:00
parent e3757994b9
commit 96492e5a0e
4 changed files with 12 additions and 3 deletions

View File

@@ -151,6 +151,8 @@ export default {
return;
}
if (this.restoreValues.stats.lvl > 999) this.restoreValues.stats.lvl = 999;
const userChangedLevel = this.restoreValues.stats.lvl !== this.user.stats.lvl;
const userDidNotChangeExp = this.restoreValues.stats.exp === this.user.stats.exp;
if (userChangedLevel && userDidNotChangeExp) this.restoreValues.stats.exp = 0;