巅峰战提交
parent
1aa78a2dd7
commit
897b14aa65
|
@ -1,6 +1,6 @@
|
||||||
ArenaTopMatchManager = {};
|
ArenaTopMatchManager = {};
|
||||||
local this = ArenaTopMatchManager
|
local this = ArenaTopMatchManager
|
||||||
this.CurTabIndex = 1
|
this.CurTabIndex = 0
|
||||||
this.curIsShowDoGuessPopup = false
|
this.curIsShowDoGuessPopup = false
|
||||||
local stageNameTable = {
|
local stageNameTable = {
|
||||||
[1] = 32 .. Language[10097],--强
|
[1] = 32 .. Language[10097],--强
|
||||||
|
@ -204,11 +204,13 @@ end
|
||||||
|
|
||||||
-- 获取巅峰战基础信息
|
-- 获取巅峰战基础信息
|
||||||
function this.GetBaseData()
|
function this.GetBaseData()
|
||||||
|
this.ChangeData(this.CurTabIndex)
|
||||||
return this.baseInfo
|
return this.baseInfo
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 获取对战信息
|
-- 获取对战信息
|
||||||
function this.GetBattleInfo()
|
function this.GetBattleInfo()
|
||||||
|
this.ChangeData(this.CurTabIndex)
|
||||||
return this.myBattleInfo
|
return this.myBattleInfo
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -366,6 +368,7 @@ end
|
||||||
|
|
||||||
--- 获取竞猜战斗信息
|
--- 获取竞猜战斗信息
|
||||||
function this.GetBetBattleInfo()
|
function this.GetBetBattleInfo()
|
||||||
|
this.ChangeData(this.CurTabIndex)
|
||||||
return this.betBattleInfo
|
return this.betBattleInfo
|
||||||
end
|
end
|
||||||
--- 获取赔率信息
|
--- 获取赔率信息
|
||||||
|
@ -938,5 +941,64 @@ end
|
||||||
function this.GetcurIsShowDoGuessPopup()
|
function this.GetcurIsShowDoGuessPopup()
|
||||||
return this.curIsShowDoGuessPopup
|
return this.curIsShowDoGuessPopup
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local old_baseInfo_battleState = 0--状态 准备 还是 战斗
|
||||||
|
local old_baseInfo_endTime = 0--倒计时时间戳
|
||||||
|
local old_myBattleInfo_result = 0--我的当前战斗结果
|
||||||
|
local old_betBattleInfo_result = 0--竞猜当前战斗结果
|
||||||
|
local isChange = false
|
||||||
|
--当第三场不需要时 需要先端自己改变数据
|
||||||
|
function this.ChangeData(type)
|
||||||
|
if not type then return end
|
||||||
|
local isJoin = this.baseInfo.joinState == 1
|
||||||
|
local isOver = this.baseInfo.progress == -2
|
||||||
|
if not isJoin or isOver or this.baseInfo.battleStage ~= TOP_MATCH_STAGE.ELIMINATION then return end
|
||||||
|
local oldTwoOutOfThreeIndex = nil---历史记录(上次的结果 当前胜负根据战斗结果判断) -1 无记录 0前两场负 1 前两场胜 2 胜 3 负 4 胜负 5 负胜
|
||||||
|
if type == 1 then--我的
|
||||||
|
oldTwoOutOfThreeIndex = this.baseInfo.process
|
||||||
|
elseif type == 2 then--竞猜
|
||||||
|
oldTwoOutOfThreeIndex = this.GetProcess()
|
||||||
|
end
|
||||||
|
if oldTwoOutOfThreeIndex == 0 or oldTwoOutOfThreeIndex == 1 then
|
||||||
|
if not isChange then
|
||||||
|
old_baseInfo_battleState = this.baseInfo.battleState
|
||||||
|
old_baseInfo_endTime = this.baseInfo.endTime
|
||||||
|
|
||||||
|
this.baseInfo.battleState = TOP_MATCH_TIME_STATE.OPEN_IN_END
|
||||||
|
this.baseInfo.endTime = PlayerManager.serverTime
|
||||||
|
if type == 1 then--我的
|
||||||
|
LogRed("当第三场不需要时 需要先端自己改变数据 修改我的")
|
||||||
|
old_myBattleInfo_result = this.myBattleInfo.result
|
||||||
|
this.myBattleInfo.result = oldTwoOutOfThreeIndex--1
|
||||||
|
elseif type == 2 then--竞猜
|
||||||
|
LogRed("当第三场不需要时 需要先端自己改变数据 修改竞猜")
|
||||||
|
old_betBattleInfo_result = this.betBattleInfo.result
|
||||||
|
this.betBattleInfo.result = oldTwoOutOfThreeIndex--1
|
||||||
|
end
|
||||||
|
isChange = true
|
||||||
|
else
|
||||||
|
--不动
|
||||||
|
-- LogRed("当第三场不需要时 需要先端自己改变数据 不动")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if not isChange then
|
||||||
|
--不动
|
||||||
|
-- LogRed("当第三场不需要时 需要先端自己改变数据 不动")
|
||||||
|
else
|
||||||
|
this.baseInfo.battleState = old_baseInfo_battleState
|
||||||
|
this.baseInfo.endTime = old_baseInfo_endTime
|
||||||
|
|
||||||
|
if type == 1 then--我的
|
||||||
|
LogRed("当第三场不需要时 需要先端自己改变数据 返回我的")
|
||||||
|
this.myBattleInfo.result = old_myBattleInfo_result
|
||||||
|
elseif type == 2 then--竞猜
|
||||||
|
LogRed("当第三场不需要时 需要先端自己改变数据 返回竞猜")
|
||||||
|
this.betBattleInfo.result = old_betBattleInfo_result
|
||||||
|
end
|
||||||
|
isChange = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
----------------------
|
----------------------
|
||||||
return this
|
return this
|
|
@ -133,11 +133,11 @@ function this.RefreshRankInfo()
|
||||||
-- if not isShowRank then return end
|
-- if not isShowRank then return end
|
||||||
ArenaTopMatchManager.RequestRankData(1,function()
|
ArenaTopMatchManager.RequestRankData(1,function()
|
||||||
local rankData,madata=ArenaTopMatchManager.GetRankData()
|
local rankData,madata=ArenaTopMatchManager.GetRankData()
|
||||||
if battleStage == TOP_MATCH_STAGE.ELIMINATION and battleTurn==3 and battleState==TOP_MATCH_TIME_STATE.OPEN_IN_END and isShowRank then
|
if battleStage == TOP_MATCH_STAGE.ELIMINATION and battleTurn==4 and battleState==TOP_MATCH_TIME_STATE.OPEN_IN_END and isShowRank then
|
||||||
this.RefreshRankData(rankData,showTip.Four)
|
this.RefreshRankData(rankData,showTip.Four)
|
||||||
elseif battleStage == TOP_MATCH_STAGE.ELIMINATION and battleTurn==4 and battleState==TOP_MATCH_TIME_STATE.OPEN_IN_END and isShowRank then
|
|
||||||
this.RefreshRankData(rankData,showTip.Two)
|
|
||||||
elseif battleStage == TOP_MATCH_STAGE.ELIMINATION and battleTurn==5 and battleState==TOP_MATCH_TIME_STATE.OPEN_IN_END and isShowRank then
|
elseif battleStage == TOP_MATCH_STAGE.ELIMINATION and battleTurn==5 and battleState==TOP_MATCH_TIME_STATE.OPEN_IN_END and isShowRank then
|
||||||
|
this.RefreshRankData(rankData,showTip.Two)
|
||||||
|
elseif battleStage == TOP_MATCH_STAGE.ELIMINATION and battleTurn==6 and battleState==TOP_MATCH_TIME_STATE.OPEN_IN_END and isShowRank then
|
||||||
this.RefreshRankData(rankData,showTip.One)
|
this.RefreshRankData(rankData,showTip.One)
|
||||||
elseif battleStage == TOP_MATCH_STAGE.OVER and battleTurn==-2 and battleState==TOP_MATCH_TIME_STATE.OVER then--后加的结束了 也要显示八强数据
|
elseif battleStage == TOP_MATCH_STAGE.OVER and battleTurn==-2 and battleState==TOP_MATCH_TIME_STATE.OVER then--后加的结束了 也要显示八强数据
|
||||||
this.RefreshRankData(rankData,showTip.Four)
|
this.RefreshRankData(rankData,showTip.Four)
|
||||||
|
|
Loading…
Reference in New Issue