巅峰战

dev_chengFeng
zhangqiang 2020-07-08 20:48:43 +08:00
parent b3dc6d0688
commit 0b40fda687
8 changed files with 191 additions and 28 deletions

View File

@ -39,6 +39,7 @@ CHAMPIONGETINFORESPONSE_MYRANK_FIELD = protobuf.FieldDescriptor();
CHAMPIONGETINFORESPONSE_MAXRANK_FIELD = protobuf.FieldDescriptor();
CHAMPIONGETINFORESPONSE_CHAMPIONBATTLEINFO_FIELD = protobuf.FieldDescriptor();
CHAMPIONGETINFORESPONSE_MYSCORE_FIELD = protobuf.FieldDescriptor();
CHAMPIONGETINFORESPONSE_PROCESS_FIELD = protobuf.FieldDescriptor();
CHAMPIONPROGRESSUPDATEINDICATION = protobuf.Descriptor();
CHAMPIONPROGRESSUPDATEINDICATION_PROGRESS_FIELD = protobuf.FieldDescriptor();
CHAMPIONPROGRESSUPDATEINDICATION_ENDTIME_FIELD = protobuf.FieldDescriptor();
@ -48,6 +49,7 @@ CHAMPIONGETBETRESPONSE = protobuf.Descriptor();
CHAMPIONGETBETRESPONSE_CHAMPIONBATTLEINFO_FIELD = protobuf.FieldDescriptor();
CHAMPIONGETBETRESPONSE_CHAMPIONBETINFO_FIELD = protobuf.FieldDescriptor();
CHAMPIONGETBETRESPONSE_WINUID_FIELD = protobuf.FieldDescriptor();
CHAMPIONGETBETRESPONSE_PROCESS_FIELD = protobuf.FieldDescriptor();
CHAMPIONBETREQEUST = protobuf.Descriptor();
CHAMPIONBETREQEUST_WINUID_FIELD = protobuf.FieldDescriptor();
CHAMPIONBETREQEUST_COINS_FIELD = protobuf.FieldDescriptor();
@ -406,11 +408,21 @@ CHAMPIONGETINFORESPONSE_MYSCORE_FIELD.default_value = 0
CHAMPIONGETINFORESPONSE_MYSCORE_FIELD.type = 5
CHAMPIONGETINFORESPONSE_MYSCORE_FIELD.cpp_type = 1
CHAMPIONGETINFORESPONSE_PROCESS_FIELD.name = "process"
CHAMPIONGETINFORESPONSE_PROCESS_FIELD.full_name = ".com.ljsd.jieling.protocols.ChampionGetInfoResponse.process"
CHAMPIONGETINFORESPONSE_PROCESS_FIELD.number = 8
CHAMPIONGETINFORESPONSE_PROCESS_FIELD.index = 7
CHAMPIONGETINFORESPONSE_PROCESS_FIELD.label = 1
CHAMPIONGETINFORESPONSE_PROCESS_FIELD.has_default_value = false
CHAMPIONGETINFORESPONSE_PROCESS_FIELD.default_value = 0
CHAMPIONGETINFORESPONSE_PROCESS_FIELD.type = 5
CHAMPIONGETINFORESPONSE_PROCESS_FIELD.cpp_type = 1
CHAMPIONGETINFORESPONSE.name = "ChampionGetInfoResponse"
CHAMPIONGETINFORESPONSE.full_name = ".com.ljsd.jieling.protocols.ChampionGetInfoResponse"
CHAMPIONGETINFORESPONSE.nested_types = {}
CHAMPIONGETINFORESPONSE.enum_types = {}
CHAMPIONGETINFORESPONSE.fields = {CHAMPIONGETINFORESPONSE_JOINSTATE_FIELD, CHAMPIONGETINFORESPONSE_PROGRESS_FIELD, CHAMPIONGETINFORESPONSE_ENDTIME_FIELD, CHAMPIONGETINFORESPONSE_MYRANK_FIELD, CHAMPIONGETINFORESPONSE_MAXRANK_FIELD, CHAMPIONGETINFORESPONSE_CHAMPIONBATTLEINFO_FIELD, CHAMPIONGETINFORESPONSE_MYSCORE_FIELD}
CHAMPIONGETINFORESPONSE.fields = {CHAMPIONGETINFORESPONSE_JOINSTATE_FIELD, CHAMPIONGETINFORESPONSE_PROGRESS_FIELD, CHAMPIONGETINFORESPONSE_ENDTIME_FIELD, CHAMPIONGETINFORESPONSE_MYRANK_FIELD, CHAMPIONGETINFORESPONSE_MAXRANK_FIELD, CHAMPIONGETINFORESPONSE_CHAMPIONBATTLEINFO_FIELD, CHAMPIONGETINFORESPONSE_MYSCORE_FIELD, CHAMPIONGETINFORESPONSE_PROCESS_FIELD}
CHAMPIONGETINFORESPONSE.is_extendable = false
CHAMPIONGETINFORESPONSE.extensions = {}
CHAMPIONPROGRESSUPDATEINDICATION_PROGRESS_FIELD.name = "progress"
@ -489,11 +501,21 @@ CHAMPIONGETBETRESPONSE_WINUID_FIELD.default_value = 0
CHAMPIONGETBETRESPONSE_WINUID_FIELD.type = 5
CHAMPIONGETBETRESPONSE_WINUID_FIELD.cpp_type = 1
CHAMPIONGETBETRESPONSE_PROCESS_FIELD.name = "process"
CHAMPIONGETBETRESPONSE_PROCESS_FIELD.full_name = ".com.ljsd.jieling.protocols.ChampionGetBetResponse.process"
CHAMPIONGETBETRESPONSE_PROCESS_FIELD.number = 4
CHAMPIONGETBETRESPONSE_PROCESS_FIELD.index = 3
CHAMPIONGETBETRESPONSE_PROCESS_FIELD.label = 1
CHAMPIONGETBETRESPONSE_PROCESS_FIELD.has_default_value = false
CHAMPIONGETBETRESPONSE_PROCESS_FIELD.default_value = 0
CHAMPIONGETBETRESPONSE_PROCESS_FIELD.type = 5
CHAMPIONGETBETRESPONSE_PROCESS_FIELD.cpp_type = 1
CHAMPIONGETBETRESPONSE.name = "ChampionGetBetResponse"
CHAMPIONGETBETRESPONSE.full_name = ".com.ljsd.jieling.protocols.ChampionGetBetResponse"
CHAMPIONGETBETRESPONSE.nested_types = {}
CHAMPIONGETBETRESPONSE.enum_types = {}
CHAMPIONGETBETRESPONSE.fields = {CHAMPIONGETBETRESPONSE_CHAMPIONBATTLEINFO_FIELD, CHAMPIONGETBETRESPONSE_CHAMPIONBETINFO_FIELD, CHAMPIONGETBETRESPONSE_WINUID_FIELD}
CHAMPIONGETBETRESPONSE.fields = {CHAMPIONGETBETRESPONSE_CHAMPIONBATTLEINFO_FIELD, CHAMPIONGETBETRESPONSE_CHAMPIONBETINFO_FIELD, CHAMPIONGETBETRESPONSE_WINUID_FIELD, CHAMPIONGETBETRESPONSE_PROCESS_FIELD}
CHAMPIONGETBETRESPONSE.is_extendable = false
CHAMPIONGETBETRESPONSE.extensions = {}
CHAMPIONBETREQEUST_WINUID_FIELD.name = "winUid"

