玉虚论道 战斗记录添加空判断

dev_chengFeng
xuexinpeng 2021-10-19 19:06:12 +08:00
parent 7a9cdc15b2
commit c1483a7438
1 changed files with 17 additions and 14 deletions

View File

@ -155,11 +155,11 @@ function this.RankNodeAdapter(node, data,index)
local heroTeam={}
heroTeam.team={}
heroTeam.totalForce=msg.recordData.yxldMyForce[i]
LogError("myforce=="..msg.recordData.yxldMyForce[i])
--LogError("myforce=="..msg.recordData.yxldMyForce[i])
local enTeam={}
enTeam.team={}
enTeam.totalForce=msg.recordData.yxldDefForce[i]
LogError("en force=="..msg.recordData.yxldDefForce[i])
--LogError("en force=="..msg.recordData.yxldDefForce[i])
for i = 1, #fightData.heroFightInfos.fightUnitList do
local hero=fightData.heroFightInfos.fightUnitList[i]
local newHero={}
@ -172,18 +172,21 @@ function this.RankNodeAdapter(node, data,index)
newHero.skinId=hero.skinId
table.insert(heroTeam.team,newHero)
end
for i = 1, #fightData.monsterList[1].fightUnitList do
local hero=fightData.monsterList[1].fightUnitList[i]
local newHero={}
newHero.heroTid=tonumber(hero.unitId)
local pro=string.split(hero.property,"#")
newHero.level=pro[1]
newHero.heroid=hero.realId
newHero.star=hero.star
newHero.position=hero.position
newHero.skinId=hero.skinId
table.insert(enTeam.team,newHero)
end
if fightData.monsterList[1] then
for i = 1, #fightData.monsterList[1].fightUnitList do
local hero=fightData.monsterList[1].fightUnitList[i]
local newHero={}
newHero.heroTid=tonumber(hero.unitId)
local pro=string.split(hero.property,"#")
newHero.level=pro[1]
newHero.heroid=hero.realId
newHero.star=hero.star
newHero.position=hero.position
newHero.skinId=hero.skinId
table.insert(enTeam.team,newHero)
end
end
table.insert(allHeroTeam,heroTeam)
table.insert(allEnTeam,enTeam)
-- allHeroTeam[i]=heroTeam