From de1565f2c804cad40edb14aae31e052f48326ebe Mon Sep 17 00:00:00 2001 From: Fang Date: Wed, 13 Sep 2023 18:23:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=9E=E6=80=A7fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/hero/cell/attr_cell.lua | 4 ++++ lua/app/userdata/battle/battle_base_data.lua | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/app/ui/hero/cell/attr_cell.lua b/lua/app/ui/hero/cell/attr_cell.lua index 6f2a4497..0095f2b5 100644 --- a/lua/app/ui/hero/cell/attr_cell.lua +++ b/lua/app/ui/hero/cell/attr_cell.lua @@ -200,6 +200,8 @@ function AttrCell:showNormalHurtp() local value = 0 if self.nodeType == GConst.HeroConst.ATTR_SHOW_TOTAL then value = self.heroEntity:getTotalAttrValue(self.attrName) + -- 特殊处理:显示总属性时,普攻百分比和技能百分比把所有伤害百分比加上 + value = value + self.heroEntity:getTotalAttrValue(GConst.MATCH_ALL_HURTP_NAME[self.heroEntity:getMatchType()]) elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_BASE then elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_WEAPON then elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_ARMOR then @@ -225,6 +227,8 @@ function AttrCell:showSkillHurtp() local value = 0 if self.nodeType == GConst.HeroConst.ATTR_SHOW_TOTAL then value = self.heroEntity:getTotalAttrValue(self.attrName) + -- 特殊处理:显示总属性时,普攻百分比和技能百分比把所有伤害百分比加上 + value = value + self.heroEntity:getTotalAttrValue(GConst.MATCH_ALL_HURTP_NAME[self.heroEntity:getMatchType()]) elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_BASE then elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_WEAPON then elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_ARMOR then diff --git a/lua/app/userdata/battle/battle_base_data.lua b/lua/app/userdata/battle/battle_base_data.lua index c8e78492..ccb29cb2 100644 --- a/lua/app/userdata/battle/battle_base_data.lua +++ b/lua/app/userdata/battle/battle_base_data.lua @@ -837,7 +837,7 @@ function BattleBaseData:initHeroData(formation) ---- 普攻\技能增伤百分比 for matchType, attrName in pairs(GConst.MATCH_ALL_HURTP_NAME) do - unitData.attr[attrName] = 2000--heroEntity:getTotalAttrValue(attrName) + unitData.attr[attrName] = heroEntity:getTotalAttrValue(attrName) end local skillInfo = skillCfg[skillId]