View File

@ -1149,8 +1149,8 @@ HERO_EQUIPIDLIST_FIELD.index = 6
HERO_EQUIPIDLIST_FIELD.label = 3
HERO_EQUIPIDLIST_FIELD.has_default_value = false
HERO_EQUIPIDLIST_FIELD.default_value = {}
HERO_EQUIPIDLIST_FIELD.type = 9
HERO_EQUIPIDLIST_FIELD.cpp_type = 9
HERO_EQUIPIDLIST_FIELD.type = 5
HERO_EQUIPIDLIST_FIELD.cpp_type = 1
HERO_CREATETIME_FIELD.name = "createTime"
HERO_CREATETIME_FIELD.full_name = ".com.ljsd.jieling.protocols.Hero.createTime"

View File

@ -115,7 +115,6 @@ COMPLEXEQUIPREQUEST_TYPE_FIELD = protobuf.FieldDescriptor();
COMPLEXEQUIPREQUEST_STAR_FIELD = protobuf.FieldDescriptor();
COMPLEXEQUIPREQUEST_NUM_FIELD = protobuf.FieldDescriptor();
COMPLEXEQUIPRESPONSE = protobuf.Descriptor();
COMPLEXEQUIPRESPONSE_EQUIPIDS_FIELD = protobuf.FieldDescriptor();
COMPLEXEQUIPRESPONSE_DROP_FIELD = protobuf.FieldDescriptor();
COMPLEXJEWELEQUIPREQUEST = protobuf.Descriptor();
COMPLEXJEWELEQUIPREQUEST_TYPE_FIELD = protobuf.FieldDescriptor();
@ -1126,20 +1125,10 @@ COMPLEXEQUIPREQUEST.enum_types = {}
COMPLEXEQUIPREQUEST.fields = {COMPLEXEQUIPREQUEST_TYPE_FIELD, COMPLEXEQUIPREQUEST_STAR_FIELD, COMPLEXEQUIPREQUEST_NUM_FIELD}
COMPLEXEQUIPREQUEST.is_extendable = false
COMPLEXEQUIPREQUEST.extensions = {}
COMPLEXEQUIPRESPONSE_EQUIPIDS_FIELD.name = "equipIds"
COMPLEXEQUIPRESPONSE_EQUIPIDS_FIELD.full_name = ".com.ljsd.jieling.protocols.ComplexEquipResponse.equipIds"
COMPLEXEQUIPRESPONSE_EQUIPIDS_FIELD.number = 1
COMPLEXEQUIPRESPONSE_EQUIPIDS_FIELD.index = 0
COMPLEXEQUIPRESPONSE_EQUIPIDS_FIELD.label = 3
COMPLEXEQUIPRESPONSE_EQUIPIDS_FIELD.has_default_value = false
COMPLEXEQUIPRESPONSE_EQUIPIDS_FIELD.default_value = {}
COMPLEXEQUIPRESPONSE_EQUIPIDS_FIELD.type = 9
COMPLEXEQUIPRESPONSE_EQUIPIDS_FIELD.cpp_type = 9
COMPLEXEQUIPRESPONSE_DROP_FIELD.name = "drop"
COMPLEXEQUIPRESPONSE_DROP_FIELD.full_name = ".com.ljsd.jieling.protocols.ComplexEquipResponse.drop"
COMPLEXEQUIPRESPONSE_DROP_FIELD.number = 2
COMPLEXEQUIPRESPONSE_DROP_FIELD.index = 1
COMPLEXEQUIPRESPONSE_DROP_FIELD.number = 1
COMPLEXEQUIPRESPONSE_DROP_FIELD.index = 0
COMPLEXEQUIPRESPONSE_DROP_FIELD.label = 1
COMPLEXEQUIPRESPONSE_DROP_FIELD.has_default_value = false
COMPLEXEQUIPRESPONSE_DROP_FIELD.default_value = nil
@ -1151,7 +1140,7 @@ COMPLEXEQUIPRESPONSE.name = "ComplexEquipResponse"
COMPLEXEQUIPRESPONSE.full_name = ".com.ljsd.jieling.protocols.ComplexEquipResponse"
COMPLEXEQUIPRESPONSE.nested_types = {}
COMPLEXEQUIPRESPONSE.enum_types = {}
COMPLEXEQUIPRESPONSE.fields = {COMPLEXEQUIPRESPONSE_EQUIPIDS_FIELD, COMPLEXEQUIPRESPONSE_DROP_FIELD}
COMPLEXEQUIPRESPONSE.fields = {COMPLEXEQUIPRESPONSE_DROP_FIELD}
COMPLEXEQUIPRESPONSE.is_extendable = false
COMPLEXEQUIPRESPONSE.extensions = {}
COMPLEXJEWELEQUIPREQUEST_TYPE_FIELD.name = "type"

