Commit ac0267d4b45b753f7eef53db122de6e488dfcda5

Authored by liuzujun
2 parents 8437f77c 38b8089d

Merge branch 'tr/bugfix' into tr/bugfix-qa

* tr/bugfix:
  关卡boss活动扫荡累计伤害值不正确bug
  抽卡up_pool判空
  抽卡up失败走全随机,随机池把up角色剔除
  心愿卡池根据心愿单英雄数量调整概率

# Conflicts:
#	src/csvdata
src/actions/ActivityAction.lua
... ... @@ -542,7 +542,7 @@ function _M.startBattleRpc(agent, data)
542 542 bi["bossP"] = (bi["bossP"] or 0) + bi["maxP"] * count
543 543 end
544 544  
545   - bi["sum"] = bi["sum"] + bi["top"]
  545 + bi["sum"] = bi["sum"] + bi["top"] * count
546 546 actData["ticket"] = ticket - num
547 547 actData[id] = bi
548 548 changeFlag = true
... ...
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,15 @@ 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 + 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 895 if not ok then break end
883 896 if oneData[pool_str] > 0 then
884 897 resultPool[itemId] = {oneData[pool_str]} -- itemId, count, 概率
... ...