diff --git a/Assets/ManagedResources/~Lua/Common/functions.lua b/Assets/ManagedResources/~Lua/Common/functions.lua index 65f84b39da..206bec3f5b 100644 --- a/Assets/ManagedResources/~Lua/Common/functions.lua +++ b/Assets/ManagedResources/~Lua/Common/functions.lua @@ -409,13 +409,13 @@ function SetHeroBg(bg,cardBg,star,quality) local bai = Util.GetGameObject(bg,"Effect_UI_yansekuang_BaiSe") if star <= 5 then 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 hong.gameObject:SetActive(false) end if bai then bai.gameObject:SetActive(false) - end + end elseif star <= 10 then bg:GetComponent("Image").sprite = Util.LoadSprite(GetHeroCardStarImage[2]) cardBg:GetComponent("Image").sprite = Util.LoadSprite(GetHeroCardQuantityImage[10]) @@ -702,25 +702,39 @@ end --通过item稀有度读取背景框 function GetQuantityImageByquality(quality,star) - if star and star > 5 then - return "r_characterbg_gules" - elseif 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" - else - return "t_tongyong_topkaung" - end + if star then--and star > 5 + if star == 1 then + return "r_characterbg_gray" + elseif star == 2 then + return "r_characterbg_green" + elseif star == 3 then + return "r_characterbg_blue" + elseif star == 4 then + return "r_characterbg_purple" + elseif star == 5 then + return "r_characterbg_goden" + elseif star == 6 then + return "r_characterbg_gules" + elseif star >= 7 then + 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 @@ -783,22 +797,38 @@ function GetHeroChipQuantityImageByquality(quality) end --通过Hero稀有度读取背景框(小) function GetHeroQuantityImageByquality(quality,star) - if star and star > 5 then - return "r_characterbg_gules" - elseif 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" + if star then--and star > 5 + if star == 1 then + return "r_characterbg_gray" + elseif star == 2 then + return "r_characterbg_green" + elseif star == 3 then + return "r_characterbg_blue" + elseif star == 4 then + return "r_characterbg_purple" + elseif star == 5 then + return "r_characterbg_goden" + elseif star == 6 then + return "r_characterbg_gules" + elseif star >= 7 then + 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 --通过Hero稀有度读取背景框(卡库)外框 diff --git a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchManager.lua b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchManager.lua index 9b114782fb..8f74d30f60 100644 --- a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchManager.lua @@ -239,7 +239,6 @@ end function this.RequestBetBaseInfo(func,isPlayBattle) -- 未开启 if not this.IsTopMatchActive() then - LogGreen("this.isCanBet = false ") this.isCanBet = false if func then func() end return @@ -248,22 +247,22 @@ function this.RequestBetBaseInfo(func,isPlayBattle) NetManager.GetBetMatchInfo(0, function(msg) this.betBattleInfo = msg.championBattleInfo 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.myBetTarget = msg.winUid 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 - 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)) -- 可以竞猜了 this.isCanBet = true - LogGreen("this.isCanBet = true ") + -- LogGreen("this.isCanBet = true ") Game.GlobalEvent:DispatchEvent(GameEvent.TopMatch.OnGuessDataUpdate) 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 - LogGreen("this.baseInfo.battleState "..this.baseInfo.battleState) + -- LogGreen("this.baseInfo.battleState "..this.baseInfo.battleState) --当历史战斗记录以决出胜负 说明此时是第三场 不需要自动播放战斗动画 if not ArenaTopMatchManager.GetIsBattleEndState(this.CurTabIndex) then --推送信息的not时候判断是否需要播放动画 @@ -350,12 +349,12 @@ function this.RequestBetHistory(func) end -- 竞猜成功回调 -function this.OnGuessSuccess(msg) +-- function this.OnGuessSuccess(msg) -- LogGreen("竞猜成功回调") -- if this.isLogin 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) -end +-- end -- 判断是否可以竞猜 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 NetManager.GetTopMatchEliminationInfo(1, function(msg) - LogPink("获取32强数据成功, 数据长度 = "..#msg.championBattlePairInfo) - for i = 1, #msg.championBattlePairInfo do - 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) - end + -- LogPink("获取32强数据成功, 数据长度 = "..#msg.championBattlePairInfo) + -- for i = 1, #msg.championBattlePairInfo do + -- 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) + -- end this.EliminationData_32 = this.RequestEliminationDataMerge(msg.championBattlePairInfo) -- this.EliminationData_32 = msg.championBattlePairInfo if func then func() end @@ -429,12 +428,12 @@ function this.Request_4_EliminationData(func) NetManager.GetTopMatchEliminationInfo(2, function(msg) -- this.EliminationData_4 = msg.championBattlePairInfo - LogPink("获取4强数据成功, 数据长度 = "..#msg.championBattlePairInfo) - for i = 1, #msg.championBattlePairInfo do - LogPink("roundTImes "..msg.championBattlePairInfo[i].roundTImes.." .teamId "..msg.championBattlePairInfo[i].teamId.." .position ".. msg.championBattlePairInfo[i].position) - end + -- LogPink("获取4强数据成功, 数据长度 = "..#msg.championBattlePairInfo) + -- for i = 1, #msg.championBattlePairInfo do + -- LogPink("roundTImes "..msg.championBattlePairInfo[i].roundTImes.." .teamId "..msg.championBattlePairInfo[i].teamId.." .position ".. msg.championBattlePairInfo[i].position) + -- end this.EliminationData_4 = this.RequestEliminationDataMerge(msg.championBattlePairInfo) - LogPink("获取4强数据成功, 数据长度 = "..#this.EliminationData_4) + -- LogPink("获取4强数据成功, 数据长度 = "..#this.EliminationData_4) if func then func() end end) end @@ -451,7 +450,7 @@ function this.RequestEliminationDataMerge(EliminationData) table.insert(newEliminationData[curKey],EliminationDataV) end end - LogPink("newEliminationData, 数据长度 = "..LengthOfTable(newEliminationData)) + -- LogPink("newEliminationData, 数据长度 = "..LengthOfTable(newEliminationData)) local datas = {} for newEliminationDataI, newEliminationDataV in pairs(newEliminationData) do -- LogPink("newEliminationDataI "..newEliminationDataI) @@ -560,7 +559,7 @@ end -- 获取当前阶段名称 function this.GetCurTopMatchName() - LogPink("```````````````````````````````````````````````````") + -- LogPink("```````````````````````````````````````````````````") LogPink("this.baseInfo.progress "..this.baseInfo.progress) local titleName = Language[10121]--逐胜之巅 local stageName = "" @@ -676,15 +675,15 @@ function this.GetRankNameByRank(rank) end --- 判断淘汰赛阶段的轮数 local maxTurn = this.GetEliminationMaxRound() - LogPink("maxTurn "..maxTurn) + -- LogPink("maxTurn "..maxTurn) if curTurn <= 0 then curTurn = maxTurn end 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 opTurn = opTurn - 1 end - LogPink("opTurn "..opTurn) + -- LogPink("opTurn "..opTurn) --- 轮数为0表示决赛的结算阶段 if opTurn == 0 then if rank == 1 then @@ -777,7 +776,7 @@ function this.RequestRankData(page,func) local length=#this.rankData for i, v in ipairs(msg.rankInfos) do 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 end end @@ -926,8 +925,8 @@ function this.GetIsBattleEndState(type) oldTwoOutOfThreeIndex = this.GetBaseData().process elseif type == 2 then--竞猜 oldTwoOutOfThreeIndex = this.GetProcess() - LogPink("oldTwoOutOfThreeIndex "..oldTwoOutOfThreeIndex) end + -- LogPink("oldTwoOutOfThreeIndex "..oldTwoOutOfThreeIndex) local baseData = ArenaTopMatchManager.GetBaseData() -- 没开启或者开启没参赛都属于未参赛 local isJoin = baseData.joinState == 1 @@ -947,7 +946,7 @@ function this.GetCurTabIndex() end --是否显示竞猜结果 function this.SetcurIsShowDoGuessPopup(isShow) - LogRed("SetcurIsShowDoGuessPopup "..tostring(isShow)) + -- LogRed("SetcurIsShowDoGuessPopup "..tostring(isShow)) this.curIsShowDoGuessPopup = isShow end function this.GetcurIsShowDoGuessPopup() @@ -973,7 +972,7 @@ function this.ChangeData(type) oldTwoOutOfThreeIndex = this.GetProcess() end if oldTwoOutOfThreeIndex == 0 or oldTwoOutOfThreeIndex == 1 then - LogPink("isChange "..tostring(isChange)) + -- LogPink("isChange "..tostring(isChange)) if not isChange then old_baseInfo_battleState = this.baseInfo.battleState old_baseInfo_endTime = this.baseInfo.endTime @@ -1058,11 +1057,11 @@ function this.RefreshGuessTipView() local myBetTarget = ArenaTopMatchManager.GetMyBetTarget() local IsBeted = myBetTarget and myBetTarget ~= 0 local isShow = ArenaTopMatchManager.GetcurIsShowDoGuessPopup() - LogGreen("isShow "..tostring(isShow)) + -- LogGreen("isShow "..tostring(isShow)) -- if local upWinNum,downWinNum = ArenaTopMatchManager.GetTwoOutOfThreeInfo(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 this.baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_END then diff --git a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchPanel.lua b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchPanel.lua index 6e95b86d8d..91ddbe6225 100644 --- a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/ArenaTopMatchPanel.lua @@ -90,7 +90,6 @@ function ArenaTopMatchPanel:OnOpen(...) local args = {...} this._CurTabIndex = args[1] or 1 ArenaTopMatchManager.SetCurTabIndex(this._CurTabIndex) - LogGreen("``````````````````````````````````````this._CurTabIndex "..this._CurTabIndex) ArenaTopMatchManager.RequestTopMatchBaseInfo() end @@ -98,12 +97,10 @@ end function ArenaTopMatchPanel:OnShow() commonTitle:OnShow() if this.TabCtrl then - LogBlue("this._CurTabIndex1 "..this._CurTabIndex) if this._CurTabIndex > 5 then ArenaTopMatchManager.SetCurTabIndex(2) end this._CurTabIndex = ArenaTopMatchManager.GetCurTabIndex() - LogBlue("this._CurTabIndex2 "..this._CurTabIndex) this.TabCtrl:ChangeTab(this._CurTabIndex) end SoundManager.PlayMusic(SoundConfig.BGM_Arena) @@ -166,7 +163,6 @@ end -- function this.OpenView(index) this._CurLogicIndex = index - LogGreen("``````````````````````````````````````index "..index) ArenaTopMatchManager.SetCurTabIndex(index) this._CurTabIndex = index @@ -206,7 +202,6 @@ function this.OpenView(index) end function this.CloseView(index) - LogGreen(this._CurLogicIndex.." "..index) -- if this._CurLogicIndex ~= index then return end local logic = this.ViewLogicList[index] if logic then diff --git a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_EliminationView.lua b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_EliminationView.lua index 95efd64d15..18f41321bc 100644 --- a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_EliminationView.lua +++ b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_EliminationView.lua @@ -100,7 +100,6 @@ function ATM_EliminationView:OnOpen(...) this.empty:SetActive(not _IsShowData) this.middle:SetActive(_IsShowData) GroupIndex=1 - LogRed("battleState "..battleState) -- if battleState==1 then return end if this.tabCtrl then this.tabCtrl:ChangeTab(1) diff --git a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_GuessView.lua b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_GuessView.lua index a5dee8a15e..579e1dd2b1 100644 --- a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_GuessView.lua +++ b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_GuessView.lua @@ -51,7 +51,7 @@ local function _CheckGuess() PopupTipPanel.ShowTip(Language[10166]) return false end -LogRed("isCanGuessByBattleEndState "..tostring(isCanGuessByBattleEndState)) + -- LogRed("isCanGuessByBattleEndState "..tostring(isCanGuessByBattleEndState)) if baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_GUESS and isCanGuessByBattleEndState then return true end @@ -204,7 +204,6 @@ function this.RefreshBaseShow() if IsCanBet then -- 判断是否有竞猜信息 local betBattleInfo = ArenaTopMatchManager.GetBetBattleInfo() this.emptyPanel:SetActive(false) - LogGreen("sssssssssssss "..tostring(IsCanBet)) this.guessPanel:SetActive(true) commonInfo.SetActive(true) commonInfo.SetInfoData(2, betBattleInfo.myInfo, betBattleInfo.enemyInfo, betBattleInfo.result, false,true) @@ -213,21 +212,15 @@ function this.RefreshBaseShow() -- 刷新赔率显示 this.RefreshBetRateShow() -- 有战斗结果了就显示查看详细按钮 - LogGreen("betBattleInfo.result "..betBattleInfo.result) this.battleDetailBtn:SetActive(betBattleInfo.result ~= -1) 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 upWinNum,downWinNum = ArenaTopMatchManager.GetTwoOutOfThreeInfo(2) isCanGuessByBattleEndState = true - LogRed("isCanGuessByBattleEndState "..tostring(isCanGuessByBattleEndState)) if battleStage == TOP_MATCH_STAGE.ELIMINATION then if upWinNum ~= 0 or downWinNum ~= 0 then isCanGuessByBattleEndState = false - LogRed("isCanGuessByBattleEndState "..tostring(isCanGuessByBattleEndState)) end end if IsBeted or not isCanGuessByBattleEndState then @@ -247,7 +240,6 @@ function this.RefreshBaseShow() this.blueGuess:SetActive(false) end else - LogGreen("sssssssssssss "..tostring(IsCanBet)) this.emptyPanel:SetActive(true) this.guessPanel:SetActive(false) commonInfo.SetActive(false) @@ -283,7 +275,6 @@ function this.RefreshBetRateShow() local myBetTarget = ArenaTopMatchManager.GetMyBetTarget() if battleState == TOP_MATCH_TIME_STATE.OPEN_IN_GUESS and myBetTarget and myBetTarget ~= 0 then ArenaTopMatchManager.SetCoinNum(BagManager.GetItemCountById(GUESS_COIN)) - Log("处于战斗时 存储的临时竞猜币数量 "..BagManager.GetItemCountById(GUESS_COIN).."") end end diff --git a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_MainMatchView.lua b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_MainMatchView.lua index 8046b80cf8..6d57bdc34e 100644 --- a/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_MainMatchView.lua +++ b/Assets/ManagedResources/~Lua/Modules/ArenaTopMatch/View/ATM_MainMatchView.lua @@ -160,9 +160,9 @@ function this.SetPlayerInfo() local myResult = -1 local blueInfo = nil local redInfo = nil - LogPink("battleInfo.result "..battleInfo.result) + -- LogPink("battleInfo.result "..battleInfo.result) 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 blueInfo = attInfo redInfo = defInfo @@ -176,7 +176,6 @@ function this.SetPlayerInfo() end battleEndResultSortState = false end - LogPink("myResult "..myResult) --if battleInfo.result == 0 then -- 如果进攻方失败,则如果我是进攻方则我失败,反之胜利 -- myResult = attInfo.uid == PlayerManager.uid and 0 or 1 --elseif battleInfo.result == 1 then -- 如果进攻方胜利,则如果我是进攻方则我胜利 @@ -185,7 +184,6 @@ function this.SetPlayerInfo() local baseData = ArenaTopMatchManager.GetBaseData() commonInfo.SetActive(true) - LogRed("battleEndResultSortState "..tostring(battleEndResultSortState)) commonInfo.SetInfoData(1, blueInfo, redInfo, myResult, baseData == TOP_MATCH_STAGE.CHOOSE,battleEndResultSortState) end @@ -229,7 +227,6 @@ function this.FreshTeam() end local formation = FormationManager.GetFormationByID(FormationTypeDef.ARENA_TOM_MATCH) for i, hero in ipairs(formation.teamHeroInfos) do - LogGreen("hero.position "..hero.position) local heroData = HeroManager.GetSingleHeroData(hero.heroId) local heroGo = Util.GetGameObject(this.myBaby[hero.position], "hero") heroGo:SetActive(true) diff --git a/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionHeroListInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionHeroListInfoPopup.lua index 670551df34..718937aea7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionHeroListInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionHeroListInfoPopup.lua @@ -176,10 +176,14 @@ function this:SortHeroDatas(_heroDatas) if a.heroConfig.Quality == b.heroConfig.Quality then if a.star == b.star then if a.lv == b.lv then - if a.id == b.id then - return a.sortId > b.sortId + if a.warPower == b.warPower then + if a.id == b.id then + return a.sortId > b.sortId + else + return a.id > b.id + end else - return a.id > b.id + return a.warPower > b.warPower end else return a.lv > b.lv @@ -198,10 +202,14 @@ function this:SortHeroDatas(_heroDatas) if a.heroConfig.Quality == b.heroConfig.Quality then if a.star == b.star then if a.heroConfig.Natural == b.heroConfig.Natural then - if a.id == b.id then - return a.sortId > b.sortId + if a.warPower == b.warPower then + if a.id == b.id then + return a.sortId > b.sortId + else + return a.id > b.id + end else - return a.id > b.id + return a.warPower > b.warPower end else return a.heroConfig.Natural > b.heroConfig.Natural diff --git a/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionHeroListResurgencePopup.lua b/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionHeroListResurgencePopup.lua index f058b6cc67..269f3d01c2 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionHeroListResurgencePopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionHeroListResurgencePopup.lua @@ -189,10 +189,14 @@ function this:SortHeroDatas(_heroDatas) if a.heroConfig.Quality == b.heroConfig.Quality then if a.star == b.star then if a.lv == b.lv then - if a.id == b.id then - return a.sortId > b.sortId + if a.warPower == b.warPower then + if a.id == b.id then + return a.sortId > b.sortId + else + return a.id > b.id + end else - return a.id > b.id + return a.warPower > b.warPower end else return a.lv > b.lv diff --git a/Assets/ManagedResources/~Lua/Modules/Expert/PatFacePanel.lua b/Assets/ManagedResources/~Lua/Modules/Expert/PatFacePanel.lua index 58dd9537a1..b0849a4803 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expert/PatFacePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expert/PatFacePanel.lua @@ -259,12 +259,12 @@ function PatFacePanel:OnShowOb3Data() elseif patFaceSingleData.OpenRules[1] == 7 then self.obg3nameText.text = Language[10551] local rewardTable = {} - if patFaceSingleData.Id == 24 then--特殊写 id 不能变 + -- if patFaceSingleData.Id == 24 then--特殊写 id 不能变 rewardTable = ConfigManager.GetConfigData(ConfigName.ChampionshipReward,1).SeasonReward--巅峰战 - else - local rewardInfo = {77,0} - rewardTable[1] = rewardInfo--巅峰战 - end + -- else + -- local rewardInfo = {77,0} + -- rewardTable[1] = rewardInfo--巅峰战 + -- end for i = 1, math.max(#guildWarRewardTabs, #rewardTable) do local go = guildWarRewardTabs[i] if not go then diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua index 9f31f251eb..ae2bbe185a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua @@ -516,10 +516,14 @@ function this.SortHeroDatas(_heroDatas) if a.heroConfig.Quality == b.heroConfig.Quality then if a.star == b.star then if a.lv == b.lv then - if a.id == b.id then - return a.sortId > b.sortId + if a.warPower == b.warPower then + if a.id == b.id then + return a.sortId > b.sortId + else + return a.id > b.id + end else - return a.id > b.id + return a.warPower > b.warPower end else return a.lv > b.lv @@ -538,10 +542,14 @@ function this.SortHeroDatas(_heroDatas) if a.heroConfig.Quality == b.heroConfig.Quality then if a.star == b.star then if a.heroConfig.Natural == b.heroConfig.Natural then - if a.id == b.id then - return a.sortId > b.sortId + if a.warPower == b.warPower then + if a.id == b.id then + return a.sortId > b.sortId + else + return a.id > b.id + end else - return a.id > b.id + return a.warPower > b.warPower end else return a.heroConfig.Natural > b.heroConfig.Natural @@ -839,12 +847,17 @@ function this.SetOneKeyGo() local heros = HeroManager.GetAllHeroDatas(limitLevel) --按战力从大到小排序 table.sort(heros,function(a,b) - local aWarPower = HeroManager.CalculateHeroAllProValList(1,a.dynamicId,false)[HeroProType.WarPower] - local bWarPower = HeroManager.CalculateHeroAllProValList(1,b.dynamicId,false)[HeroProType.WarPower] - if aWarPower==bWarPower then + -- local aWarPower = HeroManager.CalculateHeroAllProValList(1,a.dynamicId,false)[HeroProType.WarPower] + -- local bWarPower = HeroManager.CalculateHeroAllProValList(1,b.dynamicId,false)[HeroProType.WarPower] + -- 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 else - return aWarPower>bWarPower + return a.aWarPower > b.bWarPower end end) --遍历英雄 去除已上阵英雄 diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua index 75427bde4d..d3a473eaf8 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua @@ -1615,6 +1615,11 @@ function this.CalculateHeroAllProValList(_type, _heroDid, isWar, _breakId, _upSt this.DoubleTableCompound(allHeroProVal, heroSkillAllHeroProVal) this.DoubleTableCompound(allHeroProVal, teamAddPro) end + -- for index, value in pairs(allHeroProVal) do + -- if value > 0 then + -- LogError("allHeroProVal 最终 加成 "..index.." "..value) + -- end + -- end --4公式特殊(减乘)所有属性加成 this.DoubleTableCompound(specialProVal, falismanSpecialProVal) --this.DoubleTableCompound(specialProVal,soulPrinSpecialProVal) diff --git a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua index 99bed66483..f62f2266f9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua @@ -664,7 +664,7 @@ function this.TopMatchGuessSuccess(buffer) local data = buffer:DataByte() local msg = ArenaInfoProto_pb.ChampionGuessSuccessIndication() msg:ParseFromString(data) - ArenaTopMatchManager.OnGuessSuccess(msg) + -- ArenaTopMatchManager.OnGuessSuccess(msg) end -- 巅峰战竞猜成功 diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua index 39764e37ad..a97c7c720b 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua @@ -349,7 +349,7 @@ function RoleInfoPanel:OnShow() index = i end end - teamHero=FormationManager.GetAllFormationHeroId() + teamHero=FormationManager.GetWuJinFormationHeroIds(FormationTypeDef.FORMATION_NORMAL)-- this:UpdateLiveList()--加载当前 和 左右数据 if this.leftLiveObj and leftHeroData then LogError(Language[11833]) diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleListPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleListPanel.lua index aefec03d10..ac67ff831f 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleListPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleListPanel.lua @@ -287,19 +287,20 @@ function this:SetSelectBtn() end function this:SortHeroDatas(_heroDatas) --上阵最优先,星级优先,同星级等级优先,同星级同等级按sortId排序。排序时降序排序。 - Log("sortType "..sortType) table.sort(_heroDatas, function(a, b) - if (teamHero[a.dynamicId] and teamHero[b.dynamicId]) or - (not teamHero[a.dynamicId] and not teamHero[b.dynamicId]) - then + if (teamHero[a.dynamicId] and teamHero[b.dynamicId]) or (not teamHero[a.dynamicId] and not teamHero[b.dynamicId]) then if sortType==SortTypeConst.Lv then if a.lv ==b.lv then if a.heroConfig.Quality ==b.heroConfig.Quality then--Natural if a.star == b.star then - if a.heroConfig.Natural ==b.heroConfig.Natural then--Natural - return a.heroConfig.Id < b.heroConfig.Id + if a.warPower == b.warPower then + 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 - return a.heroConfig.Natural > b.heroConfig.Natural + return a.warPower > b.warPower end else return a.star > b.star @@ -314,11 +315,15 @@ function this:SortHeroDatas(_heroDatas) if a.heroConfig.Quality ==b.heroConfig.Quality then--Natural if a.star == b.star then if a.lv == b.lv then - 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 + if a.warPower == b.warPower then + 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 + return a.warPower > b.warPower + end else return a.lv > b.lv end @@ -328,7 +333,7 @@ function this:SortHeroDatas(_heroDatas) else return a.heroConfig.Quality > b.heroConfig.Quality end - end + end else return teamHero[a.dynamicId] and not teamHero[b.dynamicId] end