Commit ff692d3739601d2fef77d7d49f82ed5d69f6e6ad

Authored by zhouhaihai
1 parent 9f135969

跨月

Showing 1 changed file with 9 additions and 5 deletions   Show diff stats
src/models/RoleTimeReset.lua
@@ -23,6 +23,11 @@ ResetFunc["CrossDay"] = function(self, notify, response, now) @@ -23,6 +23,11 @@ ResetFunc["CrossDay"] = function(self, notify, response, now)
23 end 23 end
24 self:setProperty("advMine", advMine) 24 self:setProperty("advMine", advMine)
25 25
  26 + local ltime = self:getProperty("ltime")
  27 + if isCrossMonth(ltime, now) then
  28 + self.storeData:resetStoreReored(3) --商店跨月重置 time_reset表关联id
  29 + end
  30 +
26 response.dTask = {} 31 response.dTask = {}
27 response.advSup = self:getProperty("advSup") 32 response.advSup = self:getProperty("advSup")
28 self:log("onLogin") 33 self:log("onLogin")
@@ -43,11 +48,8 @@ ResetFunc["CrossWeek"] = function(self, notify, response) @@ -43,11 +48,8 @@ ResetFunc["CrossWeek"] = function(self, notify, response)
43 response.dinerS = {} 48 response.dinerS = {}
44 end 49 end
45 50
  51 +-- 30天 非自然月
46 ResetFunc["CrossMonth"] = function(self, notify, response) 52 ResetFunc["CrossMonth"] = function(self, notify, response)
47 - local ltime = self:getProperty("ltime")  
48 - if isCrossMonth(ltime, skynet.timex()) then  
49 - self.storeData:resetStoreReored(3) --商店跨月重置 time_reset表关联id  
50 - end  
51 end 53 end
52 54
53 55
@@ -91,7 +93,9 @@ function Role:updateTimeReset(now, notify) @@ -91,7 +93,9 @@ function Role:updateTimeReset(now, notify)
91 end 93 end
92 if needResetId[resetId] then 94 if needResetId[resetId] then
93 -- 充值商城购买记录 95 -- 充值商城购买记录
94 - self.storeData:resetStoreReored(resetId) 96 + if resetId ~= TimeReset.CrossMonth then
  97 + self.storeData:resetStoreReored(resetId)
  98 + end
95 end 99 end
96 end 100 end
97 101