From 8c88139a0942a5de46bea21b0c2d1a242ec11b1c Mon Sep 17 00:00:00 2001 From: Fang Date: Thu, 10 Aug 2023 16:31:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9A=AE=E8=82=A4=E5=B1=9E=E6=80=A7=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=94=9F=E5=91=BD=E5=8A=A0=E6=88=90=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/hero/skin_info_comp.lua | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/lua/app/ui/hero/skin_info_comp.lua b/lua/app/ui/hero/skin_info_comp.lua index adc4c4e0..77f5d938 100644 --- a/lua/app/ui/hero/skin_info_comp.lua +++ b/lua/app/ui/hero/skin_info_comp.lua @@ -92,14 +92,26 @@ function SkinInfoComp:refreshSelectSkin(selectId) -- 攻击 table.insert(showAttrType, GConst.MATCH_ATTACK_NAME[self.heroEntity:getMatchType()]) imgIcon:setSprite(GConst.ATLAS_PATH.COMMON, "common_dec_5") - txTitle:setText(""..I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_3).."") + txTitle:setText(""..I18N:getGlobalText(I18N.GlobalConst.ATTR_ATK).."") showValue = curAttr[index].num // DEFAULT_FACTOR elseif curAttr[index].type == GConst.MATCH_ATTACK_ADD_NAME[self.heroEntity:getMatchType()] then -- 攻击加成百分比 table.insert(showAttrType, GConst.MATCH_ATTACK_ADD_NAME[self.heroEntity:getMatchType()]) imgIcon:setSprite(GConst.ATLAS_PATH.COMMON, "common_dec_5") - txTitle:setText(""..I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_3).."") + txTitle:setText(""..I18N:getGlobalText(I18N.GlobalConst.ATTR_ATK).."") showValue = curAttr[index].num // PERCENT_FACTOR .. "%" + elseif curAttr[index].type == GConst.MATCH_HP_NAME[self.heroEntity:getMatchType()] then + -- 生命 + table.insert(showAttrType, GConst.MATCH_HP_NAME[self.heroEntity:getMatchType()]) + imgIcon:setSprite(GConst.ATLAS_PATH.COMMON, "common_dec_4") + txTitle:setText(""..I18N:getGlobalText(I18N.GlobalConst.ATTR_HP).."") + showValue = curAttr[index].num // DEFAULT_FACTOR + elseif curAttr[index].type == GConst.MATCH_HP_ADD_NAME[self.heroEntity:getMatchType()] then + -- 生命加成百分比 + table.insert(showAttrType, GConst.MATCH_HP_ADD_NAME[self.heroEntity:getMatchType()]) + imgIcon:setSprite(GConst.ATLAS_PATH.COMMON, "common_dec_4") + txTitle:setText(""..I18N:getGlobalText(I18N.GlobalConst.ATTR_HP).."") + showValue = (curAttr[index].num // PERCENT_FACTOR) .. "%" elseif curAttr[index].type == GConst.MATCH_NORMAL_HURT_NAME[self.heroEntity:getMatchType()] then -- 普攻增伤 table.insert(showAttrType, GConst.MATCH_NORMAL_HURT_NAME[self.heroEntity:getMatchType()]) @@ -142,12 +154,6 @@ function SkinInfoComp:refreshSelectSkin(selectId) imgIcon:setSprite(GConst.ATLAS_PATH.COMMON, "common_dec_24") txTitle:setText(""..I18N:getGlobalText(I18N.GlobalConst.ATTR_CURED).."") showValue = curAttr[index].num // PERCENT_FACTOR .. "%" - elseif curAttr[index].type == GConst.MATCH_HP_NAME[self.heroEntity:getMatchType()] then - -- 生命 - table.insert(showAttrType, GConst.MATCH_HP_NAME[self.heroEntity:getMatchType()]) - imgIcon:setSprite(GConst.ATLAS_PATH.COMMON, "common_dec_4") - txTitle:setText(""..I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_2).."") - showValue = curAttr[index].num // DEFAULT_FACTOR else obj:setVisible(false) end