【战斗回放】bug

dev_chengFeng
zhangqiang 2021-01-07 18:03:57 +08:00
parent b63c18ac53
commit bd14d812a3
6 changed files with 42 additions and 10 deletions

View File

@ -2175,6 +2175,7 @@ BATTLE_TYPE = {
GuildTranscript = 14, -- 公会副本
ARENA = 15, -- 竞技场
XINJIANG = 16, --新将来袭
XIAOYAOYOU = 17, --逍遥游战斗
BACK_BATTLE = 1000, -- 系统战斗回放
}
rankKingList={ [1] = { bgImage = "r_zjm_paihangbang_banner04", name = Language[12164] ,rankType = RANK_TYPE.FIGHT_LEVEL_RANK,activiteId = 0,isRankingMainPanelShow = true},

View File

@ -469,6 +469,8 @@ function this.ShowBattleResult(result, msg)
this.ShowBattleResultByCarDeleayType()
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.DEATH_POS then-- 十绝阵结算界面特殊显示
this.ShowBattleResultByDeathPos()
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.BACK or BattleManager.GetLastBattleType() == BATTLE_TYPE.ARENA then
this:ClosePanel()
else
if result == 0 then -- 失败
local haveRecord = BattleRecordManager.isHaveRecord()

View File

@ -12,7 +12,7 @@ function BattleFailPopup:InitComponent()
orginLayer = 0
this.btnClose = Util.GetGameObject(self.gameObject, "Lose")
-- Util.GetGameObject(this.btnClose, "btnBattleBack"):SetActive(false)
this.btnBattleBack = Util.GetGameObject(this.btnClose, "btnBattleBack")
end
--绑定事件(用于子类重写)
@ -46,7 +46,7 @@ function BattleFailPopup:BindEvent()
UIManager.OpenPanel(UIName.DamageResultPanel, 0)
--this.ClosePanelRefreshData()
end)
Util.AddClick(Util.GetGameObject(this.btnClose, "btnBattleBack"), function ()
Util.AddClick(this.btnBattleBack, function ()
LogGreen("isBackBattle = true")
isBackBattle = true
BattleManager.BattleBackFun()
@ -89,6 +89,11 @@ function BattleFailPopup:OnOpen(battlePanel, showRecord, backPanel,_fightType)
FightPointPassManager.FightBattleEnd()
Util.GetGameObject(this.btnClose, "record"):SetActive(m_showRecord)
Util.GetGameObject(this.btnClose,"tip"):SetActive(not fightType ==12)--副本内无法点击招募
if fightType == BATTLE_TYPE.MAP_FIGHT then--地图
this.btnBattleBack:SetActive(false)
else
this.btnBattleBack:SetActive(true)
end
end
@ -112,14 +117,27 @@ function this.ClosePanelRefreshData()
elseif fightType == BATTLE_TYPE.GUILD_CAR_DELAY then--车迟
--车迟抢夺cd计时
GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot)
elseif fightType == BATTLE_TYPE.XIAOYAOYOU then--逍遥游
this.ShowBattleResultByXYY()
--新回放功能
elseif fightType == BATTLE_TYPE.BACK_BATTLE then
if BattleManager.GetLastBattleType() == BATTLE_TYPE.EXECUTE_FIGHT then-- 猎妖之路
this.ShowBattleResultByExpedition()
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.XIAOYAOYOU then-- 逍遥游
this.ShowBattleResultByXYY()
end
end
end
end
-- 逍遥游结算界面特殊显示
function this.ShowBattleResultByXYY()
if not isBackBattle then
XiaoYaoManager.OpenXiaoYaoMap(XiaoYaoManager.curMapId,function()
this.fightBossIndex = XiaoYaoManager.fightBossOldIndex
UIManager.OpenPanel(UIName.XiaoYaoLuckyBossPopup)
end)
end
end
-- 猎妖之路结算界面特殊显示
function this.ShowBattleResultByExpedition()
if not isBackBattle then

View File

@ -78,6 +78,8 @@ function BattleWinPopup:NextStep()
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.XIAOYAOYOU then
if m_battlePanel then m_battlePanel:ClosePanel()end self:ClosePanel()
--新回放功能
elseif m_fightType == BATTLE_TYPE.BACK_BATTLE then
if BattleManager.GetLastBattleType() == BATTLE_TYPE.STORY_FIGHT then-- 新关卡战斗
@ -88,6 +90,8 @@ function BattleWinPopup:NextStep()
this.ShowBattleResultByCarDeleayType(BattleManager.GetLastBattleResult().drop)
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.MONSTER_CAMP then--兽潮来袭
this.ShowBattleResultByMonsterCamp(BattleManager.GetLastBattleResult().drop)
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.XIAOYAOYOU then
if m_battlePanel then m_battlePanel:ClosePanel()end self:ClosePanel()
end
end
end

View File

@ -147,7 +147,11 @@ function RewardItemPopup:OnOpen(...)
this.btnResult:SetActive(haveRecord and args[5])
this.btnBattleBack:SetActive(haveRecord and args[5])
this.btnResultMax:SetActive(haveRecord and args[5])
if BattleManager.GetLastBattleType() == BATTLE_TYPE.MAP_FIGHT then--地图
this.btnBattleBack:SetActive(false)
else
this.btnBattleBack:SetActive(true)
end
-- 设置背景遮罩的显隐
local isHideBG = args[6]
this.btnBack:GetComponent("Image").color = Color.New(0, 0, 0, isHideBG and 0 or 0.8)

View File

@ -292,7 +292,7 @@ function this.GetMonsterDataReMainTimesAndTime()
this.SortMonster(this.MonsterData)
return #this.MonsterData,this.MonsterData[1].remainTime
end
this.fightBossOldIndex = 0
--开始战斗
function this.ExecuteFightBattle(id,func)
NetManager.StartXiaoyaoBossFightRequest(id,function(msg)
@ -300,7 +300,7 @@ function this.ExecuteFightBattle(id,func)
if func then
func()
end
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.DAILY_CHALLENGE,function(result)
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.XIAOYAOYOU,function(result)
Timer.New(function()
if result.result == 1 then
this.UpdateMonsterData(nil,id)
@ -311,11 +311,14 @@ function this.ExecuteFightBattle(id,func)
end)
end)
else
this.UpdateMonsterData(msg.monster)
this.OpenXiaoYaoMap(XiaoYaoManager.curMapId,function()
this.fightBossIndex = id
UIManager.OpenPanel(UIName.XiaoYaoLuckyBossPopup)
end)
-- this.UpdateMonsterData(msg.monster)
-- this.OpenXiaoYaoMap(XiaoYaoManager.curMapId,function()
-- this.fightBossIndex = id
-- UIManager.OpenPanel(UIName.XiaoYaoLuckyBossPopup)
-- end)
this.UpdateMonsterData(msg.monster)
this.fightBossOldIndex = id
end
end, 0.2):Start()
end)