From 28b5c033b7229ec45c49657ee3fa9f6a941236e8 Mon Sep 17 00:00:00 2001 From: zhouhaihai Date: Tue, 19 May 2020 20:53:08 +0800 Subject: [PATCH] 概率 0 不放入池子 --- src/actions/HeroAction.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index 9993bf0..7c6269d 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -786,7 +786,9 @@ function _M.drawHeroRpc(agent, data) if heroData[field] ~= values[idx] then ok = false break end end if not ok then break end - resultPool[itemId] = {oneData["pool_" .. pool]} -- itemId, count, 概率 + if oneData["pool_" .. pool] > 0 then + resultPool[itemId] = {oneData["pool_" .. pool]} -- itemId, count, 概率 + end break end end @@ -834,7 +836,6 @@ function _M.drawHeroRpc(agent, data) local itemId = math.randWeight(resultPool, 1) local itemData = csvdb["itemCsv"][itemId] - if itemData.quality == 4 then ssrCount = ssrCount + 1 ssrUpCount = 0 -- libgit2 0.21.2