无尽提交

dev_chengFeng
jiaoyangna 2021-05-26 22:14:17 +08:00
parent 35d0927881
commit 7baad945bf
2 changed files with 7 additions and 9 deletions

View File

@ -523,8 +523,8 @@ function this.OnClickTabBtn(_proId, isTop,isAni)
heros = ExpeditionManager.GetHeroDataByProperty(heros,_proId, limitLevel)
end
elseif this.curFormationIndex == FormationTypeDef.FORMATION_ENDLESS_MAP then
heros = EndLessMapManager.GetHeroDataByProperty(_proId, limitLevel)
heros = EndLessMapManager.GetHeroDataByProperty1(_proId, limitLevel,heros)
heros = EndLessMapManager.GetHeroDataByProperty(_proId)
heros = EndLessMapManager.GetHeroDataByProperty1(_proId,heros)
elseif this.curFormationIndex == FormationTypeDef.FIGHT_ASSISTANTLEVEL then--山河社稷图副官卡
if _proId == ProIdConst.All then
heros = FightLevelManager.GetAllHeroDatas(limitLevel,parameter)--parameter 山河社稷图小关卡数据
@ -1020,7 +1020,7 @@ function this.SetOneKeyCarBonGo()
return
end
local heros = HeroManager.GetAllHeroDatas(limitLevel)
local heros = EndLessMapManager.GetHeroDataByProperty(0)
--按战力从大到小排序
table.sort(heros,function(a,b)
if a.warPower == b.warPower then

View File

@ -504,25 +504,23 @@ function this.GetCanUseHeroDatas()
end
end
function this.GetHeroDataByProperty(_proId, limitLevel)
function this.GetHeroDataByProperty(_proId)
this.GetCanUseHeroDatas()
local heros = {}
local index = 1
if this.canUseHeroDatas then
for i, v in pairs(this.canUseHeroDatas) do
if v.property == _proId or _proId == 0 then
if v.lv >= limitLevel then
heros[index] = v
heros[index].exist = 1
index = index + 1
end
end
end
end
return heros
end
function this.GetHeroDataByProperty1(_proId, limitLevel,_heros)
function this.GetHeroDataByProperty1(_proId,_heros)
local index = 0
for i, v in pairs(this.heroDataLists) do
local isExist = false
@ -532,7 +530,7 @@ function this.GetHeroDataByProperty1(_proId, limitLevel,_heros)
break
end
end
if not isExist then
if not isExist and (v.property == _proId or _proId == 0) then
index = #_heros + 1
_heros[index] = v
_heros[index].exist = 0
@ -548,7 +546,7 @@ function this.InitHeroHp(msg, func)
if msg and #msg.heroInfo > 0 then
for i = 1, #msg.heroInfo do
local heroData = msg.heroInfo[i]
local allEquipAddProVal= HeroManager.CalculateWarAllProVal(heroData.heroId)
local maxHp = allEquipAddProVal[3]
local hp = heroData.hp / 10000