Commit 687835fcbc42f393b47d1311978a99a4d1f64394
1 parent
6991df1b
fix bug cost
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/actions/DinerAction.lua
... | ... | @@ -46,8 +46,8 @@ function _M.addSellRpc( agent, data ) |
46 | 46 | end |
47 | 47 | |
48 | 48 | local cost = dishData.material:toNumMap() |
49 | - for _, n in pairs(cost) do | |
50 | - n = n * count | |
49 | + for k, n in pairs(cost) do | |
50 | + cost[k] = n * count | |
51 | 51 | end |
52 | 52 | if not role:checkItemEnough(cost) then |
53 | 53 | return 6 | ... | ... |