mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
v3: fix tasks saving and selection for rebirth reroll and reset (server-only)
This commit is contained in:
@@ -13,8 +13,10 @@ module.exports = function reroll (user, tasks = [], req = {}, analytics) {
|
||||
user.stats.hp = 50;
|
||||
|
||||
_.each(tasks, function resetTaskValues (task) {
|
||||
if (task.type !== 'reward') {
|
||||
task.value = 0;
|
||||
if (!task.challenge || !task.challenge.id || task.challenge.broken) {
|
||||
if (task.type !== 'reward') {
|
||||
task.value = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user