Commit 1068aae9f0c11fa61c895e480b367390149b06a0
1 parent
452d6146
fix diner popularity
Showing
2 changed files
with
4 additions
and
1 deletions
Show diff stats
src/models/Diner.lua
... | ... | @@ -169,6 +169,9 @@ function Diner:updateSell(slot, calOnly) |
169 | 169 | local deltaCount = 0 |
170 | 170 | local timePass = skynet.timex() - sell.time |
171 | 171 | local sellTime = dishData.sell_time |
172 | + if slot.hot then | |
173 | + sellTime = sellTime * dishData.popularity | |
174 | + end | |
172 | 175 | |
173 | 176 | deltaCount = math.floor(timePass / sellTime) |
174 | 177 | if deltaCount < sell.count then | ... | ... |