diff --git a/src/models/Role.lua b/src/models/Role.lua index 5b6061b..a7bc281 100644 --- a/src/models/Role.lua +++ b/src/models/Role.lua @@ -29,6 +29,13 @@ function Role:ctor( properties ) self.activity = nil self.advElChapter = tonum(redisproxy:hget("adv_season", "chapter"), globalCsv.adv_endless_default_chapter) -- 无尽模式记录的赛季对应章节 self.advOverTime = tonum(redisproxy:hget("adv_season", "overTime")) -- 无尽模式关闭时间戳 + if self.advOverTime == 0 then + local now = skynet.timex() + if math.floor(now / (3600 * 24 * 7)) % 2 == 1 then + self.advOverTime = 3600 * 24 * 7 + end + self.advOverTime = self.advOverTime + specMonday(now) + 3600 * 24 * 6 + end self.sendMailFlag = false --发送邮件标识 end diff --git a/src/utils/CommonFunc.lua b/src/utils/CommonFunc.lua index 96a0f87..b7e2798 100644 --- a/src/utils/CommonFunc.lua +++ b/src/utils/CommonFunc.lua @@ -219,7 +219,7 @@ function specMonday(now) local wday = (tm.wday + 6) % 7 if wday == 0 then wday = 7 end - local time = os.time({year = tm.year, month = tm.month, day = tm.day}) + local time = os.time({year = tm.year, month = tm.month, day = tm.day, hour = RESET_TIME}) return time - (wday - 1) * 86400 end -- libgit2 0.21.2