Commit 28b5c033b7229ec45c49657ee3fa9f6a941236e8
1 parent
e51ff6d2
概率 0 不放入池子
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
src/actions/HeroAction.lua
@@ -786,7 +786,9 @@ function _M.drawHeroRpc(agent, data) | @@ -786,7 +786,9 @@ function _M.drawHeroRpc(agent, data) | ||
786 | if heroData[field] ~= values[idx] then ok = false break end | 786 | if heroData[field] ~= values[idx] then ok = false break end |
787 | end | 787 | end |
788 | if not ok then break end | 788 | if not ok then break end |
789 | - resultPool[itemId] = {oneData["pool_" .. pool]} -- itemId, count, 概率 | 789 | + if oneData["pool_" .. pool] > 0 then |
790 | + resultPool[itemId] = {oneData["pool_" .. pool]} -- itemId, count, 概率 | ||
791 | + end | ||
790 | break | 792 | break |
791 | end | 793 | end |
792 | end | 794 | end |
@@ -834,7 +836,6 @@ function _M.drawHeroRpc(agent, data) | @@ -834,7 +836,6 @@ function _M.drawHeroRpc(agent, data) | ||
834 | 836 | ||
835 | local itemId = math.randWeight(resultPool, 1) | 837 | local itemId = math.randWeight(resultPool, 1) |
836 | local itemData = csvdb["itemCsv"][itemId] | 838 | local itemData = csvdb["itemCsv"][itemId] |
837 | - | ||
838 | if itemData.quality == 4 then | 839 | if itemData.quality == 4 then |
839 | ssrCount = ssrCount + 1 | 840 | ssrCount = ssrCount + 1 |
840 | ssrUpCount = 0 | 841 | ssrUpCount = 0 |