From d89238a7633e9f9b581ae32f4bd5b8ee0cc6aca5 Mon Sep 17 00:00:00 2001 From: Fang Date: Fri, 28 Jul 2023 12:05:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=BD=E5=8D=A1=E7=95=8C=E9=9D=A2=E4=B8=8D?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E8=A3=85=E5=A4=87=E5=8D=87=E7=BA=A7=E7=BA=A2?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/common/cell/hero_cell.lua | 9 ++++++++- lua/app/ui/shop/cell/box_hero_cell.lua | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) 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