Merge branch 'api-v3' of github.com:HabitRPG/habitrpg into api-v3

This commit is contained in:
Matteo Pagliazzi
2016-05-18 15:30:46 +02:00
5 changed files with 56 additions and 30 deletions
+1
View File
@@ -194,6 +194,7 @@ module.exports = function scoreTask (options = {}, req = {}) {
}
_gainMP(user, _.max([0.25, 0.0025 * user._statsComputed.maxMP]) * (direction === 'down' ? -1 : 1));
task.history = task.history || [];
// Add history entry, even more than 1 per day
task.history.push({
date: Number(new Date()),