mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
Fix bug (preexisting in Fortify, new in Rebirth) that zeroed out prices of custom Rewards
This commit is contained in:
parent
79bd322900
commit
6f4427b087
2 changed files with 10 additions and 7 deletions
11
dist/habitrpg-shared.js
vendored
11
dist/habitrpg-shared.js
vendored
|
|
@ -11175,7 +11175,9 @@ var process=require("__browserify_process");(function() {
|
|||
}
|
||||
user.balance--;
|
||||
_.each(user.tasks, function(task) {
|
||||
return task.value = 0;
|
||||
if (task.type(!'reward')) {
|
||||
return task.value = 0;
|
||||
}
|
||||
});
|
||||
user.stats.hp = 50;
|
||||
return cb(null, req);
|
||||
|
|
@ -11190,10 +11192,9 @@ var process=require("__browserify_process");(function() {
|
|||
}
|
||||
user.balance -= 2;
|
||||
_.each(user.tasks, function(task) {
|
||||
return task.value = 0;
|
||||
});
|
||||
_.each(user.tasks, function(task) {
|
||||
task.value = 0;
|
||||
if (task.type(!'reward')) {
|
||||
task.value = 0;
|
||||
}
|
||||
if (task.type === 'daily') {
|
||||
return task.streak = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -397,7 +397,8 @@ api.wrap = (user) ->
|
|||
return cb {code:401,message: "Not enough gems."}, req
|
||||
user.balance--
|
||||
_.each user.tasks, (task) ->
|
||||
task.value = 0
|
||||
if task.type not 'reward'
|
||||
task.value = 0
|
||||
user.stats.hp = 50
|
||||
cb null, req
|
||||
|
||||
|
|
@ -407,7 +408,8 @@ api.wrap = (user) ->
|
|||
user.balance -= 2
|
||||
# Turn tasks yellow, zero out streaks
|
||||
_.each user.tasks, (task) ->
|
||||
task.value = 0
|
||||
if task.type not 'reward'
|
||||
task.value = 0
|
||||
if task.type is 'daily'
|
||||
task.streak = 0
|
||||
# Reset all dynamic stats
|
||||
|
|
|
|||
Loading…
Reference in a new issue