Commit 109740971d8ea1c52e735655706947e6f3aea993
1 parent
a1d09d22
fix diner
Showing
2 changed files
with
8 additions
and
5 deletions
Show diff stats
src/actions/DinerAction.lua
@@ -170,11 +170,14 @@ function _M.expediteSellRpc( agent, data ) | @@ -170,11 +170,14 @@ function _M.expediteSellRpc( agent, data ) | ||
170 | if count >= max then | 170 | if count >= max then |
171 | return 1 | 171 | return 1 |
172 | end | 172 | end |
173 | - local cost = {[ItemId.Diamond] = globalCsv.diner_sell_quick_cost[count+1]} | ||
174 | - if not role:checkItemEnough(cost) then | ||
175 | - return 2 | 173 | + local diamond = globalCsv.diner_sell_quick_cost[count] |
174 | + if diamond > 0 then | ||
175 | + local cost = {[ItemId.Diamond] = diamond} | ||
176 | + if not role:checkItemEnough(cost) then | ||
177 | + return 2 | ||
178 | + end | ||
179 | + role:costItems(cost) | ||
176 | end | 180 | end |
177 | - role:costItems(cost) | ||
178 | 181 | ||
179 | local dirty = false | 182 | local dirty = false |
180 | local reward,popular = "",0 | 183 | local reward,popular = "",0 |