From 064ca7159473981fb84adb48508b5e8c093462d7 Mon Sep 17 00:00:00 2001 From: liuzujun <307836273@qq.com> Date: Tue, 12 Jan 2021 14:29:22 +0800 Subject: [PATCH] 抽卡up_pool判空 --- src/actions/HeroAction.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index 49a0ab2..5e30f38 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -884,10 +884,12 @@ function _M.drawHeroRpc(agent, data) end end -- 随机剔除up池中的角色 - for k, v in ipairs(up_pool) do - if v == itemData.id then - ok = false - break + if up_pool then + for k, v in ipairs(up_pool) do + if v == itemData.id then + ok = false + break + end end end if not ok then break end -- libgit2 0.21.2