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()