【山河社稷图】提交
parent
effe90990f
commit
410f679e68
|
@ -1090,6 +1090,7 @@ FORMATION_TYPE = {
|
||||||
GUILD_DEATHPOS=19,
|
GUILD_DEATHPOS=19,
|
||||||
XUANYUAN_MIRROR=20,
|
XUANYUAN_MIRROR=20,
|
||||||
GUILD_TRANSCRIPT=21,
|
GUILD_TRANSCRIPT=21,
|
||||||
|
FIGHTLEVEL=22,
|
||||||
}
|
}
|
||||||
|
|
||||||
--活动Type定义
|
--活动Type定义
|
||||||
|
@ -2235,7 +2236,8 @@ BATTLE_TYPE = {
|
||||||
XINJIANG = 16, --新将来袭
|
XINJIANG = 16, --新将来袭
|
||||||
XIAOYAOYOU = 18, --逍遥游战斗
|
XIAOYAOYOU = 18, --逍遥游战斗
|
||||||
TASUILINGXIAO = 19, --踏碎凌霄
|
TASUILINGXIAO = 19, --踏碎凌霄
|
||||||
FIGHTLEVEL = 20, --山河社稷图
|
FIGHTLEVEL = 20, --山河社稷图主关卡
|
||||||
|
FIGHT_ASSISTANT_LEVEL = 21, --山河社稷图副关卡战斗
|
||||||
BACK_BATTLE = 1000, -- 系统战斗回放
|
BACK_BATTLE = 1000, -- 系统战斗回放
|
||||||
}
|
}
|
||||||
rankKingList={ [1] = { bgImage = "r_zjm_paihangbang_banner04_zh", name = Language[12096] ,rankType = RANK_TYPE.FIGHT_LEVEL_RANK,activiteId = 0,isRankingMainPanelShow = true},
|
rankKingList={ [1] = { bgImage = "r_zjm_paihangbang_banner04_zh", name = Language[12096] ,rankType = RANK_TYPE.FIGHT_LEVEL_RANK,activiteId = 0,isRankingMainPanelShow = true},
|
||||||
|
|
|
@ -109,13 +109,18 @@ end
|
||||||
--开始战斗
|
--开始战斗
|
||||||
local HardStageFightResponseMsg = {}
|
local HardStageFightResponseMsg = {}
|
||||||
function this.FightLevelFightBattle(_fightLevelData, callBack)
|
function this.FightLevelFightBattle(_fightLevelData, callBack)
|
||||||
if _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel then
|
NetManager.HardStageFightRequest(_fightLevelData.nodeId, FormationTypeDef.FIGHT_LEVEL,function (msg)--FIGHT_LEVEL
|
||||||
NetManager.HardStageFightRequest(_fightLevelData.nodeId, FormationTypeDef.FORMATION_NORMAL,function (msg)--FIGHT_LEVEL
|
-- LogYellow("ssssssssssssssssssss 9")
|
||||||
local fightData = BattleManager.GetBattleServerData(msg,0)
|
|
||||||
HardStageFightResponseMsg = msg
|
HardStageFightResponseMsg = msg
|
||||||
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.FIGHTLEVEL, callBack)
|
if _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel or _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevel then
|
||||||
end)
|
local fightData = BattleManager.GetBattleServerData(msg,0)
|
||||||
end
|
UIManager.OpenPanel(UIName.BattlePanel, fightData, _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.MainLevel and BATTLE_TYPE.FIGHTLEVEL or BATTLE_TYPE.FIGHT_ASSISTANT_LEVEL, callBack)
|
||||||
|
elseif _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevelReward then
|
||||||
|
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||||
|
--刷新数据刷新界面
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
function this.GetHardStageFightResponseMsg()
|
function this.GetHardStageFightResponseMsg()
|
||||||
return HardStageFightResponseMsg
|
return HardStageFightResponseMsg
|
||||||
|
|
|
@ -6,7 +6,7 @@ local parent
|
||||||
local sortingOrder=0
|
local sortingOrder=0
|
||||||
local fun
|
local fun
|
||||||
local heroListGo = {}
|
local heroListGo = {}
|
||||||
local fightLevelData = 0
|
local fightLevelData = {}
|
||||||
local liveNodes = {}
|
local liveNodes = {}
|
||||||
local liveNames = {}
|
local liveNames = {}
|
||||||
local condition = {}
|
local condition = {}
|
||||||
|
@ -36,7 +36,7 @@ end
|
||||||
|
|
||||||
function this:BindEvent()
|
function this:BindEvent()
|
||||||
Util.AddClick(this.sureBtn, function()
|
Util.AddClick(this.sureBtn, function()
|
||||||
FightLevelManager.FightLevelFightBattle(fightLevelData)
|
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.FIGHTLEVEL,fightLevelData)
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.backBtn, function()
|
Util.AddClick(this.backBtn, function()
|
||||||
parent:ClosePanel()
|
parent:ClosePanel()
|
||||||
|
@ -86,10 +86,7 @@ function this:ShoeCondition()
|
||||||
noStarImage:SetActive(not FightLevelManager.GetCurLevelStarState(fightLevelData.state,i))
|
noStarImage:SetActive(not FightLevelManager.GetCurLevelStarState(fightLevelData.state,i))
|
||||||
getStarImage:SetActive(FightLevelManager.GetCurLevelStarState(fightLevelData.state,i))
|
getStarImage:SetActive(FightLevelManager.GetCurLevelStarState(fightLevelData.state,i))
|
||||||
Util.GetGameObject(conditionGo[i], "Text"):GetComponent("Text").text = i
|
Util.GetGameObject(conditionGo[i], "Text"):GetComponent("Text").text = i
|
||||||
LogYellow("v "..v )
|
Util.GetGameObject(conditionGo[i], "infolText"):GetComponent("Text").text = HardStageCondition[v].Describe
|
||||||
local vIndex = tonumber(v)
|
|
||||||
Util.GetGameObject(conditionGo[i], "infolText"):GetComponent("Text").text = HardStageCondition[vIndex].Describe
|
|
||||||
LogYellow("HardStageCondition[v].Describe "..HardStageCondition[vIndex].Describe)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- 编队数据匹配
|
-- 编队数据匹配
|
||||||
|
|
|
@ -59,6 +59,7 @@ this.PanelOptionView = {
|
||||||
[FORMATION_TYPE.GUILD_DEATHPOS]="Modules/Formation/View/GuildDeathPosFormation",
|
[FORMATION_TYPE.GUILD_DEATHPOS]="Modules/Formation/View/GuildDeathPosFormation",
|
||||||
[FORMATION_TYPE.XUANYUAN_MIRROR]="Modules/Formation/View/XuanYuanMirrorFormation",
|
[FORMATION_TYPE.XUANYUAN_MIRROR]="Modules/Formation/View/XuanYuanMirrorFormation",
|
||||||
[FORMATION_TYPE.GUILD_TRANSCRIPT]="Modules/Formation/View/GuildTranscriptFormation",
|
[FORMATION_TYPE.GUILD_TRANSCRIPT]="Modules/Formation/View/GuildTranscriptFormation",
|
||||||
|
[FORMATION_TYPE.FIGHTLEVEL]="Modules/Formation/View/FightLevelFormation",
|
||||||
}
|
}
|
||||||
function this:InitComponent()
|
function this:InitComponent()
|
||||||
orginLayer=0
|
orginLayer=0
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
----- 山河社稷图 -----
|
||||||
|
local FightLevelFormation = {}
|
||||||
|
local this = FightLevelFormation
|
||||||
|
--- 是否需要切换编队的功能
|
||||||
|
this.IsNeedChangeFormation = false
|
||||||
|
local hadClick = false
|
||||||
|
--local GetCurNodeInfo
|
||||||
|
this.nodeData = {}
|
||||||
|
--- 逻辑初始化
|
||||||
|
function this.Init(root, _nodeData)
|
||||||
|
this.root = root
|
||||||
|
this.nodeData = _nodeData
|
||||||
|
this.InitView()
|
||||||
|
end
|
||||||
|
--- 获取需要显示的编队id
|
||||||
|
function this.GetFormationIndex()
|
||||||
|
--FormationManager.curFormationIndex = FormationTypeDef.FORMATION_NORMAL
|
||||||
|
return FormationTypeDef.FIGHT_LEVEL
|
||||||
|
end
|
||||||
|
--- btn1点击回调事件
|
||||||
|
|
||||||
|
function this.On_Btn1_Click()
|
||||||
|
this.root.SetOneKeyGoExpedition()
|
||||||
|
end
|
||||||
|
|
||||||
|
function this.On_Btn2_Click()
|
||||||
|
if not hadClick then
|
||||||
|
hadClick = true
|
||||||
|
if this.root.order>=1 then
|
||||||
|
--保存编队
|
||||||
|
FormationManager.RefreshFormation(this.root.curFormationIndex, this.root.choosedList,
|
||||||
|
FormationManager.formationList[this.root.curFormationIndex].teamPokemonInfos)
|
||||||
|
else
|
||||||
|
PopupTipPanel.ShowTip(string.format(Language[10699], 1))
|
||||||
|
hadClick = false
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- 编队为空
|
||||||
|
if #FormationManager.formationList[FormationTypeDef.FIGHT_LEVEL].teamHeroInfos == 0 then
|
||||||
|
PopupTipPanel.ShowTip(Language[10700])
|
||||||
|
hadClick = false
|
||||||
|
return
|
||||||
|
end
|
||||||
|
this.StartFight()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 初始化界面显示
|
||||||
|
function this.InitView()
|
||||||
|
this.root.btn_1:SetActive(true)
|
||||||
|
this.root.btn_2:SetActive(true)
|
||||||
|
this.root.btn_1_lab.text = Language[10710]
|
||||||
|
this.root.btn_2_lab.text = Language[10706]
|
||||||
|
MapManager.isCarbonEnter = false
|
||||||
|
this.root.formTip:SetActive(true)
|
||||||
|
this.root.formTip:GetComponent("Text").text = Language[10717] ..20 .. Language[10718]
|
||||||
|
local costTip = this.root.costTip
|
||||||
|
costTip:SetActive(false)
|
||||||
|
hadClick = false
|
||||||
|
|
||||||
|
this.root.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main })
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- 开始战斗
|
||||||
|
function this.StartFight()
|
||||||
|
FightLevelManager.FightLevelFightBattle(this.nodeData,function()
|
||||||
|
this.root:ClosePanel()
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
return this
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4d02fe74dfd496148944ac16133e6a45
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -5006,6 +5006,36 @@ function NetManager.HardStageRequest(func)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
--山河社稷图领取宝箱奖励
|
||||||
|
function NetManager.GetHardStageChapterReward(_chapterId,_rewradId,func)
|
||||||
|
local data = PlayerInfoProto_pb.GetHardStageChapterReward()
|
||||||
|
data.chapterId = _chapterId
|
||||||
|
data.rewradId = _rewradId
|
||||||
|
local msg = data:SerializeToString()
|
||||||
|
Network:SendMessageWithCallBack(MessageTypeProto_pb.HARD_STAGE_CHAPTER_REWARD_REQUEST, MessageTypeProto_pb.HARD_STAGE_CHAPTER_REWARD_RESPONSE, msg, function(buffer)
|
||||||
|
local data = buffer:DataByte()
|
||||||
|
local msg = PlayerInfoProto_pb.GetHardStageChapterRewardResponse()
|
||||||
|
msg:ParseFromString(data)
|
||||||
|
if func then
|
||||||
|
func(msg)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
--山河社稷图请求战斗回放
|
||||||
|
function NetManager.HardStageReportRequset(_chapterId,_nodeId,func)
|
||||||
|
local data = PlayerInfoProto_pb.HardStageReportRequset()
|
||||||
|
data.chapterId = _chapterId;
|
||||||
|
data.nodeId = _nodeId;
|
||||||
|
local msg = data:SerializeToString()
|
||||||
|
Network:SendMessageWithCallBack(MessageTypeProto_pb.HARD_STAGE_REPORT_REQUEST, MessageTypeProto_pb.HARD_STAGE_REPORT_RESPONSE, msg, function(buffer)
|
||||||
|
local data = buffer:DataByte()
|
||||||
|
local msg = PlayerInfoProto_pb.HardStageReportResponse()
|
||||||
|
msg:ParseFromString(data)
|
||||||
|
if func then
|
||||||
|
func(msg)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
--山河社稷图开始节点战斗操作
|
--山河社稷图开始节点战斗操作
|
||||||
function NetManager.HardStageFightRequest(_nodeId,_teamId,_expInfo,func)
|
function NetManager.HardStageFightRequest(_nodeId,_teamId,_expInfo,func)
|
||||||
local data = PlayerInfoProto_pb.HardStageFightRequest()
|
local data = PlayerInfoProto_pb.HardStageFightRequest()
|
||||||
|
|
Loading…
Reference in New Issue