diff --git a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ATMMyGuessHistoryPopup.lua b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ATMMyGuessHistoryPopup.lua index 43649b7bcd..6bcadfc044 100644 --- a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ATMMyGuessHistoryPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ATMMyGuessHistoryPopup.lua @@ -102,13 +102,24 @@ function this.RefreshData(go, itemData) local betResult = tonumber(itemData.betResult) local personInfo1uid = tonumber(personInfo[1].uid) local personInfo2uid = tonumber(personInfo[2].uid) - LogBlue("battleInfo.fightResult "..battleInfo.fightResult.." itemData.betResult "..itemData.betResult) - if betResult > 1 and betResult ==personInfo1uid and itemData.myWinCoins > 0 then - sheng.transform:SetParent(shengOrBaiParent1.transform) - bai.transform:SetParent(shengOrBaiParent2.transform) - elseif betResult > 1 and betResult == personInfo2uid and itemData.myWinCoins > 0 then - sheng.transform:SetParent(shengOrBaiParent2.transform) - bai.transform:SetParent(shengOrBaiParent1.transform) + -- LogBlue("battleInfo.fightResult "..battleInfo.fightResult.." itemData.betResult "..itemData.betResult) + -- LogBlue("personInfo1uid "..personInfo1uid.." personInfo2uid "..personInfo2uid.." itemData.myWinCoins "..itemData.myWinCoins) + if betResult > 1 and betResult ==personInfo1uid then + if itemData.myWinCoins > 0 then + sheng.transform:SetParent(shengOrBaiParent1.transform) + bai.transform:SetParent(shengOrBaiParent2.transform) + else + sheng.transform:SetParent(shengOrBaiParent2.transform) + bai.transform:SetParent(shengOrBaiParent1.transform) + end + elseif betResult > 1 and betResult == personInfo2uid then + if itemData.myWinCoins > 0 then + sheng.transform:SetParent(shengOrBaiParent2.transform) + bai.transform:SetParent(shengOrBaiParent1.transform) + else + sheng.transform:SetParent(shengOrBaiParent1.transform) + bai.transform:SetParent(shengOrBaiParent2.transform) + end end sheng.transform.localPosition = Vector3.zero bai.transform.localPosition = Vector3.zero diff --git a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_GuessView.lua b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_GuessView.lua index 579e1dd2b1..627a24cbc8 100644 --- a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_GuessView.lua +++ b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_GuessView.lua @@ -5,6 +5,7 @@ local matchPanel=require("Modules/ArenaTopMatch/ArenaTopMatchPanel") local GUESS_COIN = ArenaTopMatchManager.GetGuessCoinID() local battleStage=0 local isCanGuessByBattleEndState = true +local isShow = false --初始化组件(用于子类重写) function ATM_GuessView:InitComponent() this.guessPanel = Util.GetGameObject(this.transform, "guessbox") @@ -165,17 +166,7 @@ function ATM_GuessView:OnOpen(...) -- this.testTimer:Start() -- end - - - - - - local isActive = ArenaTopMatchManager.IsTopMatchActive() - battleStage = ArenaTopMatchManager.GetBaseData().battleStage - local isShow = isActive and (battleStage == TOP_MATCH_STAGE.ELIMINATION or battleStage == TOP_MATCH_STAGE.CHOOSE) - LogGreen("battleStage "..battleStage.." isActive "..tostring(isActive).." isShow "..tostring(isShow)) - this.guessPanel:SetActive(isShow) - this.emptyPanel:SetActive(not isShow) + this.OnShowRefresh() if not isShow then return end -- 获取数据 @@ -198,9 +189,19 @@ end --界面打开或者重新打开后,界面刷新时调用(用于子类重写) function ATM_GuessView:OnShow() end - +function this.OnShowRefresh() + local isActive = ArenaTopMatchManager.IsTopMatchActive() + battleStage = ArenaTopMatchManager.GetBaseData().battleStage + local progress = ArenaTopMatchManager.GetBaseData().progress + isShow = isActive and (battleStage == TOP_MATCH_STAGE.ELIMINATION or battleStage == TOP_MATCH_STAGE.CHOOSE) and progress ~= -2 + -- LogGreen("battleStage "..battleStage.." isActive "..tostring(isActive).." progress "..progress.." isShow "..tostring(isShow)) + this.guessPanel:SetActive(isShow) + commonInfo.SetActive(isShow) + this.emptyPanel:SetActive(not isShow) +end function this.RefreshBaseShow() local IsCanBet = ArenaTopMatchManager.IsCanBet() + -- LogGreen("IsCanBet "..tostring(IsCanBet)) if IsCanBet then -- 判断是否有竞猜信息 local betBattleInfo = ArenaTopMatchManager.GetBetBattleInfo() this.emptyPanel:SetActive(false) @@ -244,6 +245,7 @@ function this.RefreshBaseShow() this.guessPanel:SetActive(false) commonInfo.SetActive(false) end + this.OnShowRefresh() end -- 刷新赔率显示 diff --git a/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua b/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua index 3f720941dc..5548509468 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua @@ -154,8 +154,13 @@ function this.PatFaceSpecialMonitor(v,patFaceAllData,type,starUpGiftNum) elseif v.Type == 6 then--巅峰战 local curState = ArenaTopMatchManager.GetBaseData().battleState local battleStage = ArenaTopMatchManager.GetBaseData().battleStage - --Log(" v.Values battleStage "..v.Values.." "..tostring(battleStage)) - if v.OpenRules[2] == curState and type == 2 and battleStage >= v.Values then + -- if battleStage and curState then + -- LogPink(" v.OpenRules[2] "..v.OpenRules[2].." curState "..curState.." type "..type.." battleStage "..battleStage.." v.Values "..v.Values) + -- else + -- LogPink(" v.OpenRules[2] "..v.OpenRules[2].." curState nil type "..type.." battleStage nil v.Values "..v.Values) + -- end + -- if v.OpenRules[2] == curState and type == 2 and battleStage >= v.Values then + if (curState and v.OpenRules[2] == curState) and type == 2 and (battleStage and battleStage >= v.Values) then--v.Values 2 > 1 if RedPointManager.PlayerPrefsGetStr(v.Id.."PatFace") == "0" then table.insert(patFaceAllData,v) end