View File

@ -162,6 +162,7 @@ GETTRIALBOXREWARDREQUEST = protobuf.Descriptor();
GETTRIALBOXREWARDREQUEST_TYPE_FIELD = protobuf.FieldDescriptor();
GETTRIALBOXREWARDRESPONSE = protobuf.Descriptor();
GETTRIALBOXREWARDRESPONSE_BOXDROP_FIELD = protobuf.FieldDescriptor();
GETTRIALBOXREWARDRESPONSE_BUFFIDS_FIELD = protobuf.FieldDescriptor();
USEADDHPITEMREQUEST = protobuf.Descriptor();
USEADDHPITEMREQUEST_HEROID_FIELD = protobuf.FieldDescriptor();
MAPGAMERESPONSE = protobuf.Descriptor();
@ -1650,11 +1651,21 @@ GETTRIALBOXREWARDRESPONSE_BOXDROP_FIELD.message_type = CommonProto_pb.DROP
GETTRIALBOXREWARDRESPONSE_BOXDROP_FIELD.type = 11
GETTRIALBOXREWARDRESPONSE_BOXDROP_FIELD.cpp_type = 10
GETTRIALBOXREWARDRESPONSE_BUFFIDS_FIELD.name = "buffIds"
GETTRIALBOXREWARDRESPONSE_BUFFIDS_FIELD.full_name = ".com.ljsd.jieling.protocols.GetTrialBoxRewardResponse.buffIds"
GETTRIALBOXREWARDRESPONSE_BUFFIDS_FIELD.number = 2
GETTRIALBOXREWARDRESPONSE_BUFFIDS_FIELD.index = 1
GETTRIALBOXREWARDRESPONSE_BUFFIDS_FIELD.label = 3
GETTRIALBOXREWARDRESPONSE_BUFFIDS_FIELD.has_default_value = false
GETTRIALBOXREWARDRESPONSE_BUFFIDS_FIELD.default_value = {}
GETTRIALBOXREWARDRESPONSE_BUFFIDS_FIELD.type = 5
GETTRIALBOXREWARDRESPONSE_BUFFIDS_FIELD.cpp_type = 1
GETTRIALBOXREWARDRESPONSE.name = "GetTrialBoxRewardResponse"
GETTRIALBOXREWARDRESPONSE.full_name = ".com.ljsd.jieling.protocols.GetTrialBoxRewardResponse"
GETTRIALBOXREWARDRESPONSE.nested_types = {}
GETTRIALBOXREWARDRESPONSE.enum_types = {}
GETTRIALBOXREWARDRESPONSE.fields = {GETTRIALBOXREWARDRESPONSE_BOXDROP_FIELD}
GETTRIALBOXREWARDRESPONSE.fields = {GETTRIALBOXREWARDRESPONSE_BOXDROP_FIELD, GETTRIALBOXREWARDRESPONSE_BUFFIDS_FIELD}
GETTRIALBOXREWARDRESPONSE.is_extendable = false
GETTRIALBOXREWARDRESPONSE.extensions = {}
USEADDHPITEMREQUEST_HEROID_FIELD.name = "heroId"

View File

@ -98,19 +98,29 @@ function this.RefreshData(go, itemData)
zhan:SetActive(true)--battleInfo.fightResult == -1
bai:SetActive(battleInfo.fightResult ~= -1)--battleInfo.fightResult == 0
sheng:SetActive(battleInfo.fightResult ~= -1)--battleInfo.fightResult == 1
local betResult = tonumber(itemData.betResult)
local personInfo1uid = tonumber(personInfo[1].uid)
local personInfo2uid = tonumber(personInfo[2].uid)
LogBlue("battleInfo.fightResult "..battleInfo.fightResult)
if itemData.betResult == 2 then--ChampionMyBetDetail 目前判断不了谁胜谁败
if betResult > 1 and betResult ==personInfo1uid then
sheng.transform:SetParent(shengOrBaiParent1.transform)
bai.transform:SetParent(shengOrBaiParent2.transform)
elseif itemData.betResult == 3 then
elseif betResult > 1 and betResult == personInfo2uid then
sheng.transform:SetParent(shengOrBaiParent2.transform)
bai.transform:SetParent(shengOrBaiParent1.transform)
end
sheng.transform.localPosition = Vector3.zero
bai.transform.localPosition = Vector3.zero
Log(itemData.betResult)
local config = stateConfig[itemData.betResult]
local index = betResult
if betResult > 1 then
if betResult == personInfo1uid then
index = 2
elseif betResult == personInfo2uid then
index = 3
end
end
LogGreen("index "..index)
local config = stateConfig[index]
state.text = config.name
state.color = config.color

View File

@ -12,6 +12,7 @@ function this.Initialize()
this.betBattleInfo = {}
this.betRateInfo = {}
this.myBetTarget = nil
this.process = nil
this.betHistoryInfo = {}
this.coinNum=0 --竞猜币临时数据
-- this.isGuessTipView=false--是否打开竞猜提示面板
@ -69,6 +70,7 @@ function this.RequestTopMatchBaseInfo(func)
this.baseInfo.myrank = msg.myrank
this.baseInfo.maxRank = msg.maxRank
this.baseInfo.myscore = msg.myscore
this.baseInfo.process = msg.process--2 胜 3 负 4 胜负 5 负胜
this.myBattleInfo = msg.championBattleInfo
this.RefreshBaseInfo()
@ -235,6 +237,7 @@ function this.RequestBetBaseInfo(func,isPlayBattle)
this.betBattleInfo = msg.championBattleInfo
this.betRateInfo = msg.championBetInfo
this.myBetTarget = msg.winUid
this.process = msg.process
Log(string.format(Language[10114], msg.winUid, msg.championBetInfo.id, msg.championBetInfo.redCoins, msg.championBetInfo.blueCoins))
LogGreen("this.isCanBet = true ")
@ -353,7 +356,10 @@ end
function this.GetMyBetTarget()
return this.myBetTarget
end
--- 获取竞猜三局两胜数据
function this.GetProcess()
return this.process
end
-- 获取历史竞猜记录
function this.GetBetHistory()
return this.betHistoryInfo
@ -660,5 +666,108 @@ end
function this.GetRewardData()
return this.rewardData
end
--三局两胜获取显示数据
function this.GetTwoOutOfThreeInfo(type)
local oldTwoOutOfThreeIndex = nil---历史记录(上次的结果 当前胜负根据战斗结果判断) 1 无记录 0前两场负 1 前两场胜 2 胜 3 负 4 胜负 5 负胜
local curBattleResult = nil--当前胜负 -1 未开始 0 负 1 胜
if type == 1 then--我的
oldTwoOutOfThreeIndex = this.GetBaseData().process
curBattleResult = this.GetBattleInfo().result
elseif type == 2 then--竞猜
oldTwoOutOfThreeIndex = this.GetProcess()
curBattleResult = this.GetBetBattleInfo().result
end
LogGreen("oldTwoOutOfThreeIndex "..oldTwoOutOfThreeIndex)
if curBattleResult then
LogGreen(" curBattleResult "..curBattleResult)
end
if oldTwoOutOfThreeIndex == -1 then--无记录
if not curBattleResult then
LogGreen(" return 0,0")
return 0,0
else
if curBattleResult == -1 then
LogGreen(" return 0,0")
return 0,0
elseif curBattleResult == 0 then
LogGreen(" return 0,1")
return 0,1
elseif curBattleResult == 1 then
LogGreen(" return 1,0")
return 1,0
end
end
elseif oldTwoOutOfThreeIndex == 2 then--胜
if not curBattleResult then
LogGreen(" return 1,0")
return 1,0
else
if curBattleResult == -1 then
LogGreen(" return 1,0")
return 1,0
elseif curBattleResult == 0 then
LogGreen(" return 1,1")
return 1,1
elseif curBattleResult == 1 then
LogGreen(" return 2,0")
return 2,0
end
end
elseif oldTwoOutOfThreeIndex == 3 then--负
if not curBattleResult then
LogGreen(" return 0,1")
return 0,1
else
if curBattleResult == -1 then
LogGreen(" return 0,1")
return 0,1
elseif curBattleResult == 0 then
LogGreen(" return 0,2")
return 0,2
elseif curBattleResult == 1 then
LogGreen(" return 1,1")
return 1,1
end
end
elseif oldTwoOutOfThreeIndex == 4 then--胜负
if not curBattleResult then
LogGreen(" return 1,1")
return 1,1
else
if curBattleResult == -1 then
LogGreen(" return 1,1")
return 1,1
elseif curBattleResult == 0 then
LogGreen(" return 1,2")
return 1,2
elseif curBattleResult == 1 then
LogGreen(" return 2,1")
return 2,1
end
end
elseif oldTwoOutOfThreeIndex == 5 then--负胜
if not curBattleResult then
LogGreen(" return 1,1")
return 1,1
else
if curBattleResult == -1 then
LogGreen(" return 1,1")
return 1,1
elseif curBattleResult == 0 then
LogGreen(" return 1,2")
return 1,2
elseif curBattleResult == 1 then
LogGreen(" return 2,1")
return 2,1
end
end
elseif oldTwoOutOfThreeIndex == 0 then--负负
LogGreen(" return 0,2")
return 0,2
elseif oldTwoOutOfThreeIndex == 1 then--胜胜
LogGreen(" return 2,0")
return 2,0
end
end
----------------------
return this

View File

@ -39,6 +39,8 @@ function this.InitComponent(root)
this.LeftWinNum = {}
this.RightWinNum = {}
this.LeftWinNumGo = Util.GetGameObject(this.infoPanel, "Left/winNum")
this.RightWinNumGo = Util.GetGameObject(this.infoPanel, "Right/winNum")
for i = 1, 3 do
this.LeftWinNum[i] = Util.GetGameObject(this.infoPanel, "Left/winNum/winNum (".. i ..")")
this.RightWinNum[i] = Util.GetGameObject(this.infoPanel, "Right/winNum/winNum (".. i ..")")
@ -111,7 +113,7 @@ function this.SetInfoData(panelType, blueData, redData, textType, showScore)
this.SetRedInfo(redData, textType)
this.FreshTeam(blueData.team, true)
this.FreshTeam(redData.team, false)
this.RefreshTwoOutOfThreeData()
end
@ -192,9 +194,28 @@ function this.RefreshData(showScore, textType)
this.btnBlueFormat:SetActive(false)
this.btnRedFormat:SetActive(false)
end
end
function this.RefreshTwoOutOfThreeData()
this.LeftWinNumGo:SetActive(ArenaTopMatchManager.GetBaseData().battleStage == TOP_MATCH_STAGE.ELIMINATION)
this.RightWinNumGo:SetActive(ArenaTopMatchManager.GetBaseData().battleStage == TOP_MATCH_STAGE.ELIMINATION)
if ArenaTopMatchManager.GetBaseData().battleStage == TOP_MATCH_STAGE.ELIMINATION then
local upWinNum,downWinNum = ArenaTopMatchManager.GetTwoOutOfThreeInfo(this.panelType)
for i = 1, 3 do
if upWinNum >= i then
this.LeftWinNum[i]:SetActive(true)
else
this.LeftWinNum[i]:SetActive(false)
end
if downWinNum >= i then
this.RightWinNum[i]:SetActive(true)
else
this.RightWinNum[i]:SetActive(false)
end
end
end
end
function this.FreshTeam(formation, isBlue)
local teamRoot = isBlue and this.myBaby or this.damnEvil

View File

@ -274,6 +274,7 @@ function this.Set32Group(index)
this.SetGuessBtn(guessBtn,v.isGUess)
end
if v.roundTImes==9 then
LogGreen("v.position "..v.position)
local item1= Util.GetGameObject(this.thirtyTwoPre,"Pos"..(v.position+4).."/ItemPre (1)")
local item2= Util.GetGameObject(this.thirtyTwoPre,"Pos"..(v.position+4).."/ItemPre (2)")
local playBackBtn=Util.GetGameObject(this.thirtyTwoPre,"Pos"..(v.position+4).."/PlayBackBtn")