From f0f68ce5d18ff93c59b8e4d6402a1cfebccfc179 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Thu, 23 May 2013 17:33:04 +0100 Subject: [PATCH] bug fix to todos v cron --- script/algos.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/script/algos.coffee b/script/algos.coffee index bee4e2b0d5..e26ad8c20d 100644 --- a/script/algos.coffee +++ b/script/algos.coffee @@ -65,8 +65,7 @@ obj.hpModifier = (value, armorDef, helmDef, shieldDef, level, priority = '!') -> obj.gpModifier = (value, modifier, priority = '!', streak, user) -> val = value * modifier * obj.priorityValue(priority) if streak and user - streakBonus = streak / 100 + 1 - # eg, 1-day streak is 1.1, 2-day is 1.2, etc + streakBonus = streak / 100 + 1 # eg, 1-day streak is 1.1, 2-day is 1.2, etc afterStreak = val * streakBonus (user._tmp?={}).streakBonus = afterStreak - val if (val > 0) # keep this on-hand for later, so we can notify streak-bonus return afterStreak @@ -224,7 +223,7 @@ obj.score = (user, task, direction, options={}) -> paths["tasks.#{task.id}.streak"] = true when 'todo' - if cron? #cron + if cron calculateDelta() #don't touch stats on cron else