Commit 70159459580f748a64fce1a3ea35ba99ebd61f3d

Authored by zhouhaihai
2 parents 12529366 43611d57

Merge branch 'tr/bugfix' into tr/publish/ts

* tr/bugfix:
  抽卡up失败走全随机,随机池把up角色剔除
  心愿卡池根据心愿单英雄数量调整概率
Showing 2 changed files with 12 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,13 @@ function _M.drawHeroRpc(agent, data) @@ -879,6 +883,13 @@ 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 + for k, v in ipairs(up_pool) do
  888 + if v == itemData.id then
  889 + ok = false
  890 + break
  891 + end
  892 + end
882 if not ok then break end 893 if not ok then break end
883 if oneData[pool_str] > 0 then 894 if oneData[pool_str] > 0 then
884 resultPool[itemId] = {oneData[pool_str]} -- itemId, count, 概率 895 resultPool[itemId] = {oneData[pool_str]} -- itemId, count, 概率
1 -Subproject commit 5963ca5e80ac32e27cadf4c2553f1f24af8d9435 1 +Subproject commit fb22d12670f863528582d09b9499198350902990