From cb8d4368809968ca369fe438087198208f9a46d8 Mon Sep 17 00:00:00 2001 From: chenyueqi Date: Mon, 28 Dec 2020 10:16:48 +0800 Subject: [PATCH] 拆解术式充能的时候领取道具,获得个数计算错误 --- src/actions/RoleAction.lua | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/src/actions/RoleAction.lua b/src/actions/RoleAction.lua index fba220d..d45a499 100644 --- a/src/actions/RoleAction.lua +++ b/src/actions/RoleAction.lua @@ -607,6 +607,8 @@ function _M.openTimeBoxRpc(agent, data) local costKey = math.ceil((stopTime - nowTime) / (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}}) + else + stopTime = math.min(nowTime,time + globalCsv.box_productLine_time * 3600) end role:pushCancel({type = "box", slot = slot}) -- libgit2 0.21.2