Commit cd94902900b99845a0532107a3d6ee3d6e9d8793
1 parent
ef3450bd
合成道具数量不对bug
Showing
2 changed files
with
4 additions
and
1 deletions
Show diff stats
src/actions/HeroAction.lua
... | ... | @@ -1090,6 +1090,9 @@ function _M.itemComposeRpc(agent, data) |
1090 | 1090 | if not config then return 2 end |
1091 | 1091 | |
1092 | 1092 | local cost = config.cost:toNumMap() |
1093 | + for k, v in pairs(cost) do | |
1094 | + cost[k] = v * count | |
1095 | + end | |
1093 | 1096 | if not role:checkItemEnough(cost) then return 2 end |
1094 | 1097 | role:costItems(cost, {log = {desc = "itemCompose", int1 = itemId, int2 = count}}) |
1095 | 1098 | role:award({[itemId] = count}, {log = {desc = "itemCompose"}}) | ... | ... |