2021-04-21 13:12:04 +08:00
|
|
|
|
require("Base/BasePanel")
|
2020-05-09 13:31:21 +08:00
|
|
|
|
BattleWinPopup = Inherit(BasePanel)
|
|
|
|
|
local this = BattleWinPopup
|
|
|
|
|
local m_isBack
|
|
|
|
|
local m_battlePanel
|
|
|
|
|
local m_fightType
|
|
|
|
|
local m_battleResult
|
|
|
|
|
local m_notShowRecord = false
|
|
|
|
|
local m_backPanel
|
|
|
|
|
local orginLayer
|
|
|
|
|
local m_callBack
|
|
|
|
|
local hadClick = false
|
|
|
|
|
|
|
|
|
|
--初始化组件(用于子类重写)
|
|
|
|
|
function BattleWinPopup:InitComponent()
|
2021-04-21 13:12:04 +08:00
|
|
|
|
this.spLoader = SpriteLoader.New()
|
2020-05-09 13:31:21 +08:00
|
|
|
|
|
|
|
|
|
orginLayer = 0
|
|
|
|
|
this.btnWin = Util.GetGameObject(self.gameObject, "Win")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--绑定事件(用于子类重写)
|
|
|
|
|
function BattleWinPopup:BindEvent()
|
|
|
|
|
|
2020-06-08 13:57:30 +08:00
|
|
|
|
Util.AddClick(this.btnWin, function ()
|
|
|
|
|
self:ClosePanel()
|
2021-05-26 14:57:28 +08:00
|
|
|
|
if m_fightType == BATTLE_TYPE.Test then
|
2020-06-08 20:18:49 +08:00
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
2021-05-26 14:57:28 +08:00
|
|
|
|
end
|
2020-06-08 20:18:49 +08:00
|
|
|
|
end
|
2020-06-08 13:57:30 +08:00
|
|
|
|
end)
|
2020-06-03 19:09:01 +08:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
function BattleWinPopup:NextStep()
|
|
|
|
|
if not hadClick then -- 避免重复结算
|
|
|
|
|
hadClick = true
|
|
|
|
|
if m_isBack then
|
2020-09-02 13:35:29 +08:00
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
2020-06-03 19:09:01 +08:00
|
|
|
|
self:ClosePanel()
|
|
|
|
|
return
|
|
|
|
|
end
|
2021-01-07 11:32:26 +08:00
|
|
|
|
if m_fightType == BATTLE_TYPE.MAP_FIGHT then --副本战斗结算
|
2021-09-10 18:36:39 +08:00
|
|
|
|
this.ShowBattleResultByMapFight()
|
2021-01-07 11:32:26 +08:00
|
|
|
|
elseif m_fightType == BATTLE_TYPE.ELITE_MONSTER then --限时怪战斗结算
|
2020-06-03 19:09:01 +08:00
|
|
|
|
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function() m_battlePanel:ClosePanel() self:ClosePanel() end, 1, true)
|
2021-01-07 11:32:26 +08:00
|
|
|
|
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)
|
2021-02-22 18:42:26 +08:00
|
|
|
|
elseif m_fightType == BATTLE_TYPE.FOURELEMENT then -- 四灵
|
|
|
|
|
this.ShowBattleResultByFourElement(m_battleResult.drop)
|
2021-01-07 11:32:26 +08:00
|
|
|
|
elseif m_fightType == BATTLE_TYPE.EXECUTE_FIGHT then -- 猎妖之路
|
|
|
|
|
this.ShowBattleResultByExpedition(m_battleResult.drop)
|
2022-04-25 18:20:53 +08:00
|
|
|
|
elseif m_fightType == BATTLE_TYPE.DAILY_CHALLENGE-- 日常副本
|
2021-11-26 10:19:29 +08:00
|
|
|
|
or m_fightType == BATTLE_TYPE.XUAN_YUAN_MIRROR
|
2022-04-25 18:20:53 +08:00
|
|
|
|
or m_fightType == BATTLE_TYPE.TRIAL_FIGHT then
|
2021-01-07 11:32:26 +08:00
|
|
|
|
m_battlePanel:ClosePanel() self:ClosePanel(m_battleResult.drop)
|
|
|
|
|
elseif m_fightType == BATTLE_TYPE.GUILD_CAR_DELAY then -- 车迟
|
|
|
|
|
this.ShowBattleResultByCarDeleayType(m_battleResult.drop)
|
2021-01-07 18:03:57 +08:00
|
|
|
|
elseif m_fightType == BATTLE_TYPE.XIAOYAOYOU then
|
2021-11-26 10:19:29 +08:00
|
|
|
|
if m_battlePanel then m_battlePanel:ClosePanel()end self:ClosePanel()
|
2021-05-13 20:30:10 +08:00
|
|
|
|
elseif m_fightType == BATTLE_TYPE.FIGHTLEVEL then--山河社稷图主关卡
|
2021-05-11 15:12:37 +08:00
|
|
|
|
this.ShowBattleResultByFightLevelType(m_battleResult.drop)
|
2021-05-13 20:30:10 +08:00
|
|
|
|
elseif m_fightType == BATTLE_TYPE.FIGHT_ASSISTANT_LEVEL then--山河社稷图副关卡
|
2021-06-15 20:08:14 +08:00
|
|
|
|
this.ShowBattleResultByFightLevelAssistantType(m_battleResult.drop)
|
|
|
|
|
elseif m_fightType == BATTLE_TYPE.JumpServerhightLadder then -- 跨服天梯的战斗
|
|
|
|
|
this.JumpServerHithtLadder()
|
2021-09-10 18:36:39 +08:00
|
|
|
|
elseif m_fightType == BATTLE_TYPE.EndlessMpaFight then--无尽地图战斗
|
|
|
|
|
this.ShowBattleResultByEndless()
|
2021-09-17 14:38:05 +08:00
|
|
|
|
elseif m_fightType == BATTLE_TYPE.QIJIE_FIGHT then--七界试炼战斗
|
|
|
|
|
this.ShowBattleResultByQiJie()
|
2022-04-25 18:20:53 +08:00
|
|
|
|
elseif m_fightType == BATTLE_TYPE.CHALLENG_COPY_1 or m_fightType == BATTLE_TYPE.CHALLENG_COPY_2 then
|
|
|
|
|
this.ShowBattleResultByChallengeCopy()
|
2021-01-07 11:32:26 +08:00
|
|
|
|
--新回放功能
|
|
|
|
|
elseif m_fightType == BATTLE_TYPE.BACK_BATTLE then
|
|
|
|
|
if BattleManager.GetLastBattleType() == BATTLE_TYPE.STORY_FIGHT then-- 新关卡战斗
|
|
|
|
|
this.ShowBattleResultByStoryFight(BattleManager.GetLastBattleResult().drop)
|
2022-04-21 18:43:24 +08:00
|
|
|
|
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.FOURELEMENT then -- 四灵试炼
|
2021-02-22 18:42:26 +08:00
|
|
|
|
this.ShowBattleResultByFourElement(BattleManager.GetLastBattleResult().drop)
|
2021-01-07 11:32:26 +08:00
|
|
|
|
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)
|
2021-01-07 18:03:57 +08:00
|
|
|
|
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.XIAOYAOYOU then
|
|
|
|
|
if m_battlePanel then m_battlePanel:ClosePanel()end self:ClosePanel()
|
2021-05-11 15:12:37 +08:00
|
|
|
|
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.FIGHTLEVEL then--山河社稷图
|
|
|
|
|
this.ShowBattleResultByFightLevelType(BattleManager.GetLastBattleResult().drop)
|
2021-05-13 20:30:10 +08:00
|
|
|
|
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.FIGHT_ASSISTANT_LEVEL then--山河社稷图副关卡
|
|
|
|
|
this.ShowBattleResultByFightLevelAssistantType(BattleManager.GetLastBattleResult().drop)
|
2021-06-15 20:08:14 +08:00
|
|
|
|
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.JumpServerhightLadder then
|
|
|
|
|
this.JumpServerHithtLadder()
|
2021-09-17 14:38:05 +08:00
|
|
|
|
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.QIJIE_FIGHT then
|
|
|
|
|
this.ShowBattleResultByQiJie()
|
2022-04-21 18:43:24 +08:00
|
|
|
|
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.CHALLENG_COPY_1 or BattleManager.GetLastBattleType() == BATTLE_TYPE.CHALLENG_COPY_2 then
|
|
|
|
|
this.ShowBattleResultByChallengeCopy()
|
2021-01-07 11:32:26 +08:00
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
2021-09-10 18:36:39 +08:00
|
|
|
|
|
|
|
|
|
--副本战斗结算
|
|
|
|
|
function this.ShowBattleResultByMapFight()
|
|
|
|
|
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
|
|
|
|
FightPointPassManager.oldLevel = PlayerManager.level
|
|
|
|
|
if bestData then
|
|
|
|
|
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.skinId,bestData.damage, allDamage, function(_BattleBestPopup)
|
|
|
|
|
-- 打开关卡奖励界面
|
|
|
|
|
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
|
|
|
|
if _BattleBestPopup then
|
|
|
|
|
_BattleBestPopup:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
2021-09-28 11:20:42 +08:00
|
|
|
|
this:ClosePanel()
|
2021-09-10 18:36:39 +08:00
|
|
|
|
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold)
|
|
|
|
|
end, 0, true, true)
|
|
|
|
|
end)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2021-09-17 14:38:05 +08:00
|
|
|
|
--七界试炼战斗界面特殊显示
|
|
|
|
|
function this.ShowBattleResultByQiJie()
|
|
|
|
|
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, QiJieShiLianManager.battleResult.drop, 1,function(isBackBattle)
|
|
|
|
|
if not isBackBattle then
|
|
|
|
|
if _BattleBestPopup then
|
|
|
|
|
_BattleBestPopup:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
this:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
end, 10, true,true)
|
|
|
|
|
end)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2022-04-25 18:20:53 +08:00
|
|
|
|
--挑战副本战斗界面特殊显示
|
|
|
|
|
function this.ShowBattleResultByChallengeCopy()
|
|
|
|
|
LogBlue("--挑战副本战斗界面特殊显示")
|
|
|
|
|
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, CarbonManager.battleResult.drop, 1,function(isBackBattle)
|
|
|
|
|
if not isBackBattle then
|
|
|
|
|
if _BattleBestPopup then
|
|
|
|
|
_BattleBestPopup:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
this:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
end, 12 , true,true)
|
|
|
|
|
end)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2021-09-10 18:36:39 +08:00
|
|
|
|
--无尽副本战斗界面特殊显示
|
|
|
|
|
function this.ShowBattleResultByEndless()
|
|
|
|
|
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
|
|
|
|
FightPointPassManager.oldLevel = PlayerManager.level
|
|
|
|
|
if bestData then
|
|
|
|
|
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.skinId,bestData.damage, allDamage, function(_BattleBestPopup)
|
|
|
|
|
-- 打开关卡奖励界面
|
|
|
|
|
UIManager.OpenPanel(UIName.RewardItemPopup, EndLessMapManager.EndlessDrop, 1,function()
|
|
|
|
|
if _BattleBestPopup then
|
|
|
|
|
_BattleBestPopup:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
2021-09-27 16:57:40 +08:00
|
|
|
|
this:ClosePanel()
|
2021-09-10 18:36:39 +08:00
|
|
|
|
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold)
|
|
|
|
|
end,0, true, true)
|
|
|
|
|
end)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2021-01-07 11:32:26 +08:00
|
|
|
|
-- 兽潮来袭结算界面特殊显示
|
|
|
|
|
function this.ShowBattleResultByMonsterCamp(drop)
|
2021-05-26 11:48:44 +08:00
|
|
|
|
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, drop, 1,function(isBackBattle)
|
2021-07-01 21:07:53 +08:00
|
|
|
|
-- LogPink("isBackBattle "..tostring(isBackBattle))
|
2021-05-26 11:48:44 +08:00
|
|
|
|
if not isBackBattle then
|
|
|
|
|
if _BattleBestPopup then
|
|
|
|
|
_BattleBestPopup:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
this:ClosePanel()
|
|
|
|
|
if m_callBack then m_callBack() end
|
|
|
|
|
--内容优化 心魔试炼推送
|
|
|
|
|
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend,FacePanelType.MonsterWave)
|
|
|
|
|
CheckRedPointStatus(RedPointType.EpicExplore_LevleReward)
|
|
|
|
|
this:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
end, nil, true,true)
|
|
|
|
|
end)
|
2021-01-07 11:32:26 +08:00
|
|
|
|
end
|
2021-05-26 11:48:44 +08:00
|
|
|
|
|
2021-01-07 11:32:26 +08:00
|
|
|
|
end
|
|
|
|
|
-- 新关卡战斗结算界面特殊显示
|
|
|
|
|
function this.ShowBattleResultByStoryFight(drop)
|
|
|
|
|
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, drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
2021-07-01 21:07:53 +08:00
|
|
|
|
-- LogPink("isBackBattle "..tostring(isBackBattle))
|
2021-01-07 11:32:26 +08:00
|
|
|
|
if not isBackBattle then
|
|
|
|
|
if _BattleBestPopup then
|
|
|
|
|
_BattleBestPopup:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
this:ClosePanel()
|
|
|
|
|
-- 再刷新一便关卡信息
|
|
|
|
|
NetManager.InitFightPointLevelInfo()
|
|
|
|
|
end
|
|
|
|
|
end, 1, true, true)
|
|
|
|
|
end)
|
2021-01-07 11:32:26 +08:00
|
|
|
|
else
|
|
|
|
|
-- 打开关卡奖励界面
|
|
|
|
|
UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1,function()
|
2020-06-13 11:47:13 +08:00
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
2021-01-07 11:32:26 +08:00
|
|
|
|
this:ClosePanel()
|
|
|
|
|
end, 1, true)
|
|
|
|
|
end
|
|
|
|
|
end
|
2021-02-22 18:42:26 +08:00
|
|
|
|
--四灵
|
|
|
|
|
function this.ShowBattleResultByFourElement(drop)
|
|
|
|
|
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, MonsterCampManager.drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
|
|
|
|
LogPink("isBackBattle "..tostring(isBackBattle))
|
2021-03-09 16:48:05 +08:00
|
|
|
|
if not isBackBattle then
|
|
|
|
|
MonsterCampManager.fourMonsterData[MonsterCampManager.curType].canFightTime = MonsterCampManager.fourMonsterData[MonsterCampManager.curType].canFightTime - 1
|
|
|
|
|
MonsterCampManager.SaveFormation(MonsterCampManager.curType)
|
2021-02-26 17:44:13 +08:00
|
|
|
|
if MonsterCampManager.fourMonsterData[MonsterCampManager.curType].openState ~= 0 then
|
|
|
|
|
UIManager.OpenPanel(UIName.FourElementMonsterCampPanel,MonsterCampManager.curType)
|
|
|
|
|
else
|
|
|
|
|
UIManager.OpenPanel(UIName.MonsterCampMainPanel)
|
2021-03-09 16:48:05 +08:00
|
|
|
|
end
|
2021-02-22 18:42:26 +08:00
|
|
|
|
if _BattleBestPopup then
|
|
|
|
|
_BattleBestPopup:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
this:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
end, 0, true, true)
|
|
|
|
|
end)
|
2021-01-07 11:32:26 +08:00
|
|
|
|
else
|
|
|
|
|
-- 打开关卡奖励界面
|
|
|
|
|
UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1,function()
|
2020-06-13 11:47:13 +08:00
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
2021-01-07 11:32:26 +08:00
|
|
|
|
this:ClosePanel()
|
|
|
|
|
end, 1, true)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
-- 车迟斗法结算界面特殊显示
|
|
|
|
|
function this.ShowBattleResultByCarDeleayType(drop)
|
|
|
|
|
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
|
|
|
|
if bestData then
|
2021-05-15 14:40:43 +08:00
|
|
|
|
if m_fightType == BATTLE_TYPE.GUILD_CAR_DELAY then
|
|
|
|
|
--车迟抢夺cd计时
|
|
|
|
|
GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot)
|
|
|
|
|
end
|
2021-01-07 11:32:26 +08:00
|
|
|
|
-- 胜利显示本场比赛的表现最好的英雄
|
|
|
|
|
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
|
|
|
|
-- 打开关卡奖励界面
|
|
|
|
|
UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
2021-07-01 21:07:53 +08:00
|
|
|
|
-- LogPink("isBackBattle "..tostring(isBackBattle))
|
2021-01-07 11:32:26 +08:00
|
|
|
|
if not isBackBattle then
|
|
|
|
|
if _BattleBestPopup then
|
|
|
|
|
_BattleBestPopup:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
this:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
end, 3,true,true)
|
|
|
|
|
end)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
-- 猎妖之路结算界面特殊显示
|
|
|
|
|
function this.ShowBattleResultByExpedition(drop)
|
|
|
|
|
this:ClosePanel()
|
|
|
|
|
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
|
|
|
|
if bestData then
|
|
|
|
|
-- 胜利显示本场比赛的表现最好的英雄
|
|
|
|
|
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo--ExpeditionManager.GetCurNodeInfo()
|
|
|
|
|
local func2 = nil
|
|
|
|
|
if GetCurNodeInfo.type == ExpeditionNodeType.Trail then--试炼节点
|
|
|
|
|
func2 = function()
|
|
|
|
|
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
|
2020-06-13 11:47:13 +08:00
|
|
|
|
end
|
2021-01-07 11:32:26 +08:00
|
|
|
|
end
|
|
|
|
|
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
|
|
|
|
--贪婪节点不弹领取圣物
|
|
|
|
|
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点
|
|
|
|
|
if drop.itemlist and #drop.itemlist > 0 then
|
2021-04-21 16:36:12 +08:00
|
|
|
|
--LogGreen("m_battleResult.drop.itemlist "..#m_battleResult.drop.itemlist)
|
2021-01-07 11:32:26 +08:00
|
|
|
|
else
|
2021-04-21 16:36:12 +08:00
|
|
|
|
--LogGreen("贪婪节点无数据")
|
2021-01-07 11:32:26 +08:00
|
|
|
|
end
|
|
|
|
|
UIManager.OpenPanel(UIName.RewardItemPopup,drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
2021-07-01 21:07:53 +08:00
|
|
|
|
-- LogPink("isBackBattle "..tostring(isBackBattle))
|
2021-01-06 16:12:54 +08:00
|
|
|
|
if not isBackBattle then
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
2021-01-07 11:32:26 +08:00
|
|
|
|
if _BattleBestPopup then
|
|
|
|
|
_BattleBestPopup:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
|
2020-05-09 13:31:21 +08:00
|
|
|
|
end
|
2021-01-07 11:32:26 +08:00
|
|
|
|
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
|
2021-01-09 14:20:06 +08:00
|
|
|
|
LogError("试炼节点数据没有")
|
2021-01-07 11:32:26 +08:00
|
|
|
|
end
|
2020-06-03 19:09:01 +08:00
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
2021-04-09 12:26:35 +08:00
|
|
|
|
PopupTipPanel.ShowTip(Language[11459])
|
2021-01-12 14:42:07 +08:00
|
|
|
|
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
|
2021-01-07 11:32:26 +08:00
|
|
|
|
else
|
|
|
|
|
UIManager.OpenPanel(UIName.RewardItemPopup,drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
2021-07-01 21:07:53 +08:00
|
|
|
|
-- LogPink("isBackBattle "..tostring(isBackBattle))
|
2021-01-06 21:04:37 +08:00
|
|
|
|
if not isBackBattle then
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
2021-01-07 11:32:26 +08:00
|
|
|
|
if _BattleBestPopup then
|
|
|
|
|
_BattleBestPopup:ClosePanel()
|
2021-01-06 16:12:54 +08:00
|
|
|
|
end
|
2021-01-07 11:32:26 +08:00
|
|
|
|
if GetCurNodeInfo.holyEquipID and #GetCurNodeInfo.holyEquipID > 0 then
|
|
|
|
|
UIManager.OpenPanel(UIName.ExpeditionSelectHalidomPanel,true,function ()
|
|
|
|
|
end)
|
2021-01-06 16:12:54 +08:00
|
|
|
|
else
|
2021-01-07 11:32:26 +08:00
|
|
|
|
--此时战斗了但没有圣物 所有直接刷新界面动画 后并刷新界面
|
|
|
|
|
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
|
2021-01-06 21:04:37 +08:00
|
|
|
|
end
|
2021-01-07 11:32:26 +08:00
|
|
|
|
end
|
|
|
|
|
end, 0,true,true)
|
2021-01-06 21:04:37 +08:00
|
|
|
|
end
|
2021-01-07 11:32:26 +08:00
|
|
|
|
end,func2)
|
2020-06-03 19:09:01 +08:00
|
|
|
|
end
|
2020-05-09 13:31:21 +08:00
|
|
|
|
end
|
2021-05-11 15:12:37 +08:00
|
|
|
|
|
|
|
|
|
-- 山河社稷图结算界面特殊显示
|
|
|
|
|
function this.ShowBattleResultByFightLevelType(drop)
|
|
|
|
|
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
|
|
|
|
if bestData then
|
|
|
|
|
-- 胜利显示本场比赛的表现最好的英雄
|
|
|
|
|
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
|
|
|
|
-- 打开关卡奖励界面
|
|
|
|
|
local HardStageFightResponseMsg = FightLevelManager.GetHardStageFightResponseMsg()
|
2021-05-15 16:16:46 +08:00
|
|
|
|
local oldBattlefightLevelData = FightLevelManager.GetcurBattlefightLevelData()
|
|
|
|
|
local curBattlefightLevelData = FightLevelManager.GetChapterLevelData(oldBattlefightLevelData.config.Chapter,oldBattlefightLevelData.nodeId)
|
2021-07-01 21:07:53 +08:00
|
|
|
|
-- LogYellow("山河社稷图战斗获得星级 "..HardStageFightResponseMsg.stars.." curBattlefightLevelData.isFirst "..tostring(curBattlefightLevelData.isFirst).." HardStageFightResponseMsg.currentIsHonour "..tostring(HardStageFightResponseMsg.currentIsHonour))
|
2021-05-27 20:17:53 +08:00
|
|
|
|
-- if curBattlefightLevelData.isFirst then
|
|
|
|
|
-- PopupTipPanel.ShowTip("荣耀三星!")
|
|
|
|
|
-- end
|
2021-05-11 15:12:37 +08:00
|
|
|
|
UIManager.OpenPanel(UIName.RewardItemPopup,HardStageFightResponseMsg.drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
|
|
|
|
if not isBackBattle then
|
|
|
|
|
if _BattleBestPopup then
|
|
|
|
|
_BattleBestPopup:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
this:ClosePanel()
|
2021-05-27 23:09:37 +08:00
|
|
|
|
local chapterData = FightLevelManager.GetChapterData(oldBattlefightLevelData.config.Chapter)
|
2021-05-13 09:56:11 +08:00
|
|
|
|
if FightLevelManager.GetisShowChapterOpenPopup() then
|
2021-05-27 23:09:37 +08:00
|
|
|
|
if oldBattlefightLevelData.config.Section == LengthOfTable(chapterData.node) then
|
|
|
|
|
UIManager.OpenPanel(UIName.FightLevelOpenChapterPopup,FightLevelManager.GetCurChapterId(),function()
|
|
|
|
|
end)
|
|
|
|
|
else
|
|
|
|
|
FightLevelManager.SetisShowChapterOpenPopup(false)
|
|
|
|
|
end
|
2021-05-13 09:56:11 +08:00
|
|
|
|
end
|
2021-05-11 15:12:37 +08:00
|
|
|
|
end
|
2021-05-13 09:56:11 +08:00
|
|
|
|
end, 8,true,true)
|
2021-05-11 15:12:37 +08:00
|
|
|
|
end)
|
|
|
|
|
end
|
|
|
|
|
end
|
2021-05-13 20:30:10 +08:00
|
|
|
|
-- 山河社稷图结算界面副关卡特殊显示
|
|
|
|
|
function this.ShowBattleResultByFightLevelAssistantType(drop)
|
|
|
|
|
local bestData, allDamage= BattleRecordManager.GetBattleBestData()
|
|
|
|
|
if bestData then
|
|
|
|
|
-- 胜利显示本场比赛的表现最好的英雄
|
|
|
|
|
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
|
|
|
|
|
-- 打开关卡奖励界面
|
|
|
|
|
local HardStageFightResponseMsg = FightLevelManager.GetHardStageFightResponseMsg()
|
|
|
|
|
LogYellow("山河社稷图战斗获得星级 "..HardStageFightResponseMsg.stars)
|
|
|
|
|
local curBattlefightLevelData = FightLevelManager.GetcurBattlefightLevelData()
|
2021-05-14 15:03:48 +08:00
|
|
|
|
LogYellow("curBattlefightLevelData.state "..curBattlefightLevelData.state)
|
2021-05-13 20:30:10 +08:00
|
|
|
|
if curBattlefightLevelData.state == 0 then--副关卡未通过 第一次通关 展示奖励
|
|
|
|
|
UIManager.OpenPanel(UIName.RewardItemPopup,HardStageFightResponseMsg.drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
|
|
|
|
if not isBackBattle then
|
|
|
|
|
if _BattleBestPopup then
|
|
|
|
|
_BattleBestPopup:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
this:ClosePanel()
|
2021-05-15 16:16:46 +08:00
|
|
|
|
-- Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
|
2021-05-13 20:30:10 +08:00
|
|
|
|
end
|
2021-05-18 15:17:05 +08:00
|
|
|
|
end,nil,true,true)
|
2021-05-13 20:30:10 +08:00
|
|
|
|
elseif curBattlefightLevelData.state == 1 then
|
|
|
|
|
UIManager.OpenPanel(UIName.RewardItemPopup,HardStageFightResponseMsg.drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
|
|
|
|
|
if not isBackBattle then
|
|
|
|
|
if _BattleBestPopup then
|
|
|
|
|
_BattleBestPopup:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
this:ClosePanel()
|
2021-05-15 16:16:46 +08:00
|
|
|
|
-- Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
|
2021-05-13 20:30:10 +08:00
|
|
|
|
end
|
|
|
|
|
end, 9,true,true)
|
|
|
|
|
end
|
|
|
|
|
end)
|
|
|
|
|
end
|
|
|
|
|
end
|
2021-09-10 18:36:39 +08:00
|
|
|
|
|
|
|
|
|
--跨服天梯
|
2021-06-15 20:08:14 +08:00
|
|
|
|
function this.JumpServerHithtLadder()
|
|
|
|
|
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, JumpServerManager.curBattleDrop, 1,function(isBackBattle)
|
|
|
|
|
if not isBackBattle then
|
|
|
|
|
if _BattleBestPopup then
|
|
|
|
|
_BattleBestPopup:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
this:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
end, 0,true,true)
|
2021-07-22 19:01:46 +08:00
|
|
|
|
if m_fightType == BATTLE_TYPE.JumpServerhightLadder then
|
|
|
|
|
local MyRank = JumpServerManager.GetHightLadderDataMyRank()
|
|
|
|
|
local OldMyRank = JumpServerManager.GetHightLadderDataOldMyRank()
|
|
|
|
|
if MyRank ~= OldMyRank then
|
|
|
|
|
PopupTipPanel.ShowTip("挑战成功,罗浮争锋排行已提升至".. MyRank .."名!" )
|
|
|
|
|
elseif MyRank == OldMyRank then
|
|
|
|
|
PopupTipPanel.ShowTip("挑战成功")
|
|
|
|
|
end
|
2021-06-15 20:08:14 +08:00
|
|
|
|
end
|
|
|
|
|
end)
|
|
|
|
|
else
|
|
|
|
|
-- 打开关卡奖励界面
|
|
|
|
|
-- UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
|
|
|
|
if m_battlePanel then
|
|
|
|
|
m_battlePanel:ClosePanel()
|
|
|
|
|
end
|
|
|
|
|
this:ClosePanel()
|
|
|
|
|
-- end)
|
|
|
|
|
end
|
|
|
|
|
end
|
2020-05-09 13:31:21 +08:00
|
|
|
|
--添加事件监听(用于子类重写)
|
|
|
|
|
function BattleWinPopup:AddListener()
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--移除事件监听(用于子类重写)
|
|
|
|
|
function BattleWinPopup:RemoveListener()
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function BattleWinPopup:OnSortingOrderChange()
|
|
|
|
|
Util.AddParticleSortLayer(this.btnWin, self.sortingOrder - orginLayer)
|
|
|
|
|
orginLayer = self.sortingOrder
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--界面打开时调用(用于子类重写)
|
2020-06-03 19:09:01 +08:00
|
|
|
|
function BattleWinPopup:OnOpen(battlePanel, isBack, fightType, result, showRecord, backPanel, func)
|
2020-05-09 13:31:21 +08:00
|
|
|
|
|
|
|
|
|
hadClick = false
|
|
|
|
|
if battlePanel then
|
|
|
|
|
m_battlePanel = battlePanel
|
|
|
|
|
end
|
|
|
|
|
if isBack ~= nil then
|
|
|
|
|
m_isBack = isBack
|
|
|
|
|
end
|
|
|
|
|
if fightType then
|
|
|
|
|
m_fightType = fightType
|
|
|
|
|
end
|
|
|
|
|
if result then
|
|
|
|
|
m_battleResult = result
|
|
|
|
|
end
|
|
|
|
|
m_notShowRecord = false
|
|
|
|
|
if showRecord then
|
|
|
|
|
m_notShowRecord = showRecord
|
|
|
|
|
end
|
|
|
|
|
m_backPanel = nil
|
|
|
|
|
if backPanel then
|
|
|
|
|
m_backPanel = backPanel
|
|
|
|
|
end
|
|
|
|
|
m_callBack = nil
|
|
|
|
|
if func then
|
|
|
|
|
m_callBack = func
|
|
|
|
|
end
|
2020-06-03 19:09:01 +08:00
|
|
|
|
|
|
|
|
|
-- 闪闪闪,一闪而过,舒服的一批
|
|
|
|
|
Timer.New(function()
|
|
|
|
|
self:NextStep()
|
|
|
|
|
end, 0.1):Start()
|
2020-05-09 13:31:21 +08:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--界面关闭时调用(用于子类重写)
|
|
|
|
|
function BattleWinPopup:OnClose()
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--界面销毁时调用(用于子类重写)
|
|
|
|
|
function BattleWinPopup:OnDestroy()
|
2021-04-21 13:12:04 +08:00
|
|
|
|
this.spLoader:Destroy()
|
2020-05-09 13:31:21 +08:00
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
2020-06-23 18:36:24 +08:00
|
|
|
|
return BattleWinPopup
|