【战斗回放】代码整理
parent
41ffad0c78
commit
e12211eee4
|
@ -444,7 +444,6 @@ function this.ShowBattleResult(result, msg)
|
||||||
else
|
else
|
||||||
this.resultSoundAudio = SoundManager.PlaySound(SoundConfig.Sound_BattleWin)
|
this.resultSoundAudio = SoundManager.PlaySound(SoundConfig.Sound_BattleWin)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 公会boss结算界面
|
-- 公会boss结算界面
|
||||||
if fightType == BATTLE_TYPE.GUILD_BOSS then
|
if fightType == BATTLE_TYPE.GUILD_BOSS then
|
||||||
UIManager.OpenPanel(UIName.GuildBossFightResultPopup, msg.enventDrop, msg.missionDrop, msg.essenceValue, function()
|
UIManager.OpenPanel(UIName.GuildBossFightResultPopup, msg.enventDrop, msg.missionDrop, msg.essenceValue, function()
|
||||||
|
@ -452,6 +451,43 @@ function this.ShowBattleResult(result, msg)
|
||||||
end)
|
end)
|
||||||
-- 车迟斗法结算界面特殊显示
|
-- 车迟斗法结算界面特殊显示
|
||||||
elseif fightType == BATTLE_TYPE.GUILD_CAR_DELAY and GuildCarDelayManager.progress == 1 then
|
elseif fightType == BATTLE_TYPE.GUILD_CAR_DELAY and GuildCarDelayManager.progress == 1 then
|
||||||
|
this.ShowBattleResultByCarDeleayType()
|
||||||
|
-- 十绝阵结算界面特殊显示
|
||||||
|
elseif fightType == BATTLE_TYPE.DEATH_POS then
|
||||||
|
this.ShowBattleResultByDeathPos()
|
||||||
|
--公会副本
|
||||||
|
elseif fightType == BATTLE_TYPE.GuildTranscript then
|
||||||
|
this.ShowBattleResultByGuildTranscript()
|
||||||
|
--无尽副本
|
||||||
|
elseif fightType == BATTLE_TYPE.MAP_FIGHT and CarbonManager.difficulty == CARBON_TYPE.ENDLESS then
|
||||||
|
this.ShowBattleResultByMapFight()
|
||||||
|
--新回放功能(判断上次战斗是什么类型并做什么内容 逻辑和正常战斗处理一样)
|
||||||
|
elseif fightType == BATTLE_TYPE.BACK_BATTLE then
|
||||||
|
if BattleManager.GetLastBattleType() == BATTLE_TYPE.GuildTranscript then-- 公会副本结算界面特殊显示
|
||||||
|
this.ShowBattleResultByGuildTranscript()
|
||||||
|
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.GUILD_CAR_DELAY and GuildCarDelayManager.progress == 1 then-- 车迟结算界面特殊显示
|
||||||
|
this.ShowBattleResultByCarDeleayType()
|
||||||
|
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.DEATH_POS then-- 十绝阵结算界面特殊显示
|
||||||
|
this.ShowBattleResultByDeathPos()
|
||||||
|
else
|
||||||
|
if result == 0 then -- 失败
|
||||||
|
local haveRecord = BattleRecordManager.isHaveRecord()
|
||||||
|
UIManager.OpenPanel(UIName.BattleFailPopup, this, haveRecord,nil,fightType)
|
||||||
|
else -- 胜利
|
||||||
|
UIManager.OpenPanel(UIName.BattleWinPopup, this, isBack, fightType, this.lastBattleResult)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if result == 0 then -- 失败
|
||||||
|
local haveRecord = BattleRecordManager.isHaveRecord()
|
||||||
|
UIManager.OpenPanel(UIName.BattleFailPopup, this, haveRecord,nil,fightType)
|
||||||
|
else -- 胜利
|
||||||
|
UIManager.OpenPanel(UIName.BattleWinPopup, this, isBack, fightType, this.lastBattleResult)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- 车迟斗法结算界面特殊显示
|
||||||
|
function this.ShowBattleResultByCarDeleayType()
|
||||||
-- 延时执行避免事件冲突
|
-- 延时执行避免事件冲突
|
||||||
Timer.New(function()
|
Timer.New(function()
|
||||||
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
||||||
|
@ -459,7 +495,7 @@ function this.ShowBattleResult(result, msg)
|
||||||
-- 胜利显示本场比赛的表现最好的英雄
|
-- 胜利显示本场比赛的表现最好的英雄
|
||||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||||
-- 打开关卡奖励界面
|
-- 打开关卡奖励界面
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function(isBackBattle)
|
UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
||||||
LogPink("isBackBattle "..tostring(isBackBattle))
|
LogPink("isBackBattle "..tostring(isBackBattle))
|
||||||
if not isBackBattle then
|
if not isBackBattle then
|
||||||
--车迟挑战cd计时
|
--车迟挑战cd计时
|
||||||
|
@ -473,8 +509,9 @@ function this.ShowBattleResult(result, msg)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end, 0.1):Start()
|
end, 0.1):Start()
|
||||||
|
end
|
||||||
-- 十绝阵结算界面特殊显示
|
-- 十绝阵结算界面特殊显示
|
||||||
elseif fightType == BATTLE_TYPE.DEATH_POS then
|
function this.ShowBattleResultByDeathPos()
|
||||||
-- 延时执行避免事件冲突
|
-- 延时执行避免事件冲突
|
||||||
Timer.New(function()
|
Timer.New(function()
|
||||||
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
||||||
|
@ -482,7 +519,7 @@ function this.ShowBattleResult(result, msg)
|
||||||
-- 胜利显示本场比赛的表现最好的英雄
|
-- 胜利显示本场比赛的表现最好的英雄
|
||||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||||
-- 打开关卡奖励界面
|
-- 打开关卡奖励界面
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup, DeathPosManager.drop, 1,function(isBackBattle)
|
UIManager.OpenPanel(UIName.RewardItemPopup, DeathPosManager.drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
||||||
LogPink("isBackBattle "..tostring(isBackBattle))
|
LogPink("isBackBattle "..tostring(isBackBattle))
|
||||||
if not isBackBattle then
|
if not isBackBattle then
|
||||||
if _BattleBestPopup then
|
if _BattleBestPopup then
|
||||||
|
@ -494,8 +531,9 @@ function this.ShowBattleResult(result, msg)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end, 0.1):Start()
|
end, 0.1):Start()
|
||||||
--公会副本
|
end
|
||||||
elseif fightType == BATTLE_TYPE.GuildTranscript then
|
--公会副本结算界面特殊显示
|
||||||
|
function this.ShowBattleResultByGuildTranscript()
|
||||||
-- 延时执行避免事件冲突
|
-- 延时执行避免事件冲突
|
||||||
Timer.New(function()
|
Timer.New(function()
|
||||||
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
||||||
|
@ -503,7 +541,7 @@ function this.ShowBattleResult(result, msg)
|
||||||
-- 胜利显示本场比赛的表现最好的英雄
|
-- 胜利显示本场比赛的表现最好的英雄
|
||||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||||
-- 打开关卡奖励界面
|
-- 打开关卡奖励界面
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,GuildTranscriptManager.drop, 1,function(isBackBattle)
|
UIManager.OpenPanel(UIName.RewardItemPopup,GuildTranscriptManager.drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
||||||
LogPink("isBackBattle "..tostring(isBackBattle))
|
LogPink("isBackBattle "..tostring(isBackBattle))
|
||||||
if not isBackBattle then
|
if not isBackBattle then
|
||||||
if _BattleBestPopup then
|
if _BattleBestPopup then
|
||||||
|
@ -518,8 +556,9 @@ function this.ShowBattleResult(result, msg)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end, 0.1):Start()
|
end, 0.1):Start()
|
||||||
--无尽副本
|
end
|
||||||
elseif fightType == BATTLE_TYPE.MAP_FIGHT and CarbonManager.difficulty == CARBON_TYPE.ENDLESS then
|
--无尽结算界面特殊显示
|
||||||
|
function this.ShowBattleResultByMapFight()
|
||||||
Timer.New(function()
|
Timer.New(function()
|
||||||
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
||||||
FightPointPassManager.oldLevel = PlayerManager.level
|
FightPointPassManager.oldLevel = PlayerManager.level
|
||||||
|
@ -539,92 +578,7 @@ function this.ShowBattleResult(result, msg)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end, 0.1):Start()
|
end, 0.1):Start()
|
||||||
--新回放功能
|
|
||||||
elseif fightType == BATTLE_TYPE.BACK_BATTLE then
|
|
||||||
if BattleManager.GetLastBattleType() == BATTLE_TYPE.GuildTranscript then
|
|
||||||
-- 延时执行避免事件冲突
|
|
||||||
Timer.New(function()
|
|
||||||
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
|
||||||
if bestData then
|
|
||||||
-- 胜利显示本场比赛的表现最好的英雄
|
|
||||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
|
||||||
-- 打开关卡奖励界面
|
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,GuildTranscriptManager.drop, 1,function(isBackBattle)
|
|
||||||
LogPink("isBackBattle "..tostring(isBackBattle))
|
|
||||||
if not isBackBattle then
|
|
||||||
if _BattleBestPopup then
|
|
||||||
_BattleBestPopup:ClosePanel()
|
|
||||||
end
|
end
|
||||||
this:ClosePanel()
|
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscripQuickBtn)
|
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Guild.RefreshGuildTranscript)
|
|
||||||
GuildTranscriptManager.IsKillShowTip()
|
|
||||||
end
|
|
||||||
end, 6,true,true)
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end, 0.1):Start()
|
|
||||||
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.GUILD_CAR_DELAY and GuildCarDelayManager.progress == 1 then
|
|
||||||
-- 延时执行避免事件冲突
|
|
||||||
Timer.New(function()
|
|
||||||
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
|
||||||
if bestData then
|
|
||||||
-- 胜利显示本场比赛的表现最好的英雄
|
|
||||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
|
||||||
-- 打开关卡奖励界面
|
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function(isBackBattle)
|
|
||||||
LogPink("isBackBattle "..tostring(isBackBattle))
|
|
||||||
if not isBackBattle then
|
|
||||||
--车迟挑战cd计时
|
|
||||||
GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Challenge)
|
|
||||||
if _BattleBestPopup then
|
|
||||||
_BattleBestPopup:ClosePanel()
|
|
||||||
end
|
|
||||||
this:ClosePanel()
|
|
||||||
end
|
|
||||||
end, 3,true,true)
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end, 0.1):Start()
|
|
||||||
-- 十绝阵结算界面特殊显示
|
|
||||||
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.DEATH_POS then
|
|
||||||
-- 延时执行避免事件冲突
|
|
||||||
Timer.New(function()
|
|
||||||
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
|
||||||
if bestData then
|
|
||||||
-- 胜利显示本场比赛的表现最好的英雄
|
|
||||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
|
||||||
-- 打开关卡奖励界面
|
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup, DeathPosManager.drop, 1,function(isBackBattle)
|
|
||||||
LogPink("isBackBattle "..tostring(isBackBattle))
|
|
||||||
if not isBackBattle then
|
|
||||||
if _BattleBestPopup then
|
|
||||||
_BattleBestPopup:ClosePanel()
|
|
||||||
end
|
|
||||||
this:ClosePanel()
|
|
||||||
end
|
|
||||||
end, 4,true,true)
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end, 0.1):Start()
|
|
||||||
else
|
|
||||||
if result == 0 then -- 失败
|
|
||||||
local haveRecord = BattleRecordManager.isHaveRecord()
|
|
||||||
UIManager.OpenPanel(UIName.BattleFailPopup, this, haveRecord,nil,fightType)
|
|
||||||
else -- 胜利
|
|
||||||
UIManager.OpenPanel(UIName.BattleWinPopup, this, isBack, fightType, this.lastBattleResult)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if result == 0 then -- 失败
|
|
||||||
local haveRecord = BattleRecordManager.isHaveRecord()
|
|
||||||
UIManager.OpenPanel(UIName.BattleFailPopup, this, haveRecord,nil,fightType)
|
|
||||||
else -- 胜利
|
|
||||||
UIManager.OpenPanel(UIName.BattleWinPopup, this, isBack, fightType, this.lastBattleResult)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- 战斗波次变化回调
|
-- 战斗波次变化回调
|
||||||
function this.OnOrderChanged(order)
|
function this.OnOrderChanged(order)
|
||||||
-- body
|
-- body
|
||||||
|
|
|
@ -107,27 +107,21 @@ function this:LoseJump(id)
|
||||||
end
|
end
|
||||||
function this.ClosePanelRefreshData()
|
function this.ClosePanelRefreshData()
|
||||||
if fightType then
|
if fightType then
|
||||||
if fightType == 8 then--远征
|
if fightType == BATTLE_TYPE.EXECUTE_FIGHT then--远征
|
||||||
if not isBackBattle then
|
this.ShowBattleResultByExpedition()
|
||||||
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo
|
elseif fightType == BATTLE_TYPE.GUILD_CAR_DELAY then--车迟
|
||||||
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点
|
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshMainPanel)--刷新界面
|
|
||||||
PopupTipPanel.ShowTip( Language[12194])
|
|
||||||
else
|
|
||||||
MsgPanel.ShowTwo(Language[11540], function()
|
|
||||||
end, function()
|
|
||||||
NetManager.EndConfirmExpeditionBattleRequest(GetCurNodeInfo.sortId, function (msg)
|
|
||||||
end)
|
|
||||||
end,Language[10719],Language[12201])
|
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshMainPanel)--刷新界面
|
|
||||||
end
|
|
||||||
end
|
|
||||||
elseif fightType == 10 then--车迟
|
|
||||||
--车迟抢夺cd计时
|
--车迟抢夺cd计时
|
||||||
GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot)
|
GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot)
|
||||||
--新回放功能
|
--新回放功能
|
||||||
elseif fightType == BATTLE_TYPE.BACK_BATTLE then
|
elseif fightType == BATTLE_TYPE.BACK_BATTLE then
|
||||||
if BattleManager.GetLastBattleType() == BATTLE_TYPE.EXECUTE_FIGHT then
|
if BattleManager.GetLastBattleType() == BATTLE_TYPE.EXECUTE_FIGHT then-- 猎妖之路
|
||||||
|
this.ShowBattleResultByExpedition()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- 猎妖之路结算界面特殊显示
|
||||||
|
function this.ShowBattleResultByExpedition()
|
||||||
if not isBackBattle then
|
if not isBackBattle then
|
||||||
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo
|
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo
|
||||||
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点
|
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点
|
||||||
|
@ -143,9 +137,6 @@ function this.ClosePanelRefreshData()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function BattleFailPopup:OnClose()
|
function BattleFailPopup:OnClose()
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Map.MaskState,0)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Map.MaskState,0)
|
||||||
|
|
|
@ -45,7 +45,7 @@ function BattleWinPopup:NextStep()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if m_fightType == 2 then --副本战斗结算
|
if m_fightType == BATTLE_TYPE.MAP_FIGHT then --副本战斗结算
|
||||||
|
|
||||||
-- local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
-- local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
||||||
-- FightPointPassManager.oldLevel = PlayerManager.level
|
-- FightPointPassManager.oldLevel = PlayerManager.level
|
||||||
|
@ -66,22 +66,52 @@ function BattleWinPopup:NextStep()
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
-- end)
|
-- end)
|
||||||
elseif m_fightType == 3 then --限时怪战斗结算
|
elseif m_fightType == BATTLE_TYPE.ELITE_MONSTER then --限时怪战斗结算
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function() m_battlePanel:ClosePanel() self:ClosePanel() end, 1, true)
|
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function() m_battlePanel:ClosePanel() self:ClosePanel() end, 1, true)
|
||||||
elseif m_fightType == 5 then -- 兽潮来袭
|
elseif m_fightType == BATTLE_TYPE.MONSTER_CAMP then -- 兽潮来袭
|
||||||
|
this.ShowBattleResultByMonsterCamp(m_battleResult.drop)
|
||||||
|
elseif m_fightType == BATTLE_TYPE.STORY_FIGHT then -- 新关卡的战斗
|
||||||
|
this.ShowBattleResultByStoryFight(m_battleResult.drop)
|
||||||
|
elseif m_fightType == BATTLE_TYPE.EXECUTE_FIGHT then -- 猎妖之路
|
||||||
|
this.ShowBattleResultByExpedition(m_battleResult.drop)
|
||||||
|
elseif m_fightType == BATTLE_TYPE.DAILY_CHALLENGE then -- 日常副本
|
||||||
|
m_battlePanel:ClosePanel() self:ClosePanel(m_battleResult.drop)
|
||||||
|
elseif m_fightType == BATTLE_TYPE.GUILD_CAR_DELAY then -- 车迟
|
||||||
|
this.ShowBattleResultByCarDeleayType(m_battleResult.drop)
|
||||||
|
--新回放功能
|
||||||
|
elseif m_fightType == BATTLE_TYPE.BACK_BATTLE then
|
||||||
|
if BattleManager.GetLastBattleType() == BATTLE_TYPE.STORY_FIGHT then-- 新关卡战斗
|
||||||
|
this.ShowBattleResultByStoryFight(BattleManager.GetLastBattleResult().drop)
|
||||||
|
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.EXECUTE_FIGHT then--猎妖之路
|
||||||
|
this.ShowBattleResultByExpedition(BattleManager.GetLastBattleResult().drop)
|
||||||
|
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.GUILD_CAR_DELAY then--车迟
|
||||||
|
this.ShowBattleResultByCarDeleayType(BattleManager.GetLastBattleResult().drop)
|
||||||
|
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.MONSTER_CAMP then--兽潮来袭
|
||||||
|
this.ShowBattleResultByMonsterCamp(BattleManager.GetLastBattleResult().drop)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- 兽潮来袭结算界面特殊显示
|
||||||
|
function this.ShowBattleResultByMonsterCamp(drop)
|
||||||
if m_battlePanel then
|
if m_battlePanel then
|
||||||
m_battlePanel:ClosePanel()
|
m_battlePanel:ClosePanel()
|
||||||
end
|
end
|
||||||
self:ClosePanel()
|
this:ClosePanel()
|
||||||
if m_backPanel then
|
if m_backPanel then
|
||||||
UIManager.OpenPanel(m_backPanel)
|
UIManager.OpenPanel(m_backPanel)
|
||||||
end
|
end
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
||||||
|
LogPink("isBackBattle "..tostring(isBackBattle))
|
||||||
|
if not isBackBattle then
|
||||||
if m_callBack then m_callBack() end
|
if m_callBack then m_callBack() end
|
||||||
--内容优化 心魔试炼推送
|
--内容优化 心魔试炼推送
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend,FacePanelType.MonsterWave)
|
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend,FacePanelType.MonsterWave)
|
||||||
|
end
|
||||||
end, nil, not m_notShowRecord)
|
end, nil, not m_notShowRecord)
|
||||||
elseif m_fightType == 6 then -- 新关卡的战斗
|
end
|
||||||
|
-- 新关卡战斗结算界面特殊显示
|
||||||
|
function this.ShowBattleResultByStoryFight(drop)
|
||||||
FightPointPassManager.FightBattleEnd()
|
FightPointPassManager.FightBattleEnd()
|
||||||
FightPointPassManager.OnBattleEnd(m_battleResult)
|
FightPointPassManager.OnBattleEnd(m_battleResult)
|
||||||
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
||||||
|
@ -89,7 +119,7 @@ function BattleWinPopup:NextStep()
|
||||||
-- 胜利显示本场比赛的表现最好的英雄
|
-- 胜利显示本场比赛的表现最好的英雄
|
||||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||||
-- 打开关卡奖励界面
|
-- 打开关卡奖励界面
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function(isBackBattle)
|
UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
||||||
LogPink("isBackBattle "..tostring(isBackBattle))
|
LogPink("isBackBattle "..tostring(isBackBattle))
|
||||||
if not isBackBattle then
|
if not isBackBattle then
|
||||||
if _BattleBestPopup then
|
if _BattleBestPopup then
|
||||||
|
@ -98,7 +128,7 @@ function BattleWinPopup:NextStep()
|
||||||
if m_battlePanel then
|
if m_battlePanel then
|
||||||
m_battlePanel:ClosePanel()
|
m_battlePanel:ClosePanel()
|
||||||
end
|
end
|
||||||
self:ClosePanel()
|
this:ClosePanel()
|
||||||
-- 再刷新一便关卡信息
|
-- 再刷新一便关卡信息
|
||||||
NetManager.InitFightPointLevelInfo()
|
NetManager.InitFightPointLevelInfo()
|
||||||
end
|
end
|
||||||
|
@ -106,86 +136,22 @@ function BattleWinPopup:NextStep()
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
-- 打开关卡奖励界面
|
-- 打开关卡奖励界面
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1,function()
|
||||||
if m_battlePanel then
|
if m_battlePanel then
|
||||||
m_battlePanel:ClosePanel()
|
m_battlePanel:ClosePanel()
|
||||||
end
|
end
|
||||||
self:ClosePanel()
|
this:ClosePanel()
|
||||||
end, 1, true)
|
end, 1, true)
|
||||||
end
|
end
|
||||||
elseif m_fightType == 8 then -- 远征
|
|
||||||
self:ClosePanel()
|
|
||||||
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
|
||||||
if bestData then
|
|
||||||
-- 胜利显示本场比赛的表现最好的英雄
|
|
||||||
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo--ExpeditionManager.GetCurNodeInfo()
|
|
||||||
local func2 = nil
|
|
||||||
if GetCurNodeInfo.type == ExpeditionNodeType.Trail then--试炼节点
|
|
||||||
LogBlue("sssssssssssssssssss")
|
|
||||||
func2 = function()
|
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
|
|
||||||
end
|
end
|
||||||
end
|
-- 车迟斗法结算界面特殊显示
|
||||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
function this.ShowBattleResultByCarDeleayType(drop)
|
||||||
--贪婪节点不弹领取圣物
|
|
||||||
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点
|
|
||||||
if m_battleResult.drop.itemlist and #m_battleResult.drop.itemlist > 0 then
|
|
||||||
LogGreen("m_battleResult.drop.itemlist "..#m_battleResult.drop.itemlist)
|
|
||||||
else
|
|
||||||
LogGreen(Language[12202])
|
|
||||||
end
|
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,m_battleResult.drop, 1,function()
|
|
||||||
if m_battlePanel then
|
|
||||||
m_battlePanel:ClosePanel()
|
|
||||||
end
|
|
||||||
if _BattleBestPopup then
|
|
||||||
_BattleBestPopup:ClosePanel()
|
|
||||||
end
|
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
|
|
||||||
end, 0,true,true)
|
|
||||||
elseif GetCurNodeInfo.type == ExpeditionNodeType.Trail then--试炼节点
|
|
||||||
if m_battleResult.drop and m_battleResult.drop.soulEquip and #m_battleResult.drop.soulEquip > 0 then
|
|
||||||
for i = 1, #m_battleResult.drop.soulEquip do
|
|
||||||
ExpeditionManager.InitSingleTreasureData(m_battleResult.drop.soulEquip[i])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if m_battleResult.drop and m_battleResult.drop.Hero and m_battleResult.drop.Hero[1] then
|
|
||||||
ExpeditionManager.UpdateHeroDatas(m_battleResult.drop.Hero[1])
|
|
||||||
else
|
|
||||||
LogError(Language[11541])
|
|
||||||
end
|
|
||||||
if m_battlePanel then
|
|
||||||
m_battlePanel:ClosePanel()
|
|
||||||
end
|
|
||||||
PopupTipPanel.ShowTip(Language[12192])
|
|
||||||
else
|
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,m_battleResult.drop, 1,function()
|
|
||||||
if m_battlePanel then
|
|
||||||
m_battlePanel:ClosePanel()
|
|
||||||
end
|
|
||||||
if _BattleBestPopup then
|
|
||||||
_BattleBestPopup:ClosePanel()
|
|
||||||
end
|
|
||||||
if GetCurNodeInfo.holyEquipID and #GetCurNodeInfo.holyEquipID > 0 then
|
|
||||||
UIManager.OpenPanel(UIName.ExpeditionSelectHalidomPanel,true,function ()
|
|
||||||
end)
|
|
||||||
else
|
|
||||||
--此时战斗了但没有圣物 所有直接刷新界面动画 后并刷新界面
|
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
|
|
||||||
end
|
|
||||||
end, 0,true,true)
|
|
||||||
end
|
|
||||||
end,func2)
|
|
||||||
end
|
|
||||||
elseif m_fightType==9 then
|
|
||||||
m_battlePanel:ClosePanel() self:ClosePanel()
|
|
||||||
elseif m_fightType == 10 then -- 车迟
|
|
||||||
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
||||||
if bestData then
|
if bestData then
|
||||||
-- 胜利显示本场比赛的表现最好的英雄
|
-- 胜利显示本场比赛的表现最好的英雄
|
||||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||||
-- 打开关卡奖励界面
|
-- 打开关卡奖励界面
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function(isBackBattle)
|
UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
||||||
LogPink("isBackBattle "..tostring(isBackBattle))
|
LogPink("isBackBattle "..tostring(isBackBattle))
|
||||||
if not isBackBattle then
|
if not isBackBattle then
|
||||||
--车迟抢夺cd计时
|
--车迟抢夺cd计时
|
||||||
|
@ -196,47 +162,15 @@ function BattleWinPopup:NextStep()
|
||||||
if m_battlePanel then
|
if m_battlePanel then
|
||||||
m_battlePanel:ClosePanel()
|
m_battlePanel:ClosePanel()
|
||||||
end
|
end
|
||||||
self:ClosePanel()
|
this:ClosePanel()
|
||||||
end
|
end
|
||||||
end, 3,true,true)
|
end, 3,true,true)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
--新回放功能
|
|
||||||
elseif m_fightType == BATTLE_TYPE.BACK_BATTLE then
|
|
||||||
if BattleManager.GetLastBattleType() == BATTLE_TYPE.STORY_FIGHT then
|
|
||||||
FightPointPassManager.FightBattleEnd()
|
|
||||||
FightPointPassManager.OnBattleEnd(m_battleResult)
|
|
||||||
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
|
||||||
if bestData then
|
|
||||||
-- 胜利显示本场比赛的表现最好的英雄
|
|
||||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
|
||||||
-- 打开关卡奖励界面
|
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup, BattleManager.GetLastBattleResult().drop, 1,function(isBackBattle)
|
|
||||||
LogPink("isBackBattle "..tostring(isBackBattle))
|
|
||||||
if not isBackBattle then
|
|
||||||
if _BattleBestPopup then
|
|
||||||
_BattleBestPopup:ClosePanel()
|
|
||||||
end
|
end
|
||||||
if m_battlePanel then
|
-- 猎妖之路结算界面特殊显示
|
||||||
m_battlePanel:ClosePanel()
|
function this.ShowBattleResultByExpedition(drop)
|
||||||
end
|
this:ClosePanel()
|
||||||
self:ClosePanel()
|
|
||||||
-- 再刷新一便关卡信息
|
|
||||||
NetManager.InitFightPointLevelInfo()
|
|
||||||
end
|
|
||||||
end, 1, true, true)
|
|
||||||
end)
|
|
||||||
else
|
|
||||||
-- 打开关卡奖励界面
|
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
|
||||||
if m_battlePanel then
|
|
||||||
m_battlePanel:ClosePanel()
|
|
||||||
end
|
|
||||||
self:ClosePanel()
|
|
||||||
end, 1, true)
|
|
||||||
end
|
|
||||||
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.EXECUTE_FIGHT then
|
|
||||||
self:ClosePanel()
|
|
||||||
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
||||||
if bestData then
|
if bestData then
|
||||||
-- 胜利显示本场比赛的表现最好的英雄
|
-- 胜利显示本场比赛的表现最好的英雄
|
||||||
|
@ -250,13 +184,12 @@ function BattleWinPopup:NextStep()
|
||||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||||
--贪婪节点不弹领取圣物
|
--贪婪节点不弹领取圣物
|
||||||
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点
|
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点
|
||||||
local drop = BattleManager.GetLastBattleResult().drop
|
if drop.itemlist and #drop.itemlist > 0 then
|
||||||
if m_battleResult.drop.itemlist and #drop.itemlist > 0 then
|
|
||||||
LogGreen("m_battleResult.drop.itemlist "..#m_battleResult.drop.itemlist)
|
LogGreen("m_battleResult.drop.itemlist "..#m_battleResult.drop.itemlist)
|
||||||
else
|
else
|
||||||
LogGreen(Language[12202])
|
LogGreen(Language[12202])
|
||||||
end
|
end
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,m_battleResult.drop, 1,function(isBackBattle)
|
UIManager.OpenPanel(UIName.RewardItemPopup,drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
||||||
LogPink("isBackBattle "..tostring(isBackBattle))
|
LogPink("isBackBattle "..tostring(isBackBattle))
|
||||||
if not isBackBattle then
|
if not isBackBattle then
|
||||||
if m_battlePanel then
|
if m_battlePanel then
|
||||||
|
@ -284,7 +217,7 @@ function BattleWinPopup:NextStep()
|
||||||
end
|
end
|
||||||
PopupTipPanel.ShowTip(Language[12192])
|
PopupTipPanel.ShowTip(Language[12192])
|
||||||
else
|
else
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,BattleManager.GetLastBattleResult().drop, 1,function(isBackBattle)
|
UIManager.OpenPanel(UIName.RewardItemPopup,drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
||||||
LogPink("isBackBattle "..tostring(isBackBattle))
|
LogPink("isBackBattle "..tostring(isBackBattle))
|
||||||
if not isBackBattle then
|
if not isBackBattle then
|
||||||
if m_battlePanel then
|
if m_battlePanel then
|
||||||
|
@ -305,33 +238,7 @@ function BattleWinPopup:NextStep()
|
||||||
end
|
end
|
||||||
end,func2)
|
end,func2)
|
||||||
end
|
end
|
||||||
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.GUILD_CAR_DELAY then--车迟
|
|
||||||
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
|
||||||
if bestData then
|
|
||||||
-- 胜利显示本场比赛的表现最好的英雄
|
|
||||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
|
||||||
-- 打开关卡奖励界面
|
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function(isBackBattle)
|
|
||||||
LogPink("isBackBattle "..tostring(isBackBattle))
|
|
||||||
if not isBackBattle then
|
|
||||||
--车迟抢夺cd计时
|
|
||||||
GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot)
|
|
||||||
if _BattleBestPopup then
|
|
||||||
_BattleBestPopup:ClosePanel()
|
|
||||||
end
|
end
|
||||||
if m_battlePanel then
|
|
||||||
m_battlePanel:ClosePanel()
|
|
||||||
end
|
|
||||||
self:ClosePanel()
|
|
||||||
end
|
|
||||||
end, 3,true,true)
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--添加事件监听(用于子类重写)
|
--添加事件监听(用于子类重写)
|
||||||
function BattleWinPopup:AddListener()
|
function BattleWinPopup:AddListener()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue