From 29a149dab522685dd1ed7f1eeeec5b93a10201a0 Mon Sep 17 00:00:00 2001 From: Fang Date: Fri, 28 Jul 2023 09:50:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8B=B1=E9=9B=84=E6=94=B6=E9=9B=86=E6=96=87?= =?UTF-8?q?=E6=A1=88fix=E3=80=81=E6=AD=A6=E5=99=A8=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E5=8A=A8=E6=95=88=E6=98=BE=E7=A4=BAfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/collection/cell/collection_hero_cell.lua | 2 +- lua/app/ui/hero/armor_info_comp.lua | 3 +++ lua/app/ui/hero/hero_detail_ui.lua | 3 --- lua/app/ui/hero/hero_info_comp.lua | 3 +++ lua/app/ui/hero/weapon_info_comp.lua | 6 ++++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lua/app/ui/collection/cell/collection_hero_cell.lua b/lua/app/ui/collection/cell/collection_hero_cell.lua index c3577b4f..77654a3f 100644 --- a/lua/app/ui/collection/cell/collection_hero_cell.lua +++ b/lua/app/ui/collection/cell/collection_hero_cell.lua @@ -17,7 +17,7 @@ function CollectionHeroCell:init() ModuleManager.CollectionManager:reqHeroPoint(self.heroData.id) EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.COLLECTION_CLICK_GET_POINT, self.imgIcon:getPosition()) else - GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_8)) + GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.COLLECTION_DESC_12)) end end) self:bind(DataManager.CollectionData, "dirtyHero", function() diff --git a/lua/app/ui/hero/armor_info_comp.lua b/lua/app/ui/hero/armor_info_comp.lua index 405f461d..18d46be3 100644 --- a/lua/app/ui/hero/armor_info_comp.lua +++ b/lua/app/ui/hero/armor_info_comp.lua @@ -56,6 +56,9 @@ function ArmorInfoComp:init() self.btnAttr:addClickListener(function() ModuleManager.TipsManager:showDescTips(DataManager.EquipData:getEquip(self.heroEntity:getCfgId(), self.selectPart):getAttrDesc(), self.btnAttr) end) + self:bind(DataManager.BagData.ItemData, "dirty", function() + self:refresh() + end) end function ArmorInfoComp:setUI(ui) diff --git a/lua/app/ui/hero/hero_detail_ui.lua b/lua/app/ui/hero/hero_detail_ui.lua index ac011609..89d4a021 100644 --- a/lua/app/ui/hero/hero_detail_ui.lua +++ b/lua/app/ui/hero/hero_detail_ui.lua @@ -139,9 +139,6 @@ function HeroDetailUI:onLoadRootComplete() self:addEventListener(EventManager.CUSTOM_EVENT.GO_DUNGEON_UI, function() self:closeUI() end) - self:bind(DataManager.BagData.ItemData, "dirty", function() - self:refreshShow() - end) end function HeroDetailUI:updateSide() diff --git a/lua/app/ui/hero/hero_info_comp.lua b/lua/app/ui/hero/hero_info_comp.lua index e1b56c4d..86cd39a2 100644 --- a/lua/app/ui/hero/hero_info_comp.lua +++ b/lua/app/ui/hero/hero_info_comp.lua @@ -53,6 +53,9 @@ function HeroInfoComp:init() self.btnAttr:addClickListener(function() UIManager:showUI("app/ui/hero/hero_attr_ui", {heroEntity = self.heroEntity}) end) + self:bind(DataManager.BagData.ItemData, "dirty", function() + self:refresh() + end) end function HeroInfoComp:setHeroData(heroEntity, onlyLook) diff --git a/lua/app/ui/hero/weapon_info_comp.lua b/lua/app/ui/hero/weapon_info_comp.lua index 1a770dc7..da352930 100644 --- a/lua/app/ui/hero/weapon_info_comp.lua +++ b/lua/app/ui/hero/weapon_info_comp.lua @@ -53,6 +53,10 @@ function WeaponInfoComp:setHeroData(heroEntity) self:bind(self.weaponEntity, "isDirty", function() self:refresh() end) + self:bind(DataManager.BagData.ItemData, "dirty", function() + self:refresh() + end) + self:playEffect() end function WeaponInfoComp:refresh() @@ -170,8 +174,6 @@ function WeaponInfoComp:refresh() self.btnUp:removeRedPoint() self.btnUp:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[2]) end - - self:playEffect() end -- 播放动效