From 653c927780509ad66ddea225975c2a0feb491811 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Wed, 3 Sep 2025 16:51:27 +0800 Subject: [PATCH] fix bug --- lua/app/ui/common/cell/hero_cell.lua | 9 ++++----- lua/app/userdata/hero/hero_entity.lua | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lua/app/ui/common/cell/hero_cell.lua b/lua/app/ui/common/cell/hero_cell.lua index 55151fe4..1f8c45a8 100644 --- a/lua/app/ui/common/cell/hero_cell.lua +++ b/lua/app/ui/common/cell/hero_cell.lua @@ -109,11 +109,10 @@ function HeroCell:refreshRedPoint() return end - if not self.notShowRedPoint and - DataManager.FormationData:heroInFormation(GConst.BattleConst.FORMATION_TYPE.STAGE, self.heroEntity:getCfgId()) then - self.selfNode:addRedPoint(55, -35, 1) - else - self.selfNode:removeRedPoint() + if not self.notShowRedPoint and DataManager.FormationData:heroInFormation(GConst.BattleConst.FORMATION_TYPE.STAGE, self.heroEntity:getCfgId()) and self.heroEntity:showRedPointEntrance() then + self.selfNode:addRedPoint(55, -35, 1) + else + self.selfNode:removeRedPoint() end end diff --git a/lua/app/userdata/hero/hero_entity.lua b/lua/app/userdata/hero/hero_entity.lua index a65ebb8e..30e594e2 100644 --- a/lua/app/userdata/hero/hero_entity.lua +++ b/lua/app/userdata/hero/hero_entity.lua @@ -766,6 +766,10 @@ end --@endregion --@region 红点 +function HeroEntity:showRedPointEntrance() + return self:canLvUp() or self:canStarUp() +end + function HeroEntity:showRedPoint(page) if page == GConst.HeroConst.PANEL_TYPE.HERO then return self:canLvUp()