mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Dailies reset without causing damage when resting at Inn
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user