Commit c7991bb0abbfb7f3c9d4470dbefa209f49072e94
1 parent
5b4db3a3
道具开时钟箱,检查箱子够不够
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
src/actions/RoleAction.lua
@@ -640,6 +640,7 @@ function _M.openTimeBoxRpc(agent, data) | @@ -640,6 +640,7 @@ function _M.openTimeBoxRpc(agent, data) | ||
640 | end | 640 | end |
641 | 641 | ||
642 | if role:getItemCount(costId) < count then return 8 end | 642 | if role:getItemCount(costId) < count then return 8 end |
643 | + if not role:checkItemEnough(costs) then return 9 end | ||
643 | 644 | ||
644 | role:costItems({[costId] = count}, {log = {desc = "openTimeBox"}}) | 645 | role:costItems({[costId] = count}, {log = {desc = "openTimeBox"}}) |
645 | 646 |