Commit c60a8b9ba9e2e4182abfb035da1231be37c56b74
1 parent
54f63c13
diner 加速错误
Showing
1 changed file
with
7 additions
and
2 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 | ... | ... |