From 2d139dd23fa8edd54ea838ff37e86d37b97c89c9 Mon Sep 17 00:00:00 2001 From: Fang Date: Tue, 1 Aug 2023 14:45:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E5=85=B7=E5=8D=87=E7=BA=A7=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E4=B8=8D=E5=8F=8A=E6=97=B6fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/hero/armor_info_comp.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/app/ui/hero/armor_info_comp.lua b/lua/app/ui/hero/armor_info_comp.lua index 18d46be3..70392281 100644 --- a/lua/app/ui/hero/armor_info_comp.lua +++ b/lua/app/ui/hero/armor_info_comp.lua @@ -68,9 +68,6 @@ end function ArmorInfoComp:setHeroData(heroEntity) self.heroEntity = heroEntity self.selectPart = self.selectPart or GConst.EquipConst.PART_TYPE.HAT - self:bind(DataManager.EquipData:getEquip(self.heroEntity:getCfgId(), self.selectPart), "isDirty", function() - self:refresh() - end) end function ArmorInfoComp:refresh() @@ -79,6 +76,10 @@ end function ArmorInfoComp:onSelectIdx(index) self.selectPart = ARMOR_PART_INDEX[index] + self:bind(DataManager.EquipData:getEquip(self.heroEntity:getCfgId(), self.selectPart), "isDirty", function() + self:refresh() + end) + self:refreshSelectArmor() for index, value in ipairs(self.armor) do