mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-02 20:19:42 +00:00
[https://github.com/HabitRPG/habitrpg/issues/2009] fix restoring
allocatable points on change-class
This commit is contained in:
parent
aef68fdc82
commit
43ce7f11cb
2 changed files with 4 additions and 3 deletions
5
dist/habitrpg-shared.js
vendored
5
dist/habitrpg-shared.js
vendored
|
|
@ -11466,9 +11466,10 @@ var process=require("__browserify_process");(function() {
|
|||
user.balance -= .75;
|
||||
_.merge(user.stats, {
|
||||
str: 0,
|
||||
def: 0,
|
||||
con: 0,
|
||||
per: 0,
|
||||
int: 0
|
||||
int: 0,
|
||||
points: user.stats.lvl
|
||||
});
|
||||
user.flags.classSelected = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -612,7 +612,7 @@ api.wrap = (user) ->
|
|||
# Null ?class value means "reset class"
|
||||
return cb({code:401,message:"Not enough gems"}) unless user.balance >= .75
|
||||
user.balance -= .75
|
||||
_.merge user.stats, {str: 0, def: 0, per: 0, int: 0}
|
||||
_.merge user.stats, {str: 0, con: 0, per: 0, int: 0, points: user.stats.lvl}
|
||||
user.flags.classSelected = false
|
||||
#'stats.points': this is handled on the server
|
||||
cb? null, req
|
||||
|
|
|
|||
Loading…
Reference in a new issue