Commit b3737ad47893b33dfad2f55e45e13bed7e586dcd
Merge branch 'tr/bugfix-qa' into tr/develop
* tr/bugfix-qa: diner 加速错误 修复老月卡用户的月卡id字段
Showing
2 changed files
with
30 additions
and
3 deletions
Show diff stats
src/models/Diner.lua
... | ... | @@ -179,8 +179,13 @@ function Diner:checkDinerTask(typ, count, param1, param2, notNotify) |
179 | 179 | return dirty |
180 | 180 | end |
181 | 181 | |
182 | -function Diner:calSellReward(sell, delta, dishData) | |
182 | +function Diner:calSellReward(sell, delta, dishData, isExpedite) | |
183 | 183 | local reward = sell.reward or "" |
184 | + | |
185 | + if isExpedite then | |
186 | + reward = "" | |
187 | + end | |
188 | + | |
184 | 189 | local popular = 0 |
185 | 190 | if delta <= 0 then |
186 | 191 | return reward, popular |
... | ... | @@ -288,7 +293,7 @@ function Diner:expediteSell(slot) |
288 | 293 | expediteCount = math.floor(expediteTime / sellTime) |
289 | 294 | expediteCount = math.min(expediteCount, sell.count) |
290 | 295 | local lastCount = sell.count - expediteCount |
291 | - local reward, popular = self:calSellReward(sell, expediteCount, dishData) | |
296 | + local reward, popular = self:calSellReward(sell, expediteCount, dishData, true) | |
292 | 297 | local deltaTime = math.floor(expediteTime - sellTime * expediteCount) |
293 | 298 | if expediteCount > 0 then |
294 | 299 | sells[slot].time = sell.time - deltaTime | ... | ... |
src/models/Store.lua
... | ... | @@ -3,7 +3,29 @@ |
3 | 3 | local Store = class("Store", require("shared.ModelBase")) |
4 | 4 | |
5 | 5 | function Store:ctor(properties) |
6 | - Store.super.ctor(self, properties) | |
6 | + Store.super.ctor(self, properties) | |
7 | +end | |
8 | + | |
9 | +function Store:onLoad() | |
10 | + local monEx = self:getProperty("monthCardEx") | |
11 | + local smonEx = self:getProperty("smonthCardEx") | |
12 | + local monId = self:getProperty("monthCardId") | |
13 | + local smonId = self:getProperty("smonthCardId") | |
14 | + local timeNow = skynet.timex() | |
15 | + local flag = false | |
16 | + if monEx > timeNow and monId == 0 then | |
17 | + self:updateProperty({field = "monthCardId", value = 101}) | |
18 | + self:updateProperty({field = "getMailT1", value = 0}) | |
19 | + flag = true | |
20 | + end | |
21 | + if smonEx > timeNow and smonId == 0 then | |
22 | + self:updateProperty({field = "smonthCardId", value = 102}) | |
23 | + self:updateProperty({field = "getMailT2", value = 0}) | |
24 | + flag = true | |
25 | + end | |
26 | + if flag then | |
27 | + self:sendMonthCardEmail() | |
28 | + end | |
7 | 29 | end |
8 | 30 | |
9 | 31 | ActGoodsType = { | ... | ... |