From 6a89ff2037548ed0f8ac659b2ef4e224370b5970 Mon Sep 17 00:00:00 2001 From: chenyueqi <1056825054@qq.com> Date: Thu, 27 Feb 2020 11:54:22 +0800 Subject: [PATCH] 拆解时钟箱消耗的加速道具更改 --- src/GlobalVar.lua | 1 + src/actions/RoleAction.lua | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GlobalVar.lua b/src/GlobalVar.lua index 310aef4..f76dfff 100644 --- a/src/GlobalVar.lua +++ b/src/GlobalVar.lua @@ -95,6 +95,7 @@ ItemId = { LunchFragment = 23, HeroFC = {700, 701, 702, 703}, -- 通用角色碎片 AdvKey = 80, -- 冒险钥匙 + BoxKey = 60, -- 拆解工具 } --客户端不需要知道这个 AdvSpecialStage = { diff --git a/src/actions/RoleAction.lua b/src/actions/RoleAction.lua index af28413..dadbd7d 100644 --- a/src/actions/RoleAction.lua +++ b/src/actions/RoleAction.lua @@ -471,8 +471,8 @@ function _M.openTimeBoxRpc(agent, data) if not quick then return end local cost_pre = globalCsv.box_timeOpen_diamond:toArray(true, "=") local costD = math.ceil((boxL[slot].time - skynet.timex()) / (cost_pre[1] * 60)) * cost_pre[2] - if not role:checkItemEnough({[ItemId.Diamond] = costD}) then return end - role:costItems({[ItemId.Diamond] = costD}) + if not role:checkItemEnough({[ItemId.BoxKey] = costD}) then return end + role:costItems({[ItemId.BoxKey] = costD}) end local itemData = csvdb["itemCsv"][boxL[slot].id] -- libgit2 0.21.2