Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop
# Conflicts: # Assets/ManagedResources/~Lua/Common/functions.luadev_chengFeng
commit
d5b15a17ee
|
@ -409,13 +409,13 @@ function SetHeroBg(bg,cardBg,star,quality)
|
||||||
local bai = Util.GetGameObject(bg,"Effect_UI_yansekuang_BaiSe")
|
local bai = Util.GetGameObject(bg,"Effect_UI_yansekuang_BaiSe")
|
||||||
if star <= 5 then
|
if star <= 5 then
|
||||||
bg:GetComponent("Image").sprite = Util.LoadSprite(GetHeroCardStarImage[1])
|
bg:GetComponent("Image").sprite = Util.LoadSprite(GetHeroCardStarImage[1])
|
||||||
cardBg:GetComponent("Image").sprite = Util.LoadSprite(GetHeroCardQuantityImage[quality])
|
cardBg:GetComponent("Image").sprite = Util.LoadSprite(GetHeroCardQuantityImage[star])
|
||||||
if hong then
|
if hong then
|
||||||
hong.gameObject:SetActive(false)
|
hong.gameObject:SetActive(false)
|
||||||
end
|
end
|
||||||
if bai then
|
if bai then
|
||||||
bai.gameObject:SetActive(false)
|
bai.gameObject:SetActive(false)
|
||||||
end
|
end
|
||||||
elseif star <= 10 then
|
elseif star <= 10 then
|
||||||
bg:GetComponent("Image").sprite = Util.LoadSprite(GetHeroCardStarImage[2])
|
bg:GetComponent("Image").sprite = Util.LoadSprite(GetHeroCardStarImage[2])
|
||||||
cardBg:GetComponent("Image").sprite = Util.LoadSprite(GetHeroCardQuantityImage[10])
|
cardBg:GetComponent("Image").sprite = Util.LoadSprite(GetHeroCardQuantityImage[10])
|
||||||
|
@ -702,25 +702,39 @@ end
|
||||||
|
|
||||||
--通过item稀有度读取背景框
|
--通过item稀有度读取背景框
|
||||||
function GetQuantityImageByquality(quality,star)
|
function GetQuantityImageByquality(quality,star)
|
||||||
if star and star > 5 then
|
if star then--and star > 5
|
||||||
return "r_characterbg_gules"
|
if star == 1 then
|
||||||
elseif quality == 1 then
|
return "r_characterbg_gray"
|
||||||
return "r_characterbg_gray"
|
elseif star == 2 then
|
||||||
elseif quality == 2 then
|
return "r_characterbg_green"
|
||||||
return "r_characterbg_green"
|
elseif star == 3 then
|
||||||
elseif quality == 3 then
|
return "r_characterbg_blue"
|
||||||
return "r_characterbg_blue"
|
elseif star == 4 then
|
||||||
elseif quality == 4 then
|
return "r_characterbg_purple"
|
||||||
return "r_characterbg_purple"
|
elseif star == 5 then
|
||||||
elseif quality == 5 then
|
return "r_characterbg_goden"
|
||||||
return "r_characterbg_goden"
|
elseif star == 6 then
|
||||||
elseif quality == 6 then
|
return "r_characterbg_gules"
|
||||||
return "r_characterbg_gules"
|
elseif star >= 7 then
|
||||||
elseif quality == 7 then
|
return "t_tongyong_topkaung"
|
||||||
return "t_tongyong_topkaung"
|
end
|
||||||
else
|
else
|
||||||
return "t_tongyong_topkaung"
|
if quality == 0 or quality == 1 then
|
||||||
end
|
return "r_characterbg_gray"
|
||||||
|
elseif quality == 2 then
|
||||||
|
return "r_characterbg_green"
|
||||||
|
elseif quality == 3 then
|
||||||
|
return "r_characterbg_blue"
|
||||||
|
elseif quality == 4 then
|
||||||
|
return "r_characterbg_purple"
|
||||||
|
elseif quality == 5 then
|
||||||
|
return "r_characterbg_goden"
|
||||||
|
elseif quality == 6 then
|
||||||
|
return "r_characterbg_gules"
|
||||||
|
elseif quality >= 7 then
|
||||||
|
return "t_tongyong_topkaung"
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -783,22 +797,38 @@ function GetHeroChipQuantityImageByquality(quality)
|
||||||
end
|
end
|
||||||
--通过Hero稀有度读取背景框(小)
|
--通过Hero稀有度读取背景框(小)
|
||||||
function GetHeroQuantityImageByquality(quality,star)
|
function GetHeroQuantityImageByquality(quality,star)
|
||||||
if star and star > 5 then
|
if star then--and star > 5
|
||||||
return "r_characterbg_gules"
|
if star == 1 then
|
||||||
elseif quality == 0 or quality == 1 then
|
return "r_characterbg_gray"
|
||||||
return "r_characterbg_gray"
|
elseif star == 2 then
|
||||||
elseif quality == 2 then
|
return "r_characterbg_green"
|
||||||
return "r_characterbg_green"
|
elseif star == 3 then
|
||||||
elseif quality == 3 then
|
return "r_characterbg_blue"
|
||||||
return "r_characterbg_blue"
|
elseif star == 4 then
|
||||||
elseif quality == 4 then
|
return "r_characterbg_purple"
|
||||||
return "r_characterbg_purple"
|
elseif star == 5 then
|
||||||
elseif quality == 5 then
|
return "r_characterbg_goden"
|
||||||
return "r_characterbg_goden"
|
elseif star == 6 then
|
||||||
elseif quality == 6 then
|
return "r_characterbg_gules"
|
||||||
return "r_characterbg_gules"
|
elseif star >= 7 then
|
||||||
elseif quality >= 7 then
|
return "t_tongyong_topkaung"
|
||||||
return "t_tongyong_topkaung"
|
end
|
||||||
|
else
|
||||||
|
if quality == 0 or quality == 1 then
|
||||||
|
return "r_characterbg_gray"
|
||||||
|
elseif quality == 2 then
|
||||||
|
return "r_characterbg_green"
|
||||||
|
elseif quality == 3 then
|
||||||
|
return "r_characterbg_blue"
|
||||||
|
elseif quality == 4 then
|
||||||
|
return "r_characterbg_purple"
|
||||||
|
elseif quality == 5 then
|
||||||
|
return "r_characterbg_goden"
|
||||||
|
elseif quality == 6 then
|
||||||
|
return "r_characterbg_gules"
|
||||||
|
elseif quality >= 7 then
|
||||||
|
return "t_tongyong_topkaung"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--通过Hero稀有度读取背景框(卡库)外框
|
--通过Hero稀有度读取背景框(卡库)外框
|
||||||
|
|
|
@ -239,7 +239,6 @@ end
|
||||||
function this.RequestBetBaseInfo(func,isPlayBattle)
|
function this.RequestBetBaseInfo(func,isPlayBattle)
|
||||||
-- 未开启
|
-- 未开启
|
||||||
if not this.IsTopMatchActive() then
|
if not this.IsTopMatchActive() then
|
||||||
LogGreen("this.isCanBet = false ")
|
|
||||||
this.isCanBet = false
|
this.isCanBet = false
|
||||||
if func then func() end
|
if func then func() end
|
||||||
return
|
return
|
||||||
|
@ -248,22 +247,22 @@ function this.RequestBetBaseInfo(func,isPlayBattle)
|
||||||
NetManager.GetBetMatchInfo(0, function(msg)
|
NetManager.GetBetMatchInfo(0, function(msg)
|
||||||
this.betBattleInfo = msg.championBattleInfo
|
this.betBattleInfo = msg.championBattleInfo
|
||||||
isChange = false
|
isChange = false
|
||||||
LogGreen("竞猜双方uid "..msg.championBattleInfo.myInfo.uid.." "..msg.championBattleInfo.enemyInfo.uid)
|
-- LogGreen("竞猜双方uid "..msg.championBattleInfo.myInfo.uid.." "..msg.championBattleInfo.enemyInfo.uid)
|
||||||
this.betRateInfo = msg.championBetInfo
|
this.betRateInfo = msg.championBetInfo
|
||||||
this.myBetTarget = msg.winUid
|
this.myBetTarget = msg.winUid
|
||||||
this.myBetCoins = msg.myBetCoins
|
this.myBetCoins = msg.myBetCoins
|
||||||
LogGreen("this.myBetTarget = msg.winUid "..this.myBetTarget.." "..msg.winUid)
|
-- LogGreen("this.myBetTarget = msg.winUid "..this.myBetTarget.." "..msg.winUid)
|
||||||
this.process = msg.process
|
this.process = msg.process
|
||||||
LogGreen("竞猜msg.process "..msg.process)
|
-- LogGreen("竞猜msg.process "..msg.process)
|
||||||
Log(string.format(Language[10114], msg.winUid, msg.championBetInfo.id, msg.championBetInfo.redCoins, msg.championBetInfo.blueCoins))
|
Log(string.format(Language[10114], msg.winUid, msg.championBetInfo.id, msg.championBetInfo.redCoins, msg.championBetInfo.blueCoins))
|
||||||
-- 可以竞猜了
|
-- 可以竞猜了
|
||||||
this.isCanBet = true
|
this.isCanBet = true
|
||||||
LogGreen("this.isCanBet = true ")
|
-- LogGreen("this.isCanBet = true ")
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.TopMatch.OnGuessDataUpdate)
|
Game.GlobalEvent:DispatchEvent(GameEvent.TopMatch.OnGuessDataUpdate)
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.TopMatch.OnGuessRateUpdate)
|
Game.GlobalEvent:DispatchEvent(GameEvent.TopMatch.OnGuessRateUpdate)
|
||||||
LogGreen("this.baseInfo.battleState "..this.baseInfo.battleState)
|
-- LogGreen("this.baseInfo.battleState "..this.baseInfo.battleState)
|
||||||
if this.baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_END and isPlayBattle then
|
if this.baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_END and isPlayBattle then
|
||||||
LogGreen("this.baseInfo.battleState "..this.baseInfo.battleState)
|
-- LogGreen("this.baseInfo.battleState "..this.baseInfo.battleState)
|
||||||
--当历史战斗记录以决出胜负 说明此时是第三场 不需要自动播放战斗动画
|
--当历史战斗记录以决出胜负 说明此时是第三场 不需要自动播放战斗动画
|
||||||
if not ArenaTopMatchManager.GetIsBattleEndState(this.CurTabIndex) then
|
if not ArenaTopMatchManager.GetIsBattleEndState(this.CurTabIndex) then
|
||||||
--推送信息的not时候判断是否需要播放动画
|
--推送信息的not时候判断是否需要播放动画
|
||||||
|
@ -350,12 +349,12 @@ function this.RequestBetHistory(func)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 竞猜成功回调
|
-- 竞猜成功回调
|
||||||
function this.OnGuessSuccess(msg)
|
-- function this.OnGuessSuccess(msg)
|
||||||
-- LogGreen("竞猜成功回调")
|
-- LogGreen("竞猜成功回调")
|
||||||
-- if this.isLogin then return end--上来就弹新关卡界面 所以不弹
|
-- if this.isLogin then return end--上来就弹新关卡界面 所以不弹
|
||||||
-- if MapManager.isInMap or UIManager.IsOpen(UIName.BattlePanel) or UIManager.IsOpen(UIName.ArenaTopMatchPanel) then return end--在关卡里 副本里不弹 新加巅峰赛界面不弹
|
-- if MapManager.isInMap or UIManager.IsOpen(UIName.BattlePanel) or UIManager.IsOpen(UIName.ArenaTopMatchPanel) then return end--在关卡里 副本里不弹 新加巅峰赛界面不弹
|
||||||
-- UIManager.OpenPanel(UIName.GuessCoinDropPopup, msg.roundTimes, msg.itemId, msg.itemNum)
|
-- UIManager.OpenPanel(UIName.GuessCoinDropPopup, msg.roundTimes, msg.itemId, msg.itemNum)
|
||||||
end
|
-- end
|
||||||
|
|
||||||
-- 判断是否可以竞猜
|
-- 判断是否可以竞猜
|
||||||
function this.IsCanBet()
|
function this.IsCanBet()
|
||||||
|
@ -409,11 +408,11 @@ function this.Request_32_EliminationData(func)
|
||||||
if this.baseInfo.battleStage ~= TOP_MATCH_STAGE.ELIMINATION and this.baseInfo.battleStage~= TOP_MATCH_STAGE.OVER then return end
|
if this.baseInfo.battleStage ~= TOP_MATCH_STAGE.ELIMINATION and this.baseInfo.battleStage~= TOP_MATCH_STAGE.OVER then return end
|
||||||
|
|
||||||
NetManager.GetTopMatchEliminationInfo(1, function(msg)
|
NetManager.GetTopMatchEliminationInfo(1, function(msg)
|
||||||
LogPink("获取32强数据成功, 数据长度 = "..#msg.championBattlePairInfo)
|
-- LogPink("获取32强数据成功, 数据长度 = "..#msg.championBattlePairInfo)
|
||||||
for i = 1, #msg.championBattlePairInfo do
|
-- for i = 1, #msg.championBattlePairInfo do
|
||||||
LogPink("roundTImes "..msg.championBattlePairInfo[i].roundTImes.." .teamId "..msg.championBattlePairInfo[i].teamId.." .position ".. msg.championBattlePairInfo[i].position
|
-- LogPink("roundTImes "..msg.championBattlePairInfo[i].roundTImes.." .teamId "..msg.championBattlePairInfo[i].teamId.." .position ".. msg.championBattlePairInfo[i].position
|
||||||
.." attackInfo.uid ".. msg.championBattlePairInfo[i].attackInfo.uid.." defInfo.uid ".. msg.championBattlePairInfo[i].defInfo.uid.." fightResult ".. msg.championBattlePairInfo[i].fightResult)
|
-- .." attackInfo.uid ".. msg.championBattlePairInfo[i].attackInfo.uid.." defInfo.uid ".. msg.championBattlePairInfo[i].defInfo.uid.." fightResult ".. msg.championBattlePairInfo[i].fightResult)
|
||||||
end
|
-- end
|
||||||
this.EliminationData_32 = this.RequestEliminationDataMerge(msg.championBattlePairInfo)
|
this.EliminationData_32 = this.RequestEliminationDataMerge(msg.championBattlePairInfo)
|
||||||
-- this.EliminationData_32 = msg.championBattlePairInfo
|
-- this.EliminationData_32 = msg.championBattlePairInfo
|
||||||
if func then func() end
|
if func then func() end
|
||||||
|
@ -429,12 +428,12 @@ function this.Request_4_EliminationData(func)
|
||||||
|
|
||||||
NetManager.GetTopMatchEliminationInfo(2, function(msg)
|
NetManager.GetTopMatchEliminationInfo(2, function(msg)
|
||||||
-- this.EliminationData_4 = msg.championBattlePairInfo
|
-- this.EliminationData_4 = msg.championBattlePairInfo
|
||||||
LogPink("获取4强数据成功, 数据长度 = "..#msg.championBattlePairInfo)
|
-- LogPink("获取4强数据成功, 数据长度 = "..#msg.championBattlePairInfo)
|
||||||
for i = 1, #msg.championBattlePairInfo do
|
-- for i = 1, #msg.championBattlePairInfo do
|
||||||
LogPink("roundTImes "..msg.championBattlePairInfo[i].roundTImes.." .teamId "..msg.championBattlePairInfo[i].teamId.." .position ".. msg.championBattlePairInfo[i].position)
|
-- LogPink("roundTImes "..msg.championBattlePairInfo[i].roundTImes.." .teamId "..msg.championBattlePairInfo[i].teamId.." .position ".. msg.championBattlePairInfo[i].position)
|
||||||
end
|
-- end
|
||||||
this.EliminationData_4 = this.RequestEliminationDataMerge(msg.championBattlePairInfo)
|
this.EliminationData_4 = this.RequestEliminationDataMerge(msg.championBattlePairInfo)
|
||||||
LogPink("获取4强数据成功, 数据长度 = "..#this.EliminationData_4)
|
-- LogPink("获取4强数据成功, 数据长度 = "..#this.EliminationData_4)
|
||||||
if func then func() end
|
if func then func() end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -451,7 +450,7 @@ function this.RequestEliminationDataMerge(EliminationData)
|
||||||
table.insert(newEliminationData[curKey],EliminationDataV)
|
table.insert(newEliminationData[curKey],EliminationDataV)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
LogPink("newEliminationData, 数据长度 = "..LengthOfTable(newEliminationData))
|
-- LogPink("newEliminationData, 数据长度 = "..LengthOfTable(newEliminationData))
|
||||||
local datas = {}
|
local datas = {}
|
||||||
for newEliminationDataI, newEliminationDataV in pairs(newEliminationData) do
|
for newEliminationDataI, newEliminationDataV in pairs(newEliminationData) do
|
||||||
-- LogPink("newEliminationDataI "..newEliminationDataI)
|
-- LogPink("newEliminationDataI "..newEliminationDataI)
|
||||||
|
@ -560,7 +559,7 @@ end
|
||||||
|
|
||||||
-- 获取当前阶段名称
|
-- 获取当前阶段名称
|
||||||
function this.GetCurTopMatchName()
|
function this.GetCurTopMatchName()
|
||||||
LogPink("```````````````````````````````````````````````````")
|
-- LogPink("```````````````````````````````````````````````````")
|
||||||
LogPink("this.baseInfo.progress "..this.baseInfo.progress)
|
LogPink("this.baseInfo.progress "..this.baseInfo.progress)
|
||||||
local titleName = Language[10121]--逐胜之巅
|
local titleName = Language[10121]--逐胜之巅
|
||||||
local stageName = ""
|
local stageName = ""
|
||||||
|
@ -676,15 +675,15 @@ function this.GetRankNameByRank(rank)
|
||||||
end
|
end
|
||||||
--- 判断淘汰赛阶段的轮数
|
--- 判断淘汰赛阶段的轮数
|
||||||
local maxTurn = this.GetEliminationMaxRound()
|
local maxTurn = this.GetEliminationMaxRound()
|
||||||
LogPink("maxTurn "..maxTurn)
|
-- LogPink("maxTurn "..maxTurn)
|
||||||
if curTurn <= 0 then curTurn = maxTurn end
|
if curTurn <= 0 then curTurn = maxTurn end
|
||||||
local opTurn = maxTurn - curTurn + 1 --- 将服务器发过来的轮数倒序,方便计算
|
local opTurn = maxTurn - curTurn + 1 --- 将服务器发过来的轮数倒序,方便计算
|
||||||
--- 如果是结算状态,按下一轮处理
|
--- 如果是结算状态,按下一轮处理
|
||||||
LogPink("opTurn "..opTurn)
|
-- LogPink("opTurn "..opTurn)
|
||||||
if curState == TOP_MATCH_TIME_STATE.OPEN_IN_END or curState == TOP_MATCH_TIME_STATE.OVER then
|
if curState == TOP_MATCH_TIME_STATE.OPEN_IN_END or curState == TOP_MATCH_TIME_STATE.OVER then
|
||||||
opTurn = opTurn - 1
|
opTurn = opTurn - 1
|
||||||
end
|
end
|
||||||
LogPink("opTurn "..opTurn)
|
-- LogPink("opTurn "..opTurn)
|
||||||
--- 轮数为0表示决赛的结算阶段
|
--- 轮数为0表示决赛的结算阶段
|
||||||
if opTurn == 0 then
|
if opTurn == 0 then
|
||||||
if rank == 1 then
|
if rank == 1 then
|
||||||
|
@ -777,7 +776,7 @@ function this.RequestRankData(page,func)
|
||||||
local length=#this.rankData
|
local length=#this.rankData
|
||||||
for i, v in ipairs(msg.rankInfos) do
|
for i, v in ipairs(msg.rankInfos) do
|
||||||
if v.personInfo.rank<=8 then
|
if v.personInfo.rank<=8 then
|
||||||
LogGreen("前八名数据 "..length+i.." uid "..v.personInfo.uid)
|
-- LogGreen("前八名数据 "..length+i.." uid "..v.personInfo.uid)
|
||||||
this.rankData[length+i]=v.personInfo
|
this.rankData[length+i]=v.personInfo
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -926,8 +925,8 @@ function this.GetIsBattleEndState(type)
|
||||||
oldTwoOutOfThreeIndex = this.GetBaseData().process
|
oldTwoOutOfThreeIndex = this.GetBaseData().process
|
||||||
elseif type == 2 then--竞猜
|
elseif type == 2 then--竞猜
|
||||||
oldTwoOutOfThreeIndex = this.GetProcess()
|
oldTwoOutOfThreeIndex = this.GetProcess()
|
||||||
LogPink("oldTwoOutOfThreeIndex "..oldTwoOutOfThreeIndex)
|
|
||||||
end
|
end
|
||||||
|
-- LogPink("oldTwoOutOfThreeIndex "..oldTwoOutOfThreeIndex)
|
||||||
local baseData = ArenaTopMatchManager.GetBaseData()
|
local baseData = ArenaTopMatchManager.GetBaseData()
|
||||||
-- 没开启或者开启没参赛都属于未参赛
|
-- 没开启或者开启没参赛都属于未参赛
|
||||||
local isJoin = baseData.joinState == 1
|
local isJoin = baseData.joinState == 1
|
||||||
|
@ -947,7 +946,7 @@ function this.GetCurTabIndex()
|
||||||
end
|
end
|
||||||
--是否显示竞猜结果
|
--是否显示竞猜结果
|
||||||
function this.SetcurIsShowDoGuessPopup(isShow)
|
function this.SetcurIsShowDoGuessPopup(isShow)
|
||||||
LogRed("SetcurIsShowDoGuessPopup "..tostring(isShow))
|
-- LogRed("SetcurIsShowDoGuessPopup "..tostring(isShow))
|
||||||
this.curIsShowDoGuessPopup = isShow
|
this.curIsShowDoGuessPopup = isShow
|
||||||
end
|
end
|
||||||
function this.GetcurIsShowDoGuessPopup()
|
function this.GetcurIsShowDoGuessPopup()
|
||||||
|
@ -973,7 +972,7 @@ function this.ChangeData(type)
|
||||||
oldTwoOutOfThreeIndex = this.GetProcess()
|
oldTwoOutOfThreeIndex = this.GetProcess()
|
||||||
end
|
end
|
||||||
if oldTwoOutOfThreeIndex == 0 or oldTwoOutOfThreeIndex == 1 then
|
if oldTwoOutOfThreeIndex == 0 or oldTwoOutOfThreeIndex == 1 then
|
||||||
LogPink("isChange "..tostring(isChange))
|
-- LogPink("isChange "..tostring(isChange))
|
||||||
if not isChange then
|
if not isChange then
|
||||||
old_baseInfo_battleState = this.baseInfo.battleState
|
old_baseInfo_battleState = this.baseInfo.battleState
|
||||||
old_baseInfo_endTime = this.baseInfo.endTime
|
old_baseInfo_endTime = this.baseInfo.endTime
|
||||||
|
@ -1058,11 +1057,11 @@ function this.RefreshGuessTipView()
|
||||||
local myBetTarget = ArenaTopMatchManager.GetMyBetTarget()
|
local myBetTarget = ArenaTopMatchManager.GetMyBetTarget()
|
||||||
local IsBeted = myBetTarget and myBetTarget ~= 0
|
local IsBeted = myBetTarget and myBetTarget ~= 0
|
||||||
local isShow = ArenaTopMatchManager.GetcurIsShowDoGuessPopup()
|
local isShow = ArenaTopMatchManager.GetcurIsShowDoGuessPopup()
|
||||||
LogGreen("isShow "..tostring(isShow))
|
-- LogGreen("isShow "..tostring(isShow))
|
||||||
-- if
|
-- if
|
||||||
local upWinNum,downWinNum = ArenaTopMatchManager.GetTwoOutOfThreeInfo(2)
|
local upWinNum,downWinNum = ArenaTopMatchManager.GetTwoOutOfThreeInfo(2)
|
||||||
local isBattleEnd = (upWinNum >= 2 or downWinNum >= 2)
|
local isBattleEnd = (upWinNum >= 2 or downWinNum >= 2)
|
||||||
LogRed("三局两胜是否结束 "..tostring(isBattleEnd))
|
-- LogRed("三局两胜是否结束 "..tostring(isBattleEnd))
|
||||||
--打开竞猜提示(处于秋后算账)
|
--打开竞猜提示(处于秋后算账)
|
||||||
if IsBeted and isShow and (isBattleEnd and this.baseInfo.battleStage == TOP_MATCH_STAGE.ELIMINATION or this.baseInfo. battleStage == TOP_MATCH_STAGE.CHOOSE) then
|
if IsBeted and isShow and (isBattleEnd and this.baseInfo.battleStage == TOP_MATCH_STAGE.ELIMINATION or this.baseInfo. battleStage == TOP_MATCH_STAGE.CHOOSE) then
|
||||||
if this.baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_END then
|
if this.baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_END then
|
||||||
|
|
|
@ -90,7 +90,6 @@ function ArenaTopMatchPanel:OnOpen(...)
|
||||||
local args = {...}
|
local args = {...}
|
||||||
this._CurTabIndex = args[1] or 1
|
this._CurTabIndex = args[1] or 1
|
||||||
ArenaTopMatchManager.SetCurTabIndex(this._CurTabIndex)
|
ArenaTopMatchManager.SetCurTabIndex(this._CurTabIndex)
|
||||||
LogGreen("``````````````````````````````````````this._CurTabIndex "..this._CurTabIndex)
|
|
||||||
ArenaTopMatchManager.RequestTopMatchBaseInfo()
|
ArenaTopMatchManager.RequestTopMatchBaseInfo()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -98,12 +97,10 @@ end
|
||||||
function ArenaTopMatchPanel:OnShow()
|
function ArenaTopMatchPanel:OnShow()
|
||||||
commonTitle:OnShow()
|
commonTitle:OnShow()
|
||||||
if this.TabCtrl then
|
if this.TabCtrl then
|
||||||
LogBlue("this._CurTabIndex1 "..this._CurTabIndex)
|
|
||||||
if this._CurTabIndex > 5 then
|
if this._CurTabIndex > 5 then
|
||||||
ArenaTopMatchManager.SetCurTabIndex(2)
|
ArenaTopMatchManager.SetCurTabIndex(2)
|
||||||
end
|
end
|
||||||
this._CurTabIndex = ArenaTopMatchManager.GetCurTabIndex()
|
this._CurTabIndex = ArenaTopMatchManager.GetCurTabIndex()
|
||||||
LogBlue("this._CurTabIndex2 "..this._CurTabIndex)
|
|
||||||
this.TabCtrl:ChangeTab(this._CurTabIndex)
|
this.TabCtrl:ChangeTab(this._CurTabIndex)
|
||||||
end
|
end
|
||||||
SoundManager.PlayMusic(SoundConfig.BGM_Arena)
|
SoundManager.PlayMusic(SoundConfig.BGM_Arena)
|
||||||
|
@ -166,7 +163,6 @@ end
|
||||||
--
|
--
|
||||||
function this.OpenView(index)
|
function this.OpenView(index)
|
||||||
this._CurLogicIndex = index
|
this._CurLogicIndex = index
|
||||||
LogGreen("``````````````````````````````````````index "..index)
|
|
||||||
ArenaTopMatchManager.SetCurTabIndex(index)
|
ArenaTopMatchManager.SetCurTabIndex(index)
|
||||||
this._CurTabIndex = index
|
this._CurTabIndex = index
|
||||||
|
|
||||||
|
@ -206,7 +202,6 @@ function this.OpenView(index)
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.CloseView(index)
|
function this.CloseView(index)
|
||||||
LogGreen(this._CurLogicIndex.." "..index)
|
|
||||||
-- if this._CurLogicIndex ~= index then return end
|
-- if this._CurLogicIndex ~= index then return end
|
||||||
local logic = this.ViewLogicList[index]
|
local logic = this.ViewLogicList[index]
|
||||||
if logic then
|
if logic then
|
||||||
|
|
|
@ -100,7 +100,6 @@ function ATM_EliminationView:OnOpen(...)
|
||||||
this.empty:SetActive(not _IsShowData)
|
this.empty:SetActive(not _IsShowData)
|
||||||
this.middle:SetActive(_IsShowData)
|
this.middle:SetActive(_IsShowData)
|
||||||
GroupIndex=1
|
GroupIndex=1
|
||||||
LogRed("battleState "..battleState)
|
|
||||||
-- if battleState==1 then return end
|
-- if battleState==1 then return end
|
||||||
if this.tabCtrl then
|
if this.tabCtrl then
|
||||||
this.tabCtrl:ChangeTab(1)
|
this.tabCtrl:ChangeTab(1)
|
||||||
|
|
|
@ -51,7 +51,7 @@ local function _CheckGuess()
|
||||||
PopupTipPanel.ShowTip(Language[10166])
|
PopupTipPanel.ShowTip(Language[10166])
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
LogRed("isCanGuessByBattleEndState "..tostring(isCanGuessByBattleEndState))
|
-- LogRed("isCanGuessByBattleEndState "..tostring(isCanGuessByBattleEndState))
|
||||||
if baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_GUESS and isCanGuessByBattleEndState then
|
if baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_GUESS and isCanGuessByBattleEndState then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -204,7 +204,6 @@ function this.RefreshBaseShow()
|
||||||
if IsCanBet then -- 判断是否有竞猜信息
|
if IsCanBet then -- 判断是否有竞猜信息
|
||||||
local betBattleInfo = ArenaTopMatchManager.GetBetBattleInfo()
|
local betBattleInfo = ArenaTopMatchManager.GetBetBattleInfo()
|
||||||
this.emptyPanel:SetActive(false)
|
this.emptyPanel:SetActive(false)
|
||||||
LogGreen("sssssssssssss "..tostring(IsCanBet))
|
|
||||||
this.guessPanel:SetActive(true)
|
this.guessPanel:SetActive(true)
|
||||||
commonInfo.SetActive(true)
|
commonInfo.SetActive(true)
|
||||||
commonInfo.SetInfoData(2, betBattleInfo.myInfo, betBattleInfo.enemyInfo, betBattleInfo.result, false,true)
|
commonInfo.SetInfoData(2, betBattleInfo.myInfo, betBattleInfo.enemyInfo, betBattleInfo.result, false,true)
|
||||||
|
@ -213,21 +212,15 @@ function this.RefreshBaseShow()
|
||||||
-- 刷新赔率显示
|
-- 刷新赔率显示
|
||||||
this.RefreshBetRateShow()
|
this.RefreshBetRateShow()
|
||||||
-- 有战斗结果了就显示查看详细按钮
|
-- 有战斗结果了就显示查看详细按钮
|
||||||
LogGreen("betBattleInfo.result "..betBattleInfo.result)
|
|
||||||
this.battleDetailBtn:SetActive(betBattleInfo.result ~= -1)
|
this.battleDetailBtn:SetActive(betBattleInfo.result ~= -1)
|
||||||
|
|
||||||
local myBetTarget = ArenaTopMatchManager.GetMyBetTarget()
|
local myBetTarget = ArenaTopMatchManager.GetMyBetTarget()
|
||||||
LogGreen(" 本地保存的竞猜uid myBetTarget "..myBetTarget)
|
|
||||||
LogGreen("betBattleInfo.enemyInfo.uid "..betBattleInfo.enemyInfo.uid)
|
|
||||||
LogGreen("betBattleInfo.myInfo.uid "..betBattleInfo.myInfo.uid)
|
|
||||||
local IsBeted = myBetTarget and myBetTarget ~= 0
|
local IsBeted = myBetTarget and myBetTarget ~= 0
|
||||||
local upWinNum,downWinNum = ArenaTopMatchManager.GetTwoOutOfThreeInfo(2)
|
local upWinNum,downWinNum = ArenaTopMatchManager.GetTwoOutOfThreeInfo(2)
|
||||||
isCanGuessByBattleEndState = true
|
isCanGuessByBattleEndState = true
|
||||||
LogRed("isCanGuessByBattleEndState "..tostring(isCanGuessByBattleEndState))
|
|
||||||
if battleStage == TOP_MATCH_STAGE.ELIMINATION then
|
if battleStage == TOP_MATCH_STAGE.ELIMINATION then
|
||||||
if upWinNum ~= 0 or downWinNum ~= 0 then
|
if upWinNum ~= 0 or downWinNum ~= 0 then
|
||||||
isCanGuessByBattleEndState = false
|
isCanGuessByBattleEndState = false
|
||||||
LogRed("isCanGuessByBattleEndState "..tostring(isCanGuessByBattleEndState))
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if IsBeted or not isCanGuessByBattleEndState then
|
if IsBeted or not isCanGuessByBattleEndState then
|
||||||
|
@ -247,7 +240,6 @@ function this.RefreshBaseShow()
|
||||||
this.blueGuess:SetActive(false)
|
this.blueGuess:SetActive(false)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
LogGreen("sssssssssssss "..tostring(IsCanBet))
|
|
||||||
this.emptyPanel:SetActive(true)
|
this.emptyPanel:SetActive(true)
|
||||||
this.guessPanel:SetActive(false)
|
this.guessPanel:SetActive(false)
|
||||||
commonInfo.SetActive(false)
|
commonInfo.SetActive(false)
|
||||||
|
@ -283,7 +275,6 @@ function this.RefreshBetRateShow()
|
||||||
local myBetTarget = ArenaTopMatchManager.GetMyBetTarget()
|
local myBetTarget = ArenaTopMatchManager.GetMyBetTarget()
|
||||||
if battleState == TOP_MATCH_TIME_STATE.OPEN_IN_GUESS and myBetTarget and myBetTarget ~= 0 then
|
if battleState == TOP_MATCH_TIME_STATE.OPEN_IN_GUESS and myBetTarget and myBetTarget ~= 0 then
|
||||||
ArenaTopMatchManager.SetCoinNum(BagManager.GetItemCountById(GUESS_COIN))
|
ArenaTopMatchManager.SetCoinNum(BagManager.GetItemCountById(GUESS_COIN))
|
||||||
Log("<color=yellow>处于战斗时 存储的临时竞猜币数量 "..BagManager.GetItemCountById(GUESS_COIN).."</color>")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -160,9 +160,9 @@ function this.SetPlayerInfo()
|
||||||
local myResult = -1
|
local myResult = -1
|
||||||
local blueInfo = nil
|
local blueInfo = nil
|
||||||
local redInfo = nil
|
local redInfo = nil
|
||||||
LogPink("battleInfo.result "..battleInfo.result)
|
-- LogPink("battleInfo.result "..battleInfo.result)
|
||||||
local battleEndResultSortState = true --true 战斗最终直接赋值 false 颠倒赋值
|
local battleEndResultSortState = true --true 战斗最终直接赋值 false 颠倒赋值
|
||||||
LogRed("PlayerManager.uid "..PlayerManager.uid.." "..attInfo.uid.." "..defInfo.uid)
|
-- LogRed("PlayerManager.uid "..PlayerManager.uid.." "..attInfo.uid.." "..defInfo.uid)
|
||||||
if attInfo.uid == PlayerManager.uid then
|
if attInfo.uid == PlayerManager.uid then
|
||||||
blueInfo = attInfo
|
blueInfo = attInfo
|
||||||
redInfo = defInfo
|
redInfo = defInfo
|
||||||
|
@ -176,7 +176,6 @@ function this.SetPlayerInfo()
|
||||||
end
|
end
|
||||||
battleEndResultSortState = false
|
battleEndResultSortState = false
|
||||||
end
|
end
|
||||||
LogPink("myResult "..myResult)
|
|
||||||
--if battleInfo.result == 0 then -- 如果进攻方失败,则如果我是进攻方则我失败,反之胜利
|
--if battleInfo.result == 0 then -- 如果进攻方失败,则如果我是进攻方则我失败,反之胜利
|
||||||
-- myResult = attInfo.uid == PlayerManager.uid and 0 or 1
|
-- myResult = attInfo.uid == PlayerManager.uid and 0 or 1
|
||||||
--elseif battleInfo.result == 1 then -- 如果进攻方胜利,则如果我是进攻方则我胜利
|
--elseif battleInfo.result == 1 then -- 如果进攻方胜利,则如果我是进攻方则我胜利
|
||||||
|
@ -185,7 +184,6 @@ function this.SetPlayerInfo()
|
||||||
|
|
||||||
local baseData = ArenaTopMatchManager.GetBaseData()
|
local baseData = ArenaTopMatchManager.GetBaseData()
|
||||||
commonInfo.SetActive(true)
|
commonInfo.SetActive(true)
|
||||||
LogRed("battleEndResultSortState "..tostring(battleEndResultSortState))
|
|
||||||
commonInfo.SetInfoData(1, blueInfo, redInfo, myResult, baseData == TOP_MATCH_STAGE.CHOOSE,battleEndResultSortState)
|
commonInfo.SetInfoData(1, blueInfo, redInfo, myResult, baseData == TOP_MATCH_STAGE.CHOOSE,battleEndResultSortState)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -229,7 +227,6 @@ function this.FreshTeam()
|
||||||
end
|
end
|
||||||
local formation = FormationManager.GetFormationByID(FormationTypeDef.ARENA_TOM_MATCH)
|
local formation = FormationManager.GetFormationByID(FormationTypeDef.ARENA_TOM_MATCH)
|
||||||
for i, hero in ipairs(formation.teamHeroInfos) do
|
for i, hero in ipairs(formation.teamHeroInfos) do
|
||||||
LogGreen("hero.position "..hero.position)
|
|
||||||
local heroData = HeroManager.GetSingleHeroData(hero.heroId)
|
local heroData = HeroManager.GetSingleHeroData(hero.heroId)
|
||||||
local heroGo = Util.GetGameObject(this.myBaby[hero.position], "hero")
|
local heroGo = Util.GetGameObject(this.myBaby[hero.position], "hero")
|
||||||
heroGo:SetActive(true)
|
heroGo:SetActive(true)
|
||||||
|
|
|
@ -176,10 +176,14 @@ function this:SortHeroDatas(_heroDatas)
|
||||||
if a.heroConfig.Quality == b.heroConfig.Quality then
|
if a.heroConfig.Quality == b.heroConfig.Quality then
|
||||||
if a.star == b.star then
|
if a.star == b.star then
|
||||||
if a.lv == b.lv then
|
if a.lv == b.lv then
|
||||||
if a.id == b.id then
|
if a.warPower == b.warPower then
|
||||||
return a.sortId > b.sortId
|
if a.id == b.id then
|
||||||
|
return a.sortId > b.sortId
|
||||||
|
else
|
||||||
|
return a.id > b.id
|
||||||
|
end
|
||||||
else
|
else
|
||||||
return a.id > b.id
|
return a.warPower > b.warPower
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return a.lv > b.lv
|
return a.lv > b.lv
|
||||||
|
@ -198,10 +202,14 @@ function this:SortHeroDatas(_heroDatas)
|
||||||
if a.heroConfig.Quality == b.heroConfig.Quality then
|
if a.heroConfig.Quality == b.heroConfig.Quality then
|
||||||
if a.star == b.star then
|
if a.star == b.star then
|
||||||
if a.heroConfig.Natural == b.heroConfig.Natural then
|
if a.heroConfig.Natural == b.heroConfig.Natural then
|
||||||
if a.id == b.id then
|
if a.warPower == b.warPower then
|
||||||
return a.sortId > b.sortId
|
if a.id == b.id then
|
||||||
|
return a.sortId > b.sortId
|
||||||
|
else
|
||||||
|
return a.id > b.id
|
||||||
|
end
|
||||||
else
|
else
|
||||||
return a.id > b.id
|
return a.warPower > b.warPower
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return a.heroConfig.Natural > b.heroConfig.Natural
|
return a.heroConfig.Natural > b.heroConfig.Natural
|
||||||
|
|
|
@ -189,10 +189,14 @@ function this:SortHeroDatas(_heroDatas)
|
||||||
if a.heroConfig.Quality == b.heroConfig.Quality then
|
if a.heroConfig.Quality == b.heroConfig.Quality then
|
||||||
if a.star == b.star then
|
if a.star == b.star then
|
||||||
if a.lv == b.lv then
|
if a.lv == b.lv then
|
||||||
if a.id == b.id then
|
if a.warPower == b.warPower then
|
||||||
return a.sortId > b.sortId
|
if a.id == b.id then
|
||||||
|
return a.sortId > b.sortId
|
||||||
|
else
|
||||||
|
return a.id > b.id
|
||||||
|
end
|
||||||
else
|
else
|
||||||
return a.id > b.id
|
return a.warPower > b.warPower
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return a.lv > b.lv
|
return a.lv > b.lv
|
||||||
|
|
|
@ -259,12 +259,12 @@ function PatFacePanel:OnShowOb3Data()
|
||||||
elseif patFaceSingleData.OpenRules[1] == 7 then
|
elseif patFaceSingleData.OpenRules[1] == 7 then
|
||||||
self.obg3nameText.text = Language[10551]
|
self.obg3nameText.text = Language[10551]
|
||||||
local rewardTable = {}
|
local rewardTable = {}
|
||||||
if patFaceSingleData.Id == 24 then--特殊写 id 不能变
|
-- if patFaceSingleData.Id == 24 then--特殊写 id 不能变
|
||||||
rewardTable = ConfigManager.GetConfigData(ConfigName.ChampionshipReward,1).SeasonReward--巅峰战
|
rewardTable = ConfigManager.GetConfigData(ConfigName.ChampionshipReward,1).SeasonReward--巅峰战
|
||||||
else
|
-- else
|
||||||
local rewardInfo = {77,0}
|
-- local rewardInfo = {77,0}
|
||||||
rewardTable[1] = rewardInfo--巅峰战
|
-- rewardTable[1] = rewardInfo--巅峰战
|
||||||
end
|
-- end
|
||||||
for i = 1, math.max(#guildWarRewardTabs, #rewardTable) do
|
for i = 1, math.max(#guildWarRewardTabs, #rewardTable) do
|
||||||
local go = guildWarRewardTabs[i]
|
local go = guildWarRewardTabs[i]
|
||||||
if not go then
|
if not go then
|
||||||
|
|
|
@ -516,10 +516,14 @@ function this.SortHeroDatas(_heroDatas)
|
||||||
if a.heroConfig.Quality == b.heroConfig.Quality then
|
if a.heroConfig.Quality == b.heroConfig.Quality then
|
||||||
if a.star == b.star then
|
if a.star == b.star then
|
||||||
if a.lv == b.lv then
|
if a.lv == b.lv then
|
||||||
if a.id == b.id then
|
if a.warPower == b.warPower then
|
||||||
return a.sortId > b.sortId
|
if a.id == b.id then
|
||||||
|
return a.sortId > b.sortId
|
||||||
|
else
|
||||||
|
return a.id > b.id
|
||||||
|
end
|
||||||
else
|
else
|
||||||
return a.id > b.id
|
return a.warPower > b.warPower
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return a.lv > b.lv
|
return a.lv > b.lv
|
||||||
|
@ -538,10 +542,14 @@ function this.SortHeroDatas(_heroDatas)
|
||||||
if a.heroConfig.Quality == b.heroConfig.Quality then
|
if a.heroConfig.Quality == b.heroConfig.Quality then
|
||||||
if a.star == b.star then
|
if a.star == b.star then
|
||||||
if a.heroConfig.Natural == b.heroConfig.Natural then
|
if a.heroConfig.Natural == b.heroConfig.Natural then
|
||||||
if a.id == b.id then
|
if a.warPower == b.warPower then
|
||||||
return a.sortId > b.sortId
|
if a.id == b.id then
|
||||||
|
return a.sortId > b.sortId
|
||||||
|
else
|
||||||
|
return a.id > b.id
|
||||||
|
end
|
||||||
else
|
else
|
||||||
return a.id > b.id
|
return a.warPower > b.warPower
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return a.heroConfig.Natural > b.heroConfig.Natural
|
return a.heroConfig.Natural > b.heroConfig.Natural
|
||||||
|
@ -839,12 +847,17 @@ function this.SetOneKeyGo()
|
||||||
local heros = HeroManager.GetAllHeroDatas(limitLevel)
|
local heros = HeroManager.GetAllHeroDatas(limitLevel)
|
||||||
--按战力从大到小排序
|
--按战力从大到小排序
|
||||||
table.sort(heros,function(a,b)
|
table.sort(heros,function(a,b)
|
||||||
local aWarPower = HeroManager.CalculateHeroAllProValList(1,a.dynamicId,false)[HeroProType.WarPower]
|
-- local aWarPower = HeroManager.CalculateHeroAllProValList(1,a.dynamicId,false)[HeroProType.WarPower]
|
||||||
local bWarPower = HeroManager.CalculateHeroAllProValList(1,b.dynamicId,false)[HeroProType.WarPower]
|
-- local bWarPower = HeroManager.CalculateHeroAllProValList(1,b.dynamicId,false)[HeroProType.WarPower]
|
||||||
if aWarPower==bWarPower then
|
-- if aWarPower==bWarPower then
|
||||||
|
-- return a.id>b.id
|
||||||
|
-- else
|
||||||
|
-- return aWarPower>bWarPower
|
||||||
|
-- end
|
||||||
|
if a.warPower == b.bWarPower then
|
||||||
return a.id>b.id
|
return a.id>b.id
|
||||||
else
|
else
|
||||||
return aWarPower>bWarPower
|
return a.aWarPower > b.bWarPower
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
--遍历英雄 去除已上阵英雄
|
--遍历英雄 去除已上阵英雄
|
||||||
|
|
|
@ -1615,6 +1615,11 @@ function this.CalculateHeroAllProValList(_type, _heroDid, isWar, _breakId, _upSt
|
||||||
this.DoubleTableCompound(allHeroProVal, heroSkillAllHeroProVal)
|
this.DoubleTableCompound(allHeroProVal, heroSkillAllHeroProVal)
|
||||||
this.DoubleTableCompound(allHeroProVal, teamAddPro)
|
this.DoubleTableCompound(allHeroProVal, teamAddPro)
|
||||||
end
|
end
|
||||||
|
-- for index, value in pairs(allHeroProVal) do
|
||||||
|
-- if value > 0 then
|
||||||
|
-- LogError("allHeroProVal 最终 加成 "..index.." "..value)
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
--4公式特殊(减乘)所有属性加成
|
--4公式特殊(减乘)所有属性加成
|
||||||
this.DoubleTableCompound(specialProVal, falismanSpecialProVal)
|
this.DoubleTableCompound(specialProVal, falismanSpecialProVal)
|
||||||
--this.DoubleTableCompound(specialProVal,soulPrinSpecialProVal)
|
--this.DoubleTableCompound(specialProVal,soulPrinSpecialProVal)
|
||||||
|
|
|
@ -664,7 +664,7 @@ function this.TopMatchGuessSuccess(buffer)
|
||||||
local data = buffer:DataByte()
|
local data = buffer:DataByte()
|
||||||
local msg = ArenaInfoProto_pb.ChampionGuessSuccessIndication()
|
local msg = ArenaInfoProto_pb.ChampionGuessSuccessIndication()
|
||||||
msg:ParseFromString(data)
|
msg:ParseFromString(data)
|
||||||
ArenaTopMatchManager.OnGuessSuccess(msg)
|
-- ArenaTopMatchManager.OnGuessSuccess(msg)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 巅峰战竞猜成功
|
-- 巅峰战竞猜成功
|
||||||
|
|
|
@ -349,7 +349,7 @@ function RoleInfoPanel:OnShow()
|
||||||
index = i
|
index = i
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
teamHero=FormationManager.GetAllFormationHeroId()
|
teamHero=FormationManager.GetWuJinFormationHeroIds(FormationTypeDef.FORMATION_NORMAL)--
|
||||||
this:UpdateLiveList()--加载当前 和 左右数据
|
this:UpdateLiveList()--加载当前 和 左右数据
|
||||||
if this.leftLiveObj and leftHeroData then
|
if this.leftLiveObj and leftHeroData then
|
||||||
LogError(Language[11833])
|
LogError(Language[11833])
|
||||||
|
|
|
@ -287,19 +287,20 @@ function this:SetSelectBtn()
|
||||||
end
|
end
|
||||||
function this:SortHeroDatas(_heroDatas)
|
function this:SortHeroDatas(_heroDatas)
|
||||||
--上阵最优先,星级优先,同星级等级优先,同星级同等级按sortId排序。排序时降序排序。
|
--上阵最优先,星级优先,同星级等级优先,同星级同等级按sortId排序。排序时降序排序。
|
||||||
Log("sortType "..sortType)
|
|
||||||
table.sort(_heroDatas, function(a, b)
|
table.sort(_heroDatas, function(a, b)
|
||||||
if (teamHero[a.dynamicId] and teamHero[b.dynamicId]) or
|
if (teamHero[a.dynamicId] and teamHero[b.dynamicId]) or (not teamHero[a.dynamicId] and not teamHero[b.dynamicId]) then
|
||||||
(not teamHero[a.dynamicId] and not teamHero[b.dynamicId])
|
|
||||||
then
|
|
||||||
if sortType==SortTypeConst.Lv then
|
if sortType==SortTypeConst.Lv then
|
||||||
if a.lv ==b.lv then
|
if a.lv ==b.lv then
|
||||||
if a.heroConfig.Quality ==b.heroConfig.Quality then--Natural
|
if a.heroConfig.Quality ==b.heroConfig.Quality then--Natural
|
||||||
if a.star == b.star then
|
if a.star == b.star then
|
||||||
if a.heroConfig.Natural ==b.heroConfig.Natural then--Natural
|
if a.warPower == b.warPower then
|
||||||
return a.heroConfig.Id < b.heroConfig.Id
|
if a.heroConfig.Natural ==b.heroConfig.Natural then--Natural
|
||||||
|
return a.heroConfig.Id < b.heroConfig.Id
|
||||||
|
else
|
||||||
|
return a.heroConfig.Natural > b.heroConfig.Natural
|
||||||
|
end
|
||||||
else
|
else
|
||||||
return a.heroConfig.Natural > b.heroConfig.Natural
|
return a.warPower > b.warPower
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return a.star > b.star
|
return a.star > b.star
|
||||||
|
@ -314,11 +315,15 @@ function this:SortHeroDatas(_heroDatas)
|
||||||
if a.heroConfig.Quality ==b.heroConfig.Quality then--Natural
|
if a.heroConfig.Quality ==b.heroConfig.Quality then--Natural
|
||||||
if a.star == b.star then
|
if a.star == b.star then
|
||||||
if a.lv == b.lv then
|
if a.lv == b.lv then
|
||||||
if a.heroConfig.Natural ==b.heroConfig.Natural then--Natural
|
if a.warPower == b.warPower then
|
||||||
return a.heroConfig.Id < b.heroConfig.Id
|
if a.heroConfig.Natural ==b.heroConfig.Natural then--Natural
|
||||||
else
|
return a.heroConfig.Id < b.heroConfig.Id
|
||||||
return a.heroConfig.Natural > b.heroConfig.Natural
|
else
|
||||||
end
|
return a.heroConfig.Natural > b.heroConfig.Natural
|
||||||
|
end
|
||||||
|
else
|
||||||
|
return a.warPower > b.warPower
|
||||||
|
end
|
||||||
else
|
else
|
||||||
return a.lv > b.lv
|
return a.lv > b.lv
|
||||||
end
|
end
|
||||||
|
@ -328,7 +333,7 @@ function this:SortHeroDatas(_heroDatas)
|
||||||
else
|
else
|
||||||
return a.heroConfig.Quality > b.heroConfig.Quality
|
return a.heroConfig.Quality > b.heroConfig.Quality
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return teamHero[a.dynamicId] and not teamHero[b.dynamicId]
|
return teamHero[a.dynamicId] and not teamHero[b.dynamicId]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue