From 73b3a451e9ec86134eacc3ea275b27e349e579a0 Mon Sep 17 00:00:00 2001 From: Fang Date: Wed, 5 Jul 2023 17:48:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=B4=E5=83=8F=E6=A1=86?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=B8=83=E5=B1=80=E3=80=81=E7=AB=9E=E6=8A=80?= =?UTF-8?q?=E5=9C=BA=E8=B5=9B=E5=AD=A3=E5=88=B7=E6=96=B0fix=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/arena/arena_manager.lua | 2 +- lua/app/ui/battle/battle_result_ui.lua | 6 +++++- lua/app/ui/main_city/component/arena_comp.lua | 11 +++++++---- lua/app/ui/player_info/frame_cell.lua | 4 +++- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/lua/app/module/arena/arena_manager.lua b/lua/app/module/arena/arena_manager.lua index 662d10bd..a705ffea 100644 --- a/lua/app/module/arena/arena_manager.lua +++ b/lua/app/module/arena/arena_manager.lua @@ -25,7 +25,7 @@ function ArenaManager:onSeasonChanged() if EDITOR_MODE then Logger.logHighlight("赛季改变") end - if not self.isResetting then + if self.isResetting then return end diff --git a/lua/app/ui/battle/battle_result_ui.lua b/lua/app/ui/battle/battle_result_ui.lua index d91a9479..54154593 100644 --- a/lua/app/ui/battle/battle_result_ui.lua +++ b/lua/app/ui/battle/battle_result_ui.lua @@ -142,7 +142,8 @@ function BattleResultUI:onLoadRootComplete() end) self:addEventListener(EventManager.CUSTOM_EVENT.ARENA_AD_BOX_SUCCESS, function() self.getedArenaAdBox = true - self.arenaBoxBtnGet:setActive(false) + self:refreshRewards() + self:refreshArenaBoxNode() end) end @@ -293,6 +294,9 @@ function BattleResultUI:hasArenaBoxNode() if not self.isWin and self.arenaTotalCount and (self.arenaTotalCount % GFunc.getConstIntValue("arena_lose_adbox")) ~= 0 then return false end + if self.getedArenaAdBox then + return false + end return true end diff --git a/lua/app/ui/main_city/component/arena_comp.lua b/lua/app/ui/main_city/component/arena_comp.lua index 4ff53233..86f469f0 100644 --- a/lua/app/ui/main_city/component/arena_comp.lua +++ b/lua/app/ui/main_city/component/arena_comp.lua @@ -155,10 +155,13 @@ function ArenaComp:refreshShow() self.imgProg:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = 1 end - if self.spineGrading then - self.spineGrading:destroy() - self.spineGrading = nil - end + if DataManager.ArenaData:hasSeasonReward() then + self.btnReward:addRedPoint(30, 25, 0.6) + else + self.btnReward:removeRedPoint() + end + + self.spineRoot:removeAllChildren() SpineManager:loadUISpineWidgetAsync(gradingIconName.."_spine", self.spineRoot, function(spineObject) self.spineGrading = spineObject self.spineGrading:setSkin(gradingNumName) diff --git a/lua/app/ui/player_info/frame_cell.lua b/lua/app/ui/player_info/frame_cell.lua index 2237bdff..d2393337 100644 --- a/lua/app/ui/player_info/frame_cell.lua +++ b/lua/app/ui/player_info/frame_cell.lua @@ -27,7 +27,9 @@ function FrameCell:refresh(id, isSelect) end self.select:setActive(isSelect) - self.imgFrame:setSprite(GConst.ATLAS_PATH.ICON_AVATAR, DataManager.PlayerData:getFrameIconId(self.id)) + local iconId = DataManager.PlayerData:getFrameIconId(self.id) + self.imgFrame:setSprite(GConst.ATLAS_PATH.ICON_AVATAR, iconId) + self.lock:setSprite(GConst.ATLAS_PATH.ICON_AVATAR, iconId) self.lock:setActive(not DataManager.PlayerData:isFrameUnlock(self.id)) self.use:setActive(DataManager.PlayerData:getUsingFrameId() == self.id) end