Commit cc9f29c5483c1f321ae6acb256d31ea4ed182e87

Authored by chenyueqi
1 parent 279a5773

拆解术式,可以自主选择加速多长时间

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
src/actions/RoleAction.lua
@@ -607,9 +607,9 @@ function _M.openTimeBoxRpc(agent, data) @@ -607,9 +607,9 @@ function _M.openTimeBoxRpc(agent, data)
607 local itemData = csvdb["itemCsv"][itemId] 607 local itemData = csvdb["itemCsv"][itemId]
608 local unitTime = globalCsv.box_key_time[itemId] * 60 608 local unitTime = globalCsv.box_key_time[itemId] * 60
609 if quick then 609 if quick then
610 - stopTime = time + globalCsv.box_productLine_time * 3600 610 + stopTime = nowTime + quick
611 local cost_pre = globalCsv.box_timeOpen_diamond:toArray(true, "=") 611 local cost_pre = globalCsv.box_timeOpen_diamond:toArray(true, "=")
612 - local costKey = math.ceil((stopTime - nowTime) / (cost_pre[1] * 60)) * cost_pre[2] 612 + local costKey = math.ceil(quick / (cost_pre[1] * 60)) * cost_pre[2]
613 if not role:checkItemEnough({[ItemId.Diamond] = costKey}) then return 5 end 613 if not role:checkItemEnough({[ItemId.Diamond] = costKey}) then return 5 end
614 role:costItems({[ItemId.Diamond] = costKey}, {log = {desc = "openTimeBox", int1 = slot, int2 = oper}}) 614 role:costItems({[ItemId.Diamond] = costKey}, {log = {desc = "openTimeBox", int1 = slot, int2 = oper}})
615 else 615 else