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 -- 进入地图