Commit 7e0c639e743f4bba75a9ffbc348ce9b25327c2c0
Merge branch 'tr/bugfix' into tr/publish/preview
Showing
2 changed files
with
14 additions
and
1 deletions
Show diff stats
src/actions/HeroAction.lua
@@ -853,6 +853,10 @@ function _M.drawHeroRpc(agent, data) | @@ -853,6 +853,10 @@ function _M.drawHeroRpc(agent, data) | ||
853 | elseif values[1] == HeroQuality.SSR then | 853 | elseif values[1] == HeroQuality.SSR then |
854 | weight = unitPool["up_ssr_weight"] | 854 | weight = unitPool["up_ssr_weight"] |
855 | up_pool = unitPool["up_ssr_id"] | 855 | up_pool = unitPool["up_ssr_id"] |
856 | + if btype == 5 then | ||
857 | + local wishPool = role:getProperty("wishPool") or {} | ||
858 | + weight = weight * #wishPool | ||
859 | + end | ||
856 | end | 860 | end |
857 | --print(poolId, rand_v, weight, up_pool, values[1]) | 861 | --print(poolId, rand_v, weight, up_pool, values[1]) |
858 | if rand_v < weight and up_pool then | 862 | if rand_v < weight and up_pool then |
@@ -879,6 +883,15 @@ function _M.drawHeroRpc(agent, data) | @@ -879,6 +883,15 @@ function _M.drawHeroRpc(agent, data) | ||
879 | if heroData[field] ~= values[idx] then ok = false break end | 883 | if heroData[field] ~= values[idx] then ok = false break end |
880 | end | 884 | end |
881 | end | 885 | end |
886 | + -- 随机剔除up池中的角色 | ||
887 | + if up_pool then | ||
888 | + for k, v in ipairs(up_pool) do | ||
889 | + if v == itemData.id then | ||
890 | + ok = false | ||
891 | + break | ||
892 | + end | ||
893 | + end | ||
894 | + end | ||
882 | if not ok then break end | 895 | if not ok then break end |
883 | if oneData[pool_str] > 0 then | 896 | if oneData[pool_str] > 0 then |
884 | resultPool[itemId] = {oneData[pool_str]} -- itemId, count, 概率 | 897 | resultPool[itemId] = {oneData[pool_str]} -- itemId, count, 概率 |