From afc88188495e56be61ac1d990a71c1d87ed2cb55 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Wed, 20 Aug 2025 15:56:11 +0800 Subject: [PATCH] fix bug --- lua/app/ui/common/cell/hero_cell.lua | 3 +++ lua/app/ui/common/component/hero_formation_comp.lua | 6 +++--- lua/app/ui/hero/cell/hero_list_cell.lua | 2 +- lua/app/ui/main_city/component/main_comp.lua | 6 ++++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lua/app/ui/common/cell/hero_cell.lua b/lua/app/ui/common/cell/hero_cell.lua index 585e3778..61fd1662 100644 --- a/lua/app/ui/common/cell/hero_cell.lua +++ b/lua/app/ui/common/cell/hero_cell.lua @@ -135,6 +135,9 @@ function HeroCell:refreshBriefInfo(heroEntity) local level = self.heroEntity:getLv() self.selfNode:setVisible(false) self.otherNode:setVisible(true) + local star = heroEntity:getStar() + self.starComp:refresh(star) + self.unlockTx:setVisible(false) self:_refresh(ConfigManager:getConfig("hero")[id]) diff --git a/lua/app/ui/common/component/hero_formation_comp.lua b/lua/app/ui/common/component/hero_formation_comp.lua index 6e6a6dc4..0edf4b7f 100644 --- a/lua/app/ui/common/component/hero_formation_comp.lua +++ b/lua/app/ui/common/component/hero_formation_comp.lua @@ -21,7 +21,7 @@ function HeroFormationComp:refresh() if formation[i] then local heroEntity = DataManager.HeroData:getHeroById(formation[i]) if heroEntity then - heroCell:setVisible(true, 0.6) + heroCell:setVisible(true, 0.66) heroCell:refresh(heroEntity) heroCell:addClickListener(function() ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId()) @@ -40,7 +40,7 @@ function HeroFormationComp:refreshByFormation(formation) if formation[i] then local heroEntity = DataManager.HeroData:getHeroById(formation[i]) if heroEntity then - heroCell:setVisible(true, 0.6) + heroCell:setVisible(true, 0.66) heroCell:refresh(heroEntity) heroCell:addClickListener(function() ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId()) @@ -58,7 +58,7 @@ function HeroFormationComp:refreshByEntitys(formation) for i, heroCell in ipairs(self.heroCells) do local heroEntity = formation[i] if heroEntity then - heroCell:setVisible(true, 0.6) + heroCell:setVisible(true, 0.66) heroCell:refreshBriefInfo(heroEntity) heroCell:addClickListener(function() ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId(), true, heroEntity) diff --git a/lua/app/ui/hero/cell/hero_list_cell.lua b/lua/app/ui/hero/cell/hero_list_cell.lua index 5e3f2610..6cbc82b9 100644 --- a/lua/app/ui/hero/cell/hero_list_cell.lua +++ b/lua/app/ui/hero/cell/hero_list_cell.lua @@ -2,7 +2,7 @@ local HeroListCell = class("HeroListCell", BaseCell) local H = { NORMAL = 260, - HAS_TITLE = 360 + HAS_TITLE = 330 } function HeroListCell:init() diff --git a/lua/app/ui/main_city/component/main_comp.lua b/lua/app/ui/main_city/component/main_comp.lua index 96feacf5..3c71d946 100644 --- a/lua/app/ui/main_city/component/main_comp.lua +++ b/lua/app/ui/main_city/component/main_comp.lua @@ -121,9 +121,15 @@ function MainComp:init() ModuleManager.MaincityManager:showChapterBoxUI(chapterId) end) uiMap["main_comp.arena_btn"]:addClickListener(function() + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.ARENA) then + return + end ModuleManager.ArenaManager:reqArenaInfo(true) end) uiMap["main_comp.daily_challenge_btn"]:addClickListener(function() + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.DAILY_CHALLENGE) then + return + end ModuleManager.DailyChallengeManager:showDailyChallengeUI() end) self.leftArrowBtn:addClickListener(function()