From 974a84001676b69bd7b3255ff416b4e724f3ac39 Mon Sep 17 00:00:00 2001 From: Sepero Date: Sun, 16 Mar 2014 10:22:58 -0400 Subject: [PATCH] Fix day start max hour A 24 hour clock goes from 0 to 23. A friend of mine plays your game and referred me to your "dailies" bounty. This probably won't fix that issue, but I'll submit anyway. :) --- src/models/user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/user.js b/src/models/user.js index 9831b54158..af791402d2 100644 --- a/src/models/user.js +++ b/src/models/user.js @@ -233,7 +233,7 @@ var UserSchema = new Schema({ }, preferences: { armorSet: String, - dayStart: {type:Number, 'default': 0, min: 0, max: 24}, + dayStart: {type:Number, 'default': 0, min: 0, max: 23}, size: {type:String, enum: ['broad','slim'], 'default': 'broad'}, hair: { color: {type: String, 'default': 'blond'}, @@ -354,7 +354,7 @@ UserSchema.pre('save', function(next) { } //this.markModified('tasks'); - if (_.isNaN(this.preferences.dayStart) || this.preferences.dayStart < 0 || this.preferences.dayStart > 24) { + if (_.isNaN(this.preferences.dayStart) || this.preferences.dayStart < 0 || this.preferences.dayStart > 23) { this.preferences.dayStart = 0; }