属性fix

This commit is contained in:
Fang 2023-09-13 18:23:50 +08:00
parent ae7e52d6ea
commit de1565f2c8
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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]