Commit 120c809d323851eabe064d71a49b5ea0de5b3a5b
Merge branch 'master' of 120.26.43.151:wasteland/server
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 |