From c7991bb0abbfb7f3c9d4470dbefa209f49072e94 Mon Sep 17 00:00:00 2001 From: chenyueqi Date: Wed, 6 Jan 2021 14:29:29 +0800 Subject: [PATCH] 道具开时钟箱,检查箱子够不够 --- src/actions/RoleAction.lua | 1 + 1 file changed, 1 insertion(+), 0 deletions(-) diff --git a/src/actions/RoleAction.lua b/src/actions/RoleAction.lua index db371e2..392f485 100644 --- a/src/actions/RoleAction.lua +++ b/src/actions/RoleAction.lua @@ -640,6 +640,7 @@ function _M.openTimeBoxRpc(agent, data) end if role:getItemCount(costId) < count then return 8 end + if not role:checkItemEnough(costs) then return 9 end role:costItems({[costId] = count}, {log = {desc = "openTimeBox"}}) -- libgit2 0.21.2