Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop

dev_chengFeng
jiaoyangna 2020-07-13 16:23:01 +08:00
commit f80ac29435
7 changed files with 33 additions and 11 deletions

View File

@ -820,22 +820,44 @@ function this.SetOneKeyGo()
end
end)
--遍历英雄 去除已上阵英雄
for j = 1, #this.choosedList do
for k, v in ipairs(heros) do
if HeroManager.GetSingleHeroData(v.dynamicId).id== HeroManager.GetSingleHeroData(this.choosedList[j].heroId).id then
-- for j = 1, #this.choosedList do
-- for k, v in ipairs(heros) do
-- if HeroManager.GetSingleHeroData(v.dynamicId).id== HeroManager.GetSingleHeroData(this.choosedList[j].heroId).id then
table.remove(heros,k)
break
-- table.remove(heros,k)
-- break
-- end
-- end
-- end
-- if #heros == 0 then
-- return
-- end
--修改 upHeroSidTable 静态id 存储 有则跳过
local upHeroSidTable = {}
for j = 1, #this.choosedList do
local curSingleherodata = HeroManager.GetSingleHeroData(this.choosedList[j].heroId)
upHeroSidTable[curSingleherodata.id] = curSingleherodata.id
end
for k, v in ipairs(heros) do
local curSingleherodata = HeroManager.GetSingleHeroData(v.dynamicId)
if not upHeroSidTable[curSingleherodata.id] then
-- LogGreen("this.choosedList "..#this.choosedList)
if #this.choosedList < 6 then
for n = 1, #posArr do
-- LogGreen("n posArr[n] "..n.." "..posArr[n])
upHeroSidTable[curSingleherodata.id] = curSingleherodata.id
table.insert(this.choosedList, {heroId = v.dynamicId, position=posArr[n]})
table.remove(posArr,n)
break
end
end
end
end
if #heros == 0 then
return
end
--缺几个空位 就上几个空位
for n = 1, #posArr do
table.insert(this.choosedList, {heroId = heros[n].dynamicId, position=posArr[n]})
end
-- for n = 1, #posArr do
-- table.insert(this.choosedList, {heroId = heros[n].dynamicId, position=posArr[n]})
-- end
this.order=this.order+#posArr
this.SetCardsData()
this.OnClickTabBtn(proId)

Binary file not shown.

Binary file not shown.