mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-14 16:02:14 +00:00
Added exp reset when changing level (#9611)
This commit is contained in:
parent
7797794cd5
commit
c6a3bfb291
1 changed files with 4 additions and 0 deletions
|
|
@ -85,6 +85,10 @@ export default {
|
|||
return;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
this.user.stats = clone(this.restoreValues.stats);
|
||||
this.user.achievements.streak = clone(this.restoreValues.achievements.streak);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue