From 848af2cbbe80435c8d0be62b615d0c6c78c10c59 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Fri, 14 May 2021 19:48:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E9=98=B5=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Formation/FormationPanelV2.lua | 2 +- .../Modules/Formation/View/CarbonFormation.lua | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua index e10dc1b157..f5f5ddfb9e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua @@ -270,7 +270,7 @@ end function this.RefreshFormation(isTop,isAni) proId=0 if this.curFormationIndex == FormationTypeDef.FORMATION_ENDLESS_MAP then - EndLessMapManager.RrefreshFormation() + this.opView:RrefreshFormation() end --获取当前编队数据 if this.curFormationIndex == FormationTypeDef.EXPEDITION then diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua b/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua index 535ebff647..0f9918073d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/View/CarbonFormation.lua @@ -17,10 +17,10 @@ function this.Init(root, curMapId) this.root = root this.curMapId = EndLessMapManager.openMapId this.InitView() - end +end +local index = 0 --- 获取需要显示的编队id function this.GetFormationIndex() - local index = 0 if CarbonManager.difficulty == CARBON_TYPE.ENDLESS then index = FormationTypeDef.FORMATION_ENDLESS_MAP else @@ -61,8 +61,17 @@ end -- [3] = 28, -- } -function this.RefreshFormation() - +function this.RrefreshFormation() + local tempList = {} + local curFormation = FormationManager.GetFormationByID(index) + LogGreen("curFormation.teamHeroInfos:"..#curFormation.teamHeroInfos) + for k,v in pairs(curFormation.teamHeroInfos) do + if EndLessMapManager.heroDataLists[v.heroId] then + table.insert(tempList,v) + end + end + LogGreen("#tempList:"..#tempList) + FormationManager.formationList[index].teamHeroInfos = tempList end -- 进入地图