From cc9f29c5483c1f321ae6acb256d31ea4ed182e87 Mon Sep 17 00:00:00 2001 From: chenyueqi Date: Tue, 26 Jan 2021 16:51:19 +0800 Subject: [PATCH] 拆解术式,可以自主选择加速多长时间 --- src/actions/RoleAction.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actions/RoleAction.lua b/src/actions/RoleAction.lua index dc62c11..c39daec 100644 --- a/src/actions/RoleAction.lua +++ b/src/actions/RoleAction.lua @@ -607,9 +607,9 @@ function _M.openTimeBoxRpc(agent, data) local itemData = csvdb["itemCsv"][itemId] local unitTime = globalCsv.box_key_time[itemId] * 60 if quick then - stopTime = time + globalCsv.box_productLine_time * 3600 + stopTime = nowTime + quick local cost_pre = globalCsv.box_timeOpen_diamond:toArray(true, "=") - local costKey = math.ceil((stopTime - nowTime) / (cost_pre[1] * 60)) * cost_pre[2] + local costKey = math.ceil(quick / (cost_pre[1] * 60)) * cost_pre[2] if not role:checkItemEnough({[ItemId.Diamond] = costKey}) then return 5 end role:costItems({[ItemId.Diamond] = costKey}, {log = {desc = "openTimeBox", int1 = slot, int2 = oper}}) else -- libgit2 0.21.2