Commit cac895e3b3c6cf5e11456c72d47f165a5b36931b

Authored by zhouhaihai
2 parents ea2478f4 43611d57

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

* tr/bugfix:
  抽卡up失败走全随机,随机池把up角色剔除
  心愿卡池根据心愿单英雄数量调整概率

# Conflicts:
#	src/csvdata
Showing 1 changed file with 11 additions and 0 deletions   Show diff stats
src/actions/HeroAction.lua
... ... @@ -853,6 +853,10 @@ function _M.drawHeroRpc(agent, data)
853 853 elseif values[1] == HeroQuality.SSR then
854 854 weight = unitPool["up_ssr_weight"]
855 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 860 end
857 861 --print(poolId, rand_v, weight, up_pool, values[1])
858 862 if rand_v < weight and up_pool then
... ... @@ -879,6 +883,13 @@ function _M.drawHeroRpc(agent, data)
879 883 if heroData[field] ~= values[idx] then ok = false break end
880 884 end
881 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 893 if not ok then break end
883 894 if oneData[pool_str] > 0 then
884 895 resultPool[itemId] = {oneData[pool_str]} -- itemId, count, 概率
... ...