【轩辕宝镜】修复如果玩家有两个相同的战力较高的神将,会导致少上阵一个位置的问题
parent
671de83349
commit
e39bbe2dc1
|
@ -72,9 +72,11 @@ function this.GetOneKeyUpHeroList()
|
|||
-- 限制数量
|
||||
local upList = {}
|
||||
for k, v in ipairs(tempHeros) do
|
||||
if #heros < rulesNum then
|
||||
table.insert(heros, v)
|
||||
upList[v.dynamicId] = 1
|
||||
if not upList[v.heroConfig.Id] then
|
||||
if #heros < rulesNum then
|
||||
table.insert(heros, v)
|
||||
upList[v.heroConfig.Id] = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
-- 所有英雄,按战力补位
|
||||
|
@ -87,7 +89,7 @@ function this.GetOneKeyUpHeroList()
|
|||
end
|
||||
end)
|
||||
for k, v in ipairs(allHeros) do
|
||||
if not upList[v.dynamicId] then
|
||||
if not upList[v.heroConfig.Id] then
|
||||
if #heros < 6 then
|
||||
table.insert(heros, v)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue