From 4b2259d65ad43599643d8e1b6943686dee5295bb Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Thu, 20 May 2021 16:46:26 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=B1=B1=E6=B2=B3=E7=A4=BE=E7=A8=B7?= =?UTF-8?q?=E5=9B=BE=E3=80=91=E5=8A=A0=E5=89=AF=E5=85=B3=E5=8D=A1=E7=BC=96?= =?UTF-8?q?=E9=98=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Common/GlobalDefine.lua | 3 ++- .../Modules/FightLevel/FightLevelManager.lua | 15 ++++++++++----- .../~Lua/Modules/Formation/FormationManager.lua | 2 ++ .../~Lua/Modules/Formation/FormationPanelV2.lua | 12 ++++++------ .../Formation/View/FightLevelFormation.lua | 17 ++++++++++++++--- 5 files changed, 34 insertions(+), 15 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index d5df88b97d..04e0ffba9e 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -1685,7 +1685,8 @@ FormationTypeDef = { MAGIC_MIRROR = 1403, --妖 TAOIST_MIRROR = 1404, --道 GUILD_TRANSCRIPT = 1501, --公会副本 - FIGHT_LEVEL = 1701, --山河社稷图 + FIGHT_LEVEL = 1701, --山河社稷图主关卡编队 + FIGHT_ASSISTANTLEVEL = 1801, --山河社稷图副主关卡编队 } --编队需要拉取主线 diff --git a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua index b495988446..8ec19d6b01 100644 --- a/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/FightLevel/FightLevelManager.lua @@ -147,7 +147,13 @@ local HardStageFightResponseMsg = {} local curBattlefightLevelData = {} function this.FightLevelFightBattle(_fightLevelData, callBack) UIManager.ClosePanel(UIName.FightLevelSingleLevelInfoPopup) - NetManager.HardStageFightRequest(_fightLevelData.nodeId, FormationTypeDef.FIGHT_LEVEL,function (msg)--FIGHT_LEVEL + local curFormationTypeDef = FormationTypeDef.FIGHT_LEVEL + if _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then + curFormationTypeDef = FormationTypeDef.FIGHT_LEVEL + else + curFormationTypeDef = FormationTypeDef.FIGHT_ASSISTANTLEVEL + end + NetManager.HardStageFightRequest(_fightLevelData.nodeId, curFormationTypeDef,function (msg)--FIGHT_LEVEL LogYellow("山河社稷图回复战斗 星级 "..msg.stars.." drop "..#msg.drop.itemlist) HardStageFightResponseMsg = msg curBattlefightLevelData = _fightLevelData @@ -251,13 +257,12 @@ function this.GetHeroDataByProperty(_proId, limitLevel,parameter) end end function this.RrefreshFormation(parameter) - -- 死人后重组 local newFormation = {} -- 编队界面的编队数据 - local curTeam = FormationManager.GetFormationByID(FormationTypeDef.FIGHT_LEVEL) + local curTeam = FormationManager.GetFormationByID(FormationTypeDef.FIGHT_ASSISTANTLEVEL) -- 编队界面的数据 newFormation.teamHeroInfos = {} newFormation.teamPokemonInfos = {} - newFormation.teamId = FormationTypeDef.FIGHT_LEVEL + newFormation.teamId = FormationTypeDef.FIGHT_ASSISTANTLEVEL newFormation.teamName = curTeam.teamName newFormation.teamPokemonInfos = curTeam.teamPokemonInfos -- 成员数据 @@ -283,7 +288,7 @@ function this.RrefreshFormation(parameter) end end if HardStageBuff[parameter.config.HardStageBuff].Type == 100 or HardStageBuff[parameter.config.HardStageBuff].Type == 101 then - FormationManager.formationList[FormationTypeDef.FIGHT_LEVEL] = newFormation + FormationManager.formationList[FormationTypeDef.FIGHT_ASSISTANTLEVEL] = newFormation end end end diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua index e41b45a650..064fbf4f01 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua @@ -39,6 +39,8 @@ function this.MakeAEmptyTeam(teamId) oTeam.teamName = Language[10678]-- 1301 elseif teamId == FormationTypeDef.FIGHT_LEVEL then oTeam.teamName = "山河社稷图"-- 1701 + elseif teamId == FormationTypeDef.FIGHT_ASSISTANTLEVEL then + oTeam.teamName = "山河社稷图"-- 1701 end oTeam.teamHeroInfos = {} oTeam.teamPokemonInfos = {} diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua index 764e8233e0..9c2351448c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua @@ -35,7 +35,7 @@ local tempPowerNum=0 --临时战力 -- local liveNames={}--立绘名容器 local panelType - +local parameter --透传参数 local tabsImg = {"z_icon_01_zh", "r_hero_huo 1_zh", "r_hero_feng 1_zh", "r_hero_shui 1_zh", "r_hero_dadi 1_zh"} -- 各个类型编队系统逻辑列表 this.PanelOptionView = { @@ -283,7 +283,7 @@ function this.RefreshFormation(isTop,isAni) EndLessMapManager.RrefreshFormation() elseif this.curFormationIndex == FormationTypeDef.EXPEDITION then ExpeditionManager.ExpeditionRrefreshFormation()--刷新编队 - elseif this.curFormationIndex == FormationTypeDef.FIGHT_LEVEL then + elseif this.curFormationIndex == FormationTypeDef.FIGHT_ASSISTANTLEVEL then FightLevelManager.RrefreshFormation(parameter)--刷新编队 end curFormation = FormationManager.GetFormationByID(this.curFormationIndex) @@ -519,7 +519,7 @@ function this.OnClickTabBtn(_proId, isTop,isAni) heros = HeroManager.GetHeroDataByProperty(_proId, limitLevel) heros = ExpeditionManager.GetHeroDataByProperty(heros,_proId, limitLevel) end - elseif this.curFormationIndex == FormationTypeDef.FIGHT_LEVEL then--山河社稷图副官卡 + elseif this.curFormationIndex == FormationTypeDef.FIGHT_ASSISTANTLEVEL then--山河社稷图副官卡 if _proId == ProIdConst.All then heros = FightLevelManager.GetAllHeroDatas(limitLevel,parameter)--parameter 山河社稷图小关卡数据 else @@ -643,7 +643,7 @@ function this.SingleHeroDataShow(_go, _heroData) local lv= Util.GetGameObject(go, "lv/Text"):GetComponent("Text") local pro= Util.GetGameObject(go, "proIcon"):GetComponent("Image") local pos= Util.GetGameObject(go, "posIcon"):GetComponent("Image") - Util.GetGameObject(go, "posIcon"):SetActive(this.curFormationIndex == FormationTypeDef.FIGHT_LEVEL) + Util.GetGameObject(go, "posIcon"):SetActive(this.curFormationIndex == FormationTypeDef.FIGHT_LEVEL or this.curFormationIndex == FormationTypeDef.FIGHT_ASSISTANTLEVEL) local starGrid = Util.GetGameObject(go, "star") local yuanImage = Util.GetGameObject(go, "yuanImage") local choosedObj = Util.GetGameObject(go, "choosed") @@ -707,7 +707,7 @@ function this.SingleHeroDataShow(_go, _heroData) -- 当前可选的最大上阵人数 local maxNum = ActTimeCtrlManager.MaxArmyNum() - if this.curFormationIndex == FormationTypeDef.FIGHT_LEVEL then--山河社稷图判断上阵数量 + if this.curFormationIndex == FormationTypeDef.FIGHT_ASSISTANTLEVEL then--山河社稷图判断上阵数量 local curmaxNum = FightLevelManager.GetFormationHeroMaxNum(parameter) maxNum = maxNum <= curmaxNum and maxNum or curmaxNum end @@ -938,7 +938,7 @@ function this.SetOneKeyGo() end local heros = {} - if this.curFormationIndex == FormationTypeDef.FIGHT_LEVEL then--山河社稷图副官卡 + if this.curFormationIndex == FormationTypeDef.FIGHT_ASSISTANTLEVEL then--山河社稷图副官卡 heros = FightLevelManager.GetAllHeroDatas(limitLevel,parameter)--parameter 山河社稷图小关卡数据 else heros = HeroManager.GetAllHeroDatas(limitLevel) diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/View/FightLevelFormation.lua b/Assets/ManagedResources/~Lua/Modules/Formation/View/FightLevelFormation.lua index 192872eb79..a15b0b6ae1 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/View/FightLevelFormation.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/View/FightLevelFormation.lua @@ -6,6 +6,7 @@ this.IsNeedChangeFormation = false local hadClick = false --local GetCurNodeInfo this.nodeData = {} +local curFormationTypeDef --- 逻辑初始化 function this.Init(root, _nodeData) this.root = root @@ -14,8 +15,11 @@ function this.Init(root, _nodeData) end --- 获取需要显示的编队id function this.GetFormationIndex() - --FormationManager.curFormationIndex = FormationTypeDef.FORMATION_NORMAL - return FormationTypeDef.FIGHT_LEVEL + if this.nodeData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then + return FormationTypeDef.FIGHT_LEVEL + else + return FormationTypeDef.FIGHT_ASSISTANTLEVEL + end end --- btn1点击回调事件 @@ -36,7 +40,14 @@ function this.On_Btn2_Click() return end -- 编队为空 - if #FormationManager.formationList[FormationTypeDef.FIGHT_LEVEL].teamHeroInfos == 0 then + + + if this.nodeData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then + curFormationTypeDef = FormationTypeDef.FIGHT_LEVEL + else + curFormationTypeDef = FormationTypeDef.FIGHT_ASSISTANTLEVEL + end + if #FormationManager.formationList[curFormationTypeDef].teamHeroInfos == 0 then PopupTipPanel.ShowTip(Language[10700]) hadClick = false return