diff --git a/lua/app/ui/common/cell/hero_cell.lua b/lua/app/ui/common/cell/hero_cell.lua index 3812df2e..2adc8302 100644 --- a/lua/app/ui/common/cell/hero_cell.lua +++ b/lua/app/ui/common/cell/hero_cell.lua @@ -99,13 +99,20 @@ function HeroCell:refreshRedPoint() return end - if DataManager.FormationData:heroInFormation(GConst.BattleConst.FORMATION_TYPE.STAGE, self.heroEntity:getCfgId()) and DataManager.EquipData:canUpgradeEquip(self.heroEntity:getCfgId()) then + if not self.notShowRedPoint and + DataManager.FormationData:heroInFormation(GConst.BattleConst.FORMATION_TYPE.STAGE, self.heroEntity:getCfgId()) and + DataManager.EquipData:canUpgradeEquip(self.heroEntity:getCfgId()) then self.selfNode:addRedPoint(55, -35, 0.64) else self.selfNode:removeRedPoint() end end +-- 设置是否展示红点 +function HeroCell:setShowRedPoint(show) + self.notShowRedPoint = not show +end + function HeroCell:getHeroId() if not self.heroEntity then return diff --git a/lua/app/ui/shop/cell/box_hero_cell.lua b/lua/app/ui/shop/cell/box_hero_cell.lua index f244dfda..56caf032 100644 --- a/lua/app/ui/shop/cell/box_hero_cell.lua +++ b/lua/app/ui/shop/cell/box_hero_cell.lua @@ -15,6 +15,7 @@ function BoxHeroCell:refresh(data) self.data = data local id = data.id local num = data.count + self.heroCell:setShowRedPoint(false) local heroEntity = DataManager.HeroData:getHeroById(id) if heroEntity then