diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua b/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua index 3507e51e81..8c2e2715ce 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua @@ -168,9 +168,11 @@ function this.EndLessCarbon() end -- 获取要显示得英雄列表 -function this.GetHeroList() +function this.GetHeroList(_proId) 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 return HeroManager.GetAllHeroDatas() end @@ -179,12 +181,19 @@ end -- 获取一键上阵所需要的英雄列表 function this.GetOneKeyUpHeroList() local heros = {} - local allHeros = this.GetHeroList() - for k, v in ipairs(allHeros) do - local hp = FormationManager.GetFormationHeroHp(this.GetFormationIndex(), v.dynamicId) - if hp > 0 then - table.insert(heros, v) + local allHeros = this.GetHeroList(ProIdConst.All) + + if this.GetFormationIndex() == FormationTypeDef.FORMATION_ENDLESS_MAP then + for k, v in ipairs(allHeros) do + if not v.exist or v.exist ~= 0 then + local hp = FormationManager.GetFormationHeroHp(this.GetFormationIndex(), v.dynamicId) + if hp > 0 then + table.insert(heros, v) + end + end end + else + heros = allHeros end return heros end diff --git a/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua b/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua index 98cc81b71e..2d3fb8d4cd 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua @@ -356,7 +356,7 @@ function this.InitSingleEndlessHero(_msgHeroData) heroData.harmonyGongMing = _msgHeroData.createtype 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 --宝器