From 6c5eae184794fdab98d7a7b642d2c7bd5b06aefe Mon Sep 17 00:00:00 2001 From: Alice Harris Date: Sun, 5 Jan 2014 19:46:27 +1000 Subject: [PATCH] fix(?) for issue 2222 - untick removes too little XP,GP This is a proposed fix for issue 2222 ("unticking a todo with a checklist removes much less XP and GP than it should") BUT I HAVE NOT TESTED THIS (I don't have a local install yet - sorry). Please see my comments at the end of that issue. Note that I don't know why "if direction is 'up'" was originally included - there might have been (and still be) a good reason for it. --- script/index.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/index.coffee b/script/index.coffee index dba7777b9e..7509fd0980 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -743,7 +743,7 @@ api.wrap = (user) -> if direction is 'down' and task.type is 'daily' and options.cron nextDelta *= (1 - _.reduce(task.checklist,((m,i)->m+(if i.completed then 1 else 0)),0) / task.checklist.length) # If To-Do, point-match the TD per checklist item - if direction is 'up' and task.type is 'todo' + if task.type is 'todo' nextDelta *= task.checklist.length unless task.type is 'reward'