无尽提交
parent
35d0927881
commit
7baad945bf
|
@ -523,8 +523,8 @@ function this.OnClickTabBtn(_proId, isTop,isAni)
|
||||||
heros = ExpeditionManager.GetHeroDataByProperty(heros,_proId, limitLevel)
|
heros = ExpeditionManager.GetHeroDataByProperty(heros,_proId, limitLevel)
|
||||||
end
|
end
|
||||||
elseif this.curFormationIndex == FormationTypeDef.FORMATION_ENDLESS_MAP then
|
elseif this.curFormationIndex == FormationTypeDef.FORMATION_ENDLESS_MAP then
|
||||||
heros = EndLessMapManager.GetHeroDataByProperty(_proId, limitLevel)
|
heros = EndLessMapManager.GetHeroDataByProperty(_proId)
|
||||||
heros = EndLessMapManager.GetHeroDataByProperty1(_proId, limitLevel,heros)
|
heros = EndLessMapManager.GetHeroDataByProperty1(_proId,heros)
|
||||||
elseif this.curFormationIndex == FormationTypeDef.FIGHT_ASSISTANTLEVEL then--山河社稷图副官卡
|
elseif this.curFormationIndex == FormationTypeDef.FIGHT_ASSISTANTLEVEL then--山河社稷图副官卡
|
||||||
if _proId == ProIdConst.All then
|
if _proId == ProIdConst.All then
|
||||||
heros = FightLevelManager.GetAllHeroDatas(limitLevel,parameter)--parameter 山河社稷图小关卡数据
|
heros = FightLevelManager.GetAllHeroDatas(limitLevel,parameter)--parameter 山河社稷图小关卡数据
|
||||||
|
@ -1020,7 +1020,7 @@ function this.SetOneKeyCarBonGo()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local heros = HeroManager.GetAllHeroDatas(limitLevel)
|
local heros = EndLessMapManager.GetHeroDataByProperty(0)
|
||||||
--按战力从大到小排序
|
--按战力从大到小排序
|
||||||
table.sort(heros,function(a,b)
|
table.sort(heros,function(a,b)
|
||||||
if a.warPower == b.warPower then
|
if a.warPower == b.warPower then
|
||||||
|
|
|
@ -504,25 +504,23 @@ function this.GetCanUseHeroDatas()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.GetHeroDataByProperty(_proId, limitLevel)
|
function this.GetHeroDataByProperty(_proId)
|
||||||
this.GetCanUseHeroDatas()
|
this.GetCanUseHeroDatas()
|
||||||
local heros = {}
|
local heros = {}
|
||||||
local index = 1
|
local index = 1
|
||||||
if this.canUseHeroDatas then
|
if this.canUseHeroDatas then
|
||||||
for i, v in pairs(this.canUseHeroDatas) do
|
for i, v in pairs(this.canUseHeroDatas) do
|
||||||
if v.property == _proId or _proId == 0 then
|
if v.property == _proId or _proId == 0 then
|
||||||
if v.lv >= limitLevel then
|
|
||||||
heros[index] = v
|
heros[index] = v
|
||||||
heros[index].exist = 1
|
heros[index].exist = 1
|
||||||
index = index + 1
|
index = index + 1
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return heros
|
return heros
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.GetHeroDataByProperty1(_proId, limitLevel,_heros)
|
function this.GetHeroDataByProperty1(_proId,_heros)
|
||||||
local index = 0
|
local index = 0
|
||||||
for i, v in pairs(this.heroDataLists) do
|
for i, v in pairs(this.heroDataLists) do
|
||||||
local isExist = false
|
local isExist = false
|
||||||
|
@ -532,7 +530,7 @@ function this.GetHeroDataByProperty1(_proId, limitLevel,_heros)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not isExist then
|
if not isExist and (v.property == _proId or _proId == 0) then
|
||||||
index = #_heros + 1
|
index = #_heros + 1
|
||||||
_heros[index] = v
|
_heros[index] = v
|
||||||
_heros[index].exist = 0
|
_heros[index].exist = 0
|
||||||
|
@ -548,7 +546,7 @@ function this.InitHeroHp(msg, func)
|
||||||
if msg and #msg.heroInfo > 0 then
|
if msg and #msg.heroInfo > 0 then
|
||||||
for i = 1, #msg.heroInfo do
|
for i = 1, #msg.heroInfo do
|
||||||
local heroData = msg.heroInfo[i]
|
local heroData = msg.heroInfo[i]
|
||||||
|
|
||||||
local allEquipAddProVal= HeroManager.CalculateWarAllProVal(heroData.heroId)
|
local allEquipAddProVal= HeroManager.CalculateWarAllProVal(heroData.heroId)
|
||||||
local maxHp = allEquipAddProVal[3]
|
local maxHp = allEquipAddProVal[3]
|
||||||
local hp = heroData.hp / 10000
|
local hp = heroData.hp / 10000
|
||||||
|
|
Loading…
Reference in New Issue