From 6c50cdfd09d05dd4a19c764a5742707e25d6ddfe Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 27 Sep 2021 14:57:27 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=97=A0=E5=B0=BD=E5=89=AF=E6=9C=AC?= =?UTF-8?q?=E3=80=91=E4=BF=AE=E5=A4=8D=E6=97=A0=E5=B0=BD=E5=89=AF=E6=9C=AC?= =?UTF-8?q?=E7=BC=96=E9=98=9F=E6=B2=A1=E6=9C=89=E4=BA=BA=E5=BE=97=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Formation/View/CarbonFormation.lua | 23 +++++++++++++------ .../~Lua/Modules/Map/EndLessMapManager.lua | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) 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 --宝器