HabitRPG/habitrpg-shared — pull request #30 by paglias (2013-10-22 19:51:12+00:00)
Title: Reset lastDrop to zero when day ends

Discussed in https://github.com/HabitRPG/habitrpg/issues/1625#issuecomment-26829372, it resets the lastDrop's count to zero when day ends.

There are a few thing I'm not sure about this that should be checked before merging:

- user.item.lastDrop.count is always defined? I think so because it's defined in User's schema so it doesn't check for user.items.lastDrop.count to be defined
- `paths['items.lastDrop'] = true` is needed for Mongoose to see what has changed? It's ok to use `paths['items.lastDrop'] = true` even though `items.lastDrop.count` only is modified?