Commit 1068aae9f0c11fa61c895e480b367390149b06a0

Authored by gaofengduan
1 parent 452d6146

fix diner popularity

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