【无尽副本】修复无尽副本编队没有人得问题

dev_chengFeng
gaoxin 2021-09-27 14:57:27 +08:00
parent 810614f226
commit 6c50cdfd09
2 changed files with 17 additions and 8 deletions

View File

@ -168,9 +168,11 @@ function this.EndLessCarbon()
end end
-- 获取要显示得英雄列表 -- 获取要显示得英雄列表
function this.GetHeroList() function this.GetHeroList(_proId)
if this.GetFormationIndex() == FormationTypeDef.FORMATION_ENDLESS_MAP then if this.GetFormationIndex() == FormationTypeDef.FORMATION_ENDLESS_MAP then
return EndLessMapManager.GetHeroDataByProperty(ProIdConst.All) local _heros = EndLessMapManager.GetHeroDataByProperty(_proId)
_heros = EndLessMapManager.GetHeroDataByProperty1(_proId,_heros)
return _heros
else else
return HeroManager.GetAllHeroDatas() return HeroManager.GetAllHeroDatas()
end end
@ -179,13 +181,20 @@ end
-- 获取一键上阵所需要的英雄列表 -- 获取一键上阵所需要的英雄列表
function this.GetOneKeyUpHeroList() function this.GetOneKeyUpHeroList()
local heros = {} local heros = {}
local allHeros = this.GetHeroList() local allHeros = this.GetHeroList(ProIdConst.All)
if this.GetFormationIndex() == FormationTypeDef.FORMATION_ENDLESS_MAP then
for k, v in ipairs(allHeros) do for k, v in ipairs(allHeros) do
if not v.exist or v.exist ~= 0 then
local hp = FormationManager.GetFormationHeroHp(this.GetFormationIndex(), v.dynamicId) local hp = FormationManager.GetFormationHeroHp(this.GetFormationIndex(), v.dynamicId)
if hp > 0 then if hp > 0 then
table.insert(heros, v) table.insert(heros, v)
end end
end end
end
else
heros = allHeros
end
return heros return heros
end end

View File

@ -356,7 +356,7 @@ function this.InitSingleEndlessHero(_msgHeroData)
heroData.harmonyGongMing = _msgHeroData.createtype heroData.harmonyGongMing = _msgHeroData.createtype
this.heroDataLists[heroData.dynamicId] = heroData this.heroDataLists[heroData.dynamicId] = heroData
heroData.warPower = 0-- HeroPowerManager.GetHeroPower(heroData.dynamicId)--HeroManager.CalculateHeroAllProValList(1, heroData.dynamicId, false)[HeroProType.WarPower] heroData.warPower = HeroPowerManager.GetHeroPower(heroData.dynamicId)--HeroManager.CalculateHeroAllProValList(1, heroData.dynamicId, false)[HeroProType.WarPower]
end end
--宝器 --宝器