【山河社稷图】加副关卡编队

dev_chengFeng
zhangqiang 2021-05-20 16:46:26 +08:00
parent 6f0132e18d
commit 4b2259d65a
5 changed files with 34 additions and 15 deletions

View File

@ -1685,7 +1685,8 @@ FormationTypeDef = {
MAGIC_MIRROR = 1403, --妖
TAOIST_MIRROR = 1404, --道
GUILD_TRANSCRIPT = 1501, --公会副本
FIGHT_LEVEL = 1701, --山河社稷图
FIGHT_LEVEL = 1701, --山河社稷图主关卡编队
FIGHT_ASSISTANTLEVEL = 1801, --山河社稷图副主关卡编队
}
--编队需要拉取主线

View File

@ -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

View File

@ -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 = {}

View File

@ -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)

View File

@ -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