SK_LongZhu
DESKTOP-RH64908\Administrator 2025-08-28 16:13:29 +08:00
parent 40ac819524
commit f162ef1de9
1 changed files with 348 additions and 301 deletions

View File

@ -10,7 +10,7 @@ local m_backPanel
local orginLayer local orginLayer
local m_callBack local m_callBack
local hadClick = false local hadClick = false
local isFightNextClick = false
--初始化组件(用于子类重写) --初始化组件(用于子类重写)
function BattleWinPopup:InitComponent() function BattleWinPopup:InitComponent()
this.spLoader = SpriteLoader.New() this.spLoader = SpriteLoader.New()
@ -21,12 +21,13 @@ end
--绑定事件(用于子类重写) --绑定事件(用于子类重写)
function BattleWinPopup:BindEvent() function BattleWinPopup:BindEvent()
Util.AddClick(this.btnWin, function()
Util.AddClick(this.btnWin, function () if isFightNextClick == false then
self:ClosePanel() self:ClosePanel()
if m_fightType == BATTLE_TYPE.Test then if m_fightType == BATTLE_TYPE.Test then
if m_battlePanel then if m_battlePanel then
m_battlePanel:ClosePanel() m_battlePanel:ClosePanel()
end
end end
end end
end) end)
@ -43,61 +44,68 @@ function BattleWinPopup:NextStep()
self:ClosePanel() self:ClosePanel()
return return
end end
if m_fightType == BATTLE_TYPE.MAP_FIGHT then --副本战斗结算 if m_fightType == BATTLE_TYPE.MAP_FIGHT then --副本战斗结算
this.ShowBattleResultByMapFight() this.ShowBattleResultByMapFight()
elseif m_fightType == BATTLE_TYPE.ELITE_MONSTER 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,
elseif m_fightType == BATTLE_TYPE.MONSTER_CAMP then -- 兽潮来袭 function()
m_battlePanel:ClosePanel()
self:ClosePanel()
end, 1, true)
elseif m_fightType == BATTLE_TYPE.MONSTER_CAMP then -- 兽潮来袭
this.ShowBattleResultByMonsterCamp(m_battleResult.drop) this.ShowBattleResultByMonsterCamp(m_battleResult.drop)
elseif m_fightType == BATTLE_TYPE.STORY_FIGHT then -- 新关卡的战斗 elseif m_fightType == BATTLE_TYPE.STORY_FIGHT then -- 新关卡的战斗
this.ShowBattleResultByStoryFight(m_battleResult.drop) this.ShowBattleResultByStoryFight(m_battleResult.drop)
elseif m_fightType == BATTLE_TYPE.FOURELEMENT then -- 四灵 elseif m_fightType == BATTLE_TYPE.FOURELEMENT then -- 四灵
this.ShowBattleResultByFourElement(m_battleResult.drop) this.ShowBattleResultByFourElement(m_battleResult.drop)
elseif m_fightType == BATTLE_TYPE.EXECUTE_FIGHT then -- 猎妖之路 elseif m_fightType == BATTLE_TYPE.EXECUTE_FIGHT then -- 猎妖之路
this.ShowBattleResultByExpedition(m_battleResult.drop) this.ShowBattleResultByExpedition(m_battleResult.drop)
elseif m_fightType == BATTLE_TYPE.DAILY_CHALLENGE-- 日常副本 elseif m_fightType == BATTLE_TYPE.DAILY_CHALLENGE -- 日常副本
or m_fightType == BATTLE_TYPE.XUAN_YUAN_MIRROR or m_fightType == BATTLE_TYPE.XUAN_YUAN_MIRROR
or m_fightType == BATTLE_TYPE.TRIAL_FIGHT then or m_fightType == BATTLE_TYPE.TRIAL_FIGHT then
m_battlePanel:ClosePanel() self:ClosePanel(m_battleResult.drop) m_battlePanel:ClosePanel()
self:ClosePanel(m_battleResult.drop)
elseif m_fightType == BATTLE_TYPE.GUILD_CAR_DELAY then -- 车迟 elseif m_fightType == BATTLE_TYPE.GUILD_CAR_DELAY then -- 车迟
this.ShowBattleResultByCarDeleayType(m_battleResult.drop) this.ShowBattleResultByCarDeleayType(m_battleResult.drop)
elseif m_fightType == BATTLE_TYPE.XIAOYAOYOU then elseif m_fightType == BATTLE_TYPE.XIAOYAOYOU then
if m_battlePanel then m_battlePanel:ClosePanel()end self:ClosePanel() if m_battlePanel then m_battlePanel:ClosePanel() end
elseif m_fightType == BATTLE_TYPE.FIGHTLEVEL then--山河社稷图主关卡 self:ClosePanel()
elseif m_fightType == BATTLE_TYPE.FIGHTLEVEL then --山河社稷图主关卡
this.ShowBattleResultByFightLevelType(m_battleResult.drop) this.ShowBattleResultByFightLevelType(m_battleResult.drop)
elseif m_fightType == BATTLE_TYPE.FIGHT_ASSISTANT_LEVEL then--山河社稷图副关卡 elseif m_fightType == BATTLE_TYPE.FIGHT_ASSISTANT_LEVEL then --山河社稷图副关卡
this.ShowBattleResultByFightLevelAssistantType(m_battleResult.drop) this.ShowBattleResultByFightLevelAssistantType(m_battleResult.drop)
elseif m_fightType == BATTLE_TYPE.JumpServerhightLadder then -- 跨服天梯的战斗 elseif m_fightType == BATTLE_TYPE.JumpServerhightLadder then -- 跨服天梯的战斗
this.JumpServerHithtLadder() this.JumpServerHithtLadder()
elseif m_fightType == BATTLE_TYPE.EndlessMpaFight then--无尽地图战斗 elseif m_fightType == BATTLE_TYPE.EndlessMpaFight then --无尽地图战斗
this.ShowBattleResultByEndless() this.ShowBattleResultByEndless()
elseif m_fightType == BATTLE_TYPE.QIJIE_FIGHT then--宇宙生存挑战战斗 elseif m_fightType == BATTLE_TYPE.QIJIE_FIGHT then --宇宙生存挑战战斗
this.ShowBattleResultByQiJie() this.ShowBattleResultByQiJie()
elseif m_fightType == BATTLE_TYPE.CHALLENG_COPY_1 or m_fightType == BATTLE_TYPE.CHALLENG_COPY_2 then elseif m_fightType == BATTLE_TYPE.CHALLENG_COPY_1 or m_fightType == BATTLE_TYPE.CHALLENG_COPY_2 then
this.ShowBattleResultByChallengeCopy() this.ShowBattleResultByChallengeCopy()
--新回放功能 --新回放功能
elseif m_fightType == BATTLE_TYPE.BACK_BATTLE then elseif m_fightType == BATTLE_TYPE.BACK_BATTLE then
if BattleManager.GetLastBattleType() == BATTLE_TYPE.STORY_FIGHT then-- 新关卡战斗 if BattleManager.GetLastBattleType() == BATTLE_TYPE.STORY_FIGHT then -- 新关卡战斗
this.ShowBattleResultByStoryFight(BattleManager.GetLastBattleResult().drop) this.ShowBattleResultByStoryFight(BattleManager.GetLastBattleResult().drop)
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.FOURELEMENT then -- 四灵试炼 elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.FOURELEMENT then -- 四灵试炼
this.ShowBattleResultByFourElement(BattleManager.GetLastBattleResult().drop) this.ShowBattleResultByFourElement(BattleManager.GetLastBattleResult().drop)
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.EXECUTE_FIGHT then--猎妖之路 elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.EXECUTE_FIGHT then --猎妖之路
this.ShowBattleResultByExpedition(BattleManager.GetLastBattleResult().drop) this.ShowBattleResultByExpedition(BattleManager.GetLastBattleResult().drop)
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.GUILD_CAR_DELAY then--车迟 elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.GUILD_CAR_DELAY then --车迟
this.ShowBattleResultByCarDeleayType(BattleManager.GetLastBattleResult().drop) this.ShowBattleResultByCarDeleayType(BattleManager.GetLastBattleResult().drop)
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.MONSTER_CAMP then--兽潮来袭 elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.MONSTER_CAMP then --兽潮来袭
this.ShowBattleResultByMonsterCamp(BattleManager.GetLastBattleResult().drop) this.ShowBattleResultByMonsterCamp(BattleManager.GetLastBattleResult().drop)
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.XIAOYAOYOU then elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.XIAOYAOYOU then
if m_battlePanel then m_battlePanel:ClosePanel()end self:ClosePanel() if m_battlePanel then m_battlePanel:ClosePanel() end
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.FIGHTLEVEL then--山河社稷图 self:ClosePanel()
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.FIGHTLEVEL then --山河社稷图
this.ShowBattleResultByFightLevelType(BattleManager.GetLastBattleResult().drop) this.ShowBattleResultByFightLevelType(BattleManager.GetLastBattleResult().drop)
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.FIGHT_ASSISTANT_LEVEL then--山河社稷图副关卡 elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.FIGHT_ASSISTANT_LEVEL then --山河社稷图副关卡
this.ShowBattleResultByFightLevelAssistantType(BattleManager.GetLastBattleResult().drop) this.ShowBattleResultByFightLevelAssistantType(BattleManager.GetLastBattleResult().drop)
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.JumpServerhightLadder then elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.JumpServerhightLadder then
this.JumpServerHithtLadder() this.JumpServerHithtLadder()
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.QIJIE_FIGHT then elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.QIJIE_FIGHT then
this.ShowBattleResultByQiJie() this.ShowBattleResultByQiJie()
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.CHALLENG_COPY_1 or BattleManager.GetLastBattleType() == BATTLE_TYPE.CHALLENG_COPY_2 then elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.CHALLENG_COPY_1 or BattleManager.GetLastBattleType() == BATTLE_TYPE.CHALLENG_COPY_2 then
this.ShowBattleResultByChallengeCopy() this.ShowBattleResultByChallengeCopy()
end end
end end
@ -106,34 +114,13 @@ end
--副本战斗结算 --副本战斗结算
function this.ShowBattleResultByMapFight() function this.ShowBattleResultByMapFight()
local bestData, allDamage= BattleRecordManager.GetBattleBestData() local bestData, allDamage = BattleRecordManager.GetBattleBestData()
FightPointPassManager.oldLevel = PlayerManager.level FightPointPassManager.oldLevel = PlayerManager.level
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, m_battleResult.drop, 1,function() -- 打开关卡奖励界面
if _BattleBestPopup then UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
_BattleBestPopup:ClosePanel()
end
if m_battlePanel then
m_battlePanel:ClosePanel()
end
this:ClosePanel()
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold)
end, 0, true, true)
end)
end
end
--宇宙生存挑战战斗界面特殊显示
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 if _BattleBestPopup then
_BattleBestPopup:ClosePanel() _BattleBestPopup:ClosePanel()
end end
@ -141,111 +128,152 @@ function this.ShowBattleResultByQiJie()
m_battlePanel:ClosePanel() m_battlePanel:ClosePanel()
end end
this:ClosePanel() this:ClosePanel()
end Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold)
end, 10, true,true) end, 0, true, true)
end) end)
end
end
--宇宙生存挑战战斗界面特殊显示
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
end end
--修行挑战战斗界面特殊显示 --修行挑战战斗界面特殊显示
function this.ShowBattleResultByChallengeCopy() function this.ShowBattleResultByChallengeCopy()
LogBlue("--修行挑战战斗界面特殊显示") LogBlue("--修行挑战战斗界面特殊显示")
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, CarbonManager.battleResult.drop, 1,function(isBackBattle) -- 打开关卡奖励界面
if not isBackBattle then UIManager.OpenPanel(UIName.RewardItemPopup, CarbonManager.battleResult.drop, 1, function(isBackBattle)
if _BattleBestPopup then if not isBackBattle then
_BattleBestPopup:ClosePanel() if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
end
if m_battlePanel then
m_battlePanel:ClosePanel()
end
this:ClosePanel()
end end
if m_battlePanel then end, 12, true, true)
m_battlePanel:ClosePanel() end)
end
this:ClosePanel()
end
end, 12 , true,true)
end)
end end
end end
--无尽副本战斗界面特殊显示 --无尽副本战斗界面特殊显示
function this.ShowBattleResultByEndless() function this.ShowBattleResultByEndless()
local bestData, allDamage= BattleRecordManager.GetBattleBestData() local bestData, allDamage = BattleRecordManager.GetBattleBestData()
FightPointPassManager.oldLevel = PlayerManager.level FightPointPassManager.oldLevel = PlayerManager.level
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, EndLessMapManager.EndlessDrop, 1,function() -- 打开关卡奖励界面
if _BattleBestPopup then UIManager.OpenPanel(UIName.RewardItemPopup, EndLessMapManager.EndlessDrop, 1, function()
_BattleBestPopup:ClosePanel() if _BattleBestPopup then
end _BattleBestPopup:ClosePanel()
if m_battlePanel then end
m_battlePanel:ClosePanel() if m_battlePanel then
end m_battlePanel:ClosePanel()
this:ClosePanel() end
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold) this:ClosePanel()
end,0, true, true) Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold)
end) end, 0, true, true)
end)
end end
end end
-- 兽潮来袭结算界面特殊显示 -- 兽潮来袭结算界面特殊显示
function this.ShowBattleResultByMonsterCamp(drop) function this.ShowBattleResultByMonsterCamp(drop)
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, drop, 1,function(isBackBattle) -- 打开关卡奖励界面
-- LogPink("isBackBattle "..tostring(isBackBattle)) UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1, function(isBackBattle)
if not isBackBattle then -- LogPink("isBackBattle "..tostring(isBackBattle))
if _BattleBestPopup then if not isBackBattle then
_BattleBestPopup:ClosePanel() 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
if m_battlePanel then end, nil, true, true)
m_battlePanel:ClosePanel() end)
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)
end end
end end
-- 新关卡战斗结算界面特殊显示 -- 新关卡战斗结算界面特殊显示
function this.ShowBattleResultByStoryFight(drop) 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()
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, drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调 -- 打开关卡奖励界面
-- LogPink("isBackBattle "..tostring(isBackBattle)) UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1,
if not isBackBattle then function(isBackBattle, isFightNext) --isBackBattle true时 为回放不走回调
if _BattleBestPopup then -- LogPink("isBackBattle "..tostring(isBackBattle))
_BattleBestPopup:ClosePanel() if not isBackBattle then
end if _BattleBestPopup then
if m_battlePanel then _BattleBestPopup:ClosePanel()
m_battlePanel:ClosePanel() end
end if m_battlePanel then
this:ClosePanel() m_battlePanel:ClosePanel()
-- 再刷新一便关卡信息 end
NetManager.InitFightPointLevelInfo() this:ClosePanel()
end -- 再刷新一便关卡信息
end, 1, true, true) NetManager.InitFightPointLevelInfo()
end) if isFightNext then
isFightNextClick = true
FightPointPassManager.oldLevel = PlayerManager.level
local MonsterGroupId = FightPointPassManager.GetBattleMonsterGroup()
FightPointPassManager.enterFightBattle = true
FightPointPassManager.ExecuteFightBattle(MonsterGroupId,
FightPointPassManager.curOpenFight, function()
this:ClosePanel()
end)
else
this:ClosePanel()
end
end
end, 1, true, true)
end)
else else
-- 打开关卡奖励界面 -- 打开关卡奖励界面
UIManager.OpenPanel(UIName.RewardItemPopup, 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
@ -253,36 +281,40 @@ function this.ShowBattleResultByStoryFight(drop)
end, 1, true) end, 1, true)
end end
end end
--四灵 --四灵
function this.ShowBattleResultByFourElement(drop) function this.ShowBattleResultByFourElement(drop)
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, MonsterCampManager.drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调 -- 打开关卡奖励界面
LogPink("isBackBattle "..tostring(isBackBattle)) UIManager.OpenPanel(UIName.RewardItemPopup, MonsterCampManager.drop, 1,
if not isBackBattle then function(isBackBattle) --isBackBattle true时 为回放不走回调
MonsterCampManager.fourMonsterData[MonsterCampManager.curType].canFightTime = MonsterCampManager.fourMonsterData[MonsterCampManager.curType].canFightTime - 1 LogPink("isBackBattle " .. tostring(isBackBattle))
MonsterCampManager.SaveFormation(MonsterCampManager.curType) if not isBackBattle then
if MonsterCampManager.fourMonsterData[MonsterCampManager.curType].openState ~= 0 then MonsterCampManager.fourMonsterData[MonsterCampManager.curType].canFightTime =
UIManager.OpenPanel(UIName.FourElementMonsterCampPanel,MonsterCampManager.curType) MonsterCampManager.fourMonsterData[MonsterCampManager.curType].canFightTime - 1
else MonsterCampManager.SaveFormation(MonsterCampManager.curType)
UIManager.OpenPanel(UIName.MonsterCampMainPanel) if MonsterCampManager.fourMonsterData[MonsterCampManager.curType].openState ~= 0 then
end UIManager.OpenPanel(UIName.FourElementMonsterCampPanel, MonsterCampManager.curType)
if _BattleBestPopup then else
_BattleBestPopup:ClosePanel() UIManager.OpenPanel(UIName.MonsterCampMainPanel)
end end
if m_battlePanel then if _BattleBestPopup then
m_battlePanel:ClosePanel() _BattleBestPopup:ClosePanel()
end end
this:ClosePanel() if m_battlePanel then
end m_battlePanel:ClosePanel()
end, 0, true, true) end
end) this:ClosePanel()
end
end, 0, true, true)
end)
else else
-- 打开关卡奖励界面 -- 打开关卡奖励界面
UIManager.OpenPanel(UIName.RewardItemPopup, 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
@ -290,66 +322,71 @@ function this.ShowBattleResultByFourElement(drop)
end, 1, true) end, 1, true)
end end
end end
-- 车迟斗法结算界面特殊显示 -- 车迟斗法结算界面特殊显示
function this.ShowBattleResultByCarDeleayType(drop) function this.ShowBattleResultByCarDeleayType(drop)
local bestData, allDamage= BattleRecordManager.GetBattleBestData() local bestData, allDamage = BattleRecordManager.GetBattleBestData()
if bestData then if bestData then
if m_fightType == BATTLE_TYPE.GUILD_CAR_DELAY then if m_fightType == BATTLE_TYPE.GUILD_CAR_DELAY then
--车迟抢夺cd计时 --车迟抢夺cd计时
GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot) GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot)
end end
-- 胜利显示本场比赛的表现最好的英雄 -- 胜利显示本场比赛的表现最好的英雄
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)--isBackBattle true时 为回放不走回调 -- 打开关卡奖励界面
-- LogPink("isBackBattle "..tostring(isBackBattle)) UIManager.OpenPanel(UIName.RewardItemPopup, nil, 1, function(isBackBattle) --isBackBattle true时 为回放不走回调
if not isBackBattle then -- LogPink("isBackBattle "..tostring(isBackBattle))
if _BattleBestPopup then if not isBackBattle then
_BattleBestPopup:ClosePanel() if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
end
if m_battlePanel then
m_battlePanel:ClosePanel()
end
this:ClosePanel()
end end
if m_battlePanel then end, 3, true, true)
m_battlePanel:ClosePanel() end)
end
this:ClosePanel()
end
end, 3,true,true)
end)
end end
end end
-- 猎妖之路结算界面特殊显示 -- 猎妖之路结算界面特殊显示
function this.ShowBattleResultByExpedition(drop) function this.ShowBattleResultByExpedition(drop)
this:ClosePanel() this:ClosePanel()
local bestData, allDamage= BattleRecordManager.GetBattleBestData() local bestData, allDamage = BattleRecordManager.GetBattleBestData()
if bestData then if bestData then
-- 胜利显示本场比赛的表现最好的英雄 -- 胜利显示本场比赛的表现最好的英雄
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo--ExpeditionManager.GetCurNodeInfo() local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo --ExpeditionManager.GetCurNodeInfo()
local func2 = nil local func2 = nil
if GetCurNodeInfo.type == ExpeditionNodeType.Trail then--试炼节点 if GetCurNodeInfo.type == ExpeditionNodeType.Trail then --试炼节点
func2 = function() func2 = function()
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel) Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
end end
end end
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 --贪婪节点
if drop.itemlist and #drop.itemlist > 0 then if 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("贪婪节点无数据") --LogGreen("贪婪节点无数据")
end end
UIManager.OpenPanel(UIName.RewardItemPopup,drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调 UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1,
-- LogPink("isBackBattle "..tostring(isBackBattle)) function(isBackBattle) --isBackBattle true时 为回放不走回调
if not isBackBattle then -- LogPink("isBackBattle "..tostring(isBackBattle))
if m_battlePanel then if not isBackBattle then
m_battlePanel:ClosePanel() if m_battlePanel then
m_battlePanel:ClosePanel()
end
if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
end
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
end end
if _BattleBestPopup then end, 0, true, true)
_BattleBestPopup:ClosePanel() elseif GetCurNodeInfo.type == ExpeditionNodeType.Trail then --试炼节点
end
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
end
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 if m_battleResult.drop and m_battleResult.drop.soulEquip and #m_battleResult.drop.soulEquip > 0 then
for i = 1, #m_battleResult.drop.soulEquip do for i = 1, #m_battleResult.drop.soulEquip do
ExpeditionManager.InitSingleTreasureData(m_battleResult.drop.soulEquip[i]) ExpeditionManager.InitSingleTreasureData(m_battleResult.drop.soulEquip[i])
@ -366,146 +403,157 @@ function this.ShowBattleResultByExpedition(drop)
PopupTipPanel.ShowTip(Language[11459]) PopupTipPanel.ShowTip(Language[11459])
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel) Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
else else
UIManager.OpenPanel(UIName.RewardItemPopup,drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调 UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1,
-- LogPink("isBackBattle "..tostring(isBackBattle)) function(isBackBattle) --isBackBattle true时 为回放不走回调
if not isBackBattle then -- LogPink("isBackBattle "..tostring(isBackBattle))
if m_battlePanel then if not isBackBattle then
m_battlePanel:ClosePanel() 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 end
if _BattleBestPopup then end, 0, true, true)
_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
end, 0,true,true)
end end
end,func2) end, func2)
end end
end end
-- 山河社稷图结算界面特殊显示 -- 山河社稷图结算界面特殊显示
function this.ShowBattleResultByFightLevelType(drop) function this.ShowBattleResultByFightLevelType(drop)
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)
local HardStageFightResponseMsg = FightLevelManager.GetHardStageFightResponseMsg() -- 打开关卡奖励界面
local oldBattlefightLevelData = FightLevelManager.GetcurBattlefightLevelData() local HardStageFightResponseMsg = FightLevelManager.GetHardStageFightResponseMsg()
local curBattlefightLevelData = FightLevelManager.GetChapterLevelData(oldBattlefightLevelData.config.Chapter,oldBattlefightLevelData.nodeId) local oldBattlefightLevelData = FightLevelManager.GetcurBattlefightLevelData()
-- LogYellow("山河社稷图战斗获得星级 "..HardStageFightResponseMsg.stars.." curBattlefightLevelData.isFirst "..tostring(curBattlefightLevelData.isFirst).." HardStageFightResponseMsg.currentIsHonour "..tostring(HardStageFightResponseMsg.currentIsHonour)) local curBattlefightLevelData = FightLevelManager.GetChapterLevelData(
-- if curBattlefightLevelData.isFirst then oldBattlefightLevelData.config.Chapter, oldBattlefightLevelData.nodeId)
-- PopupTipPanel.ShowTip("荣耀三星!") -- LogYellow("山河社稷图战斗获得星级 "..HardStageFightResponseMsg.stars.." curBattlefightLevelData.isFirst "..tostring(curBattlefightLevelData.isFirst).." HardStageFightResponseMsg.currentIsHonour "..tostring(HardStageFightResponseMsg.currentIsHonour))
-- end -- if curBattlefightLevelData.isFirst then
UIManager.OpenPanel(UIName.RewardItemPopup,HardStageFightResponseMsg.drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调 -- PopupTipPanel.ShowTip("荣耀三星!")
if not isBackBattle then -- end
if _BattleBestPopup then UIManager.OpenPanel(UIName.RewardItemPopup, HardStageFightResponseMsg.drop, 1,
_BattleBestPopup:ClosePanel() function(isBackBattle) --isBackBattle true时 为回放不走回调
end if not isBackBattle then
if m_battlePanel then if _BattleBestPopup then
m_battlePanel:ClosePanel() _BattleBestPopup:ClosePanel()
end end
this:ClosePanel() if m_battlePanel then
local chapterData = FightLevelManager.GetChapterData(oldBattlefightLevelData.config.Chapter) m_battlePanel:ClosePanel()
if FightLevelManager.GetisShowChapterOpenPopup() then end
if oldBattlefightLevelData.config.Section == LengthOfTable(chapterData.node) then this:ClosePanel()
UIManager.OpenPanel(UIName.FightLevelOpenChapterPopup,FightLevelManager.GetCurChapterId(),function() local chapterData = FightLevelManager.GetChapterData(oldBattlefightLevelData.config.Chapter)
end) if FightLevelManager.GetisShowChapterOpenPopup() then
else if oldBattlefightLevelData.config.Section == LengthOfTable(chapterData.node) then
FightLevelManager.SetisShowChapterOpenPopup(false) UIManager.OpenPanel(UIName.FightLevelOpenChapterPopup,
FightLevelManager.GetCurChapterId(), function()
end)
else
FightLevelManager.SetisShowChapterOpenPopup(false)
end
end
end end
end end, 8, true, true)
end end)
end, 8,true,true)
end)
end end
end end
-- 山河社稷图结算界面副关卡特殊显示 -- 山河社稷图结算界面副关卡特殊显示
function this.ShowBattleResultByFightLevelAssistantType(drop) function this.ShowBattleResultByFightLevelAssistantType(drop)
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)
local HardStageFightResponseMsg = FightLevelManager.GetHardStageFightResponseMsg() -- 打开关卡奖励界面
LogYellow("超越之路战斗获得星级 "..HardStageFightResponseMsg.stars) local HardStageFightResponseMsg = FightLevelManager.GetHardStageFightResponseMsg()
local curBattlefightLevelData = FightLevelManager.GetcurBattlefightLevelData() LogYellow("超越之路战斗获得星级 " .. HardStageFightResponseMsg.stars)
LogYellow("curBattlefightLevelData.state "..curBattlefightLevelData.state) local curBattlefightLevelData = FightLevelManager.GetcurBattlefightLevelData()
if curBattlefightLevelData.state == 0 then--副关卡未通过 第一次通关 展示奖励 LogYellow("curBattlefightLevelData.state " .. curBattlefightLevelData.state)
UIManager.OpenPanel(UIName.RewardItemPopup,HardStageFightResponseMsg.drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调 if curBattlefightLevelData.state == 0 then --副关卡未通过 第一次通关 展示奖励
if not isBackBattle then UIManager.OpenPanel(UIName.RewardItemPopup, HardStageFightResponseMsg.drop, 1,
if _BattleBestPopup then function(isBackBattle) --isBackBattle true时 为回放不走回调
_BattleBestPopup:ClosePanel() if not isBackBattle then
end if _BattleBestPopup then
if m_battlePanel then _BattleBestPopup:ClosePanel()
m_battlePanel:ClosePanel() end
end if m_battlePanel then
this:ClosePanel() m_battlePanel:ClosePanel()
-- Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh) end
end this:ClosePanel()
end,nil,true,true) -- Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
elseif curBattlefightLevelData.state == 1 then end
UIManager.OpenPanel(UIName.RewardItemPopup,HardStageFightResponseMsg.drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调 end, nil, true, true)
if not isBackBattle then elseif curBattlefightLevelData.state == 1 then
if _BattleBestPopup then UIManager.OpenPanel(UIName.RewardItemPopup, HardStageFightResponseMsg.drop, 1,
_BattleBestPopup:ClosePanel() function(isBackBattle) --isBackBattle true时 为回放不走回调
end if not isBackBattle then
if m_battlePanel then if _BattleBestPopup then
m_battlePanel:ClosePanel() _BattleBestPopup:ClosePanel()
end end
this:ClosePanel() if m_battlePanel then
-- Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh) m_battlePanel:ClosePanel()
end end
end, 9,true,true) this:ClosePanel()
end -- Game.GlobalEvent:DispatchEvent(GameEvent.FightLevel.MainLevelInfoRefresh)
end) end
end, 9, true, true)
end
end)
end end
end end
--跨服天梯 --跨服天梯
function this.JumpServerHithtLadder() function this.JumpServerHithtLadder()
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, JumpServerManager.curBattleDrop, 1,function(isBackBattle) -- 打开关卡奖励界面
if not isBackBattle then UIManager.OpenPanel(UIName.RewardItemPopup, JumpServerManager.curBattleDrop, 1, function(isBackBattle)
if _BattleBestPopup then if not isBackBattle then
_BattleBestPopup:ClosePanel() if _BattleBestPopup then
_BattleBestPopup:ClosePanel()
end
if m_battlePanel then
m_battlePanel:ClosePanel()
end
this:ClosePanel()
end end
if m_battlePanel then end, 0, true, true)
m_battlePanel:ClosePanel() 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 end
this:ClosePanel()
end end
end, 0,true,true) end)
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
end
end)
else else
-- 打开关卡奖励界面 -- 打开关卡奖励界面
-- UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function() -- UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
if m_battlePanel then if m_battlePanel then
m_battlePanel:ClosePanel() m_battlePanel:ClosePanel()
end end
this:ClosePanel() this:ClosePanel()
-- end) -- end)
end end
end end
--添加事件监听(用于子类重写) --添加事件监听(用于子类重写)
function BattleWinPopup:AddListener() function BattleWinPopup:AddListener()
@ -523,8 +571,8 @@ end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function BattleWinPopup:OnOpen(battlePanel, isBack, fightType, result, showRecord, backPanel, func) function BattleWinPopup:OnOpen(battlePanel, isBack, fightType, result, showRecord, backPanel, func)
hadClick = false hadClick = false
isFightNextClick = false
if battlePanel then if battlePanel then
m_battlePanel = battlePanel m_battlePanel = battlePanel
end end
@ -564,7 +612,6 @@ end
--界面销毁时调用(用于子类重写) --界面销毁时调用(用于子类重写)
function BattleWinPopup:OnDestroy() function BattleWinPopup:OnDestroy()
this.spLoader:Destroy() this.spLoader:Destroy()
end end
return BattleWinPopup return BattleWinPopup