From b1b3c0d62def0719e9b44ae96a71fb514b315fe0 Mon Sep 17 00:00:00 2001 From: liuzujun <307836273@qq.com> Date: Mon, 14 Dec 2020 17:35:33 +0800 Subject: [PATCH] 合成道具数量不对bug --- src/actions/HeroAction.lua | 3 +++ 1 file changed, 3 insertions(+), 0 deletions(-) diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index afab15d..8274ca9 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -1092,6 +1092,9 @@ function _M.itemComposeRpc(agent, data) if not config then return 2 end local cost = config.cost:toNumMap() + for k, v in pairs(cost) do + cost[k] = v * count + end if not role:checkItemEnough(cost) then return 2 end role:costItems(cost, {log = {desc = "itemCompose", int1 = itemId, int2 = count}}) role:award({[itemId] = count}, {log = {desc = "itemCompose"}}) -- libgit2 0.21.2