Dailies reset without causing damage when resting at Inn

This commit is contained in:
hairlessbear
2015-04-23 20:12:29 -04:00
parent 523582f870
commit de8facd58e

View File

@@ -1483,10 +1483,11 @@ api.wrap = (user, main=true) ->
_.merge plan.consecutive, {count:0, offset:0, gemCapExtra:0} _.merge plan.consecutive, {count:0, offset:0, gemCapExtra:0}
user.markModified? 'purchased.plan' user.markModified? 'purchased.plan'
# User is resting at the inn. Used to be we un-checked each daily without performing calculation (see commits before fb29e35) # User is resting at the inn. On cron, buffs are cleared and each daily is unchecked without performing damage (fixes issue #5070)
# but to prevent abusing the inn (http://goo.gl/GDb9x) we now do *not* calculate dailies, and simply set lastCron to today
if user.preferences.sleep is true if user.preferences.sleep is true
user.stats.buffs = clearBuffs user.stats.buffs = clearBuffs
user.dailys.forEach (daily) ->
daily.completed = false
return return
# Tally each task # Tally each task