英雄未解锁时显示初始数值
This commit is contained in:
parent
d89238a763
commit
3cd7442a8e
@ -49,9 +49,17 @@ function AttrCell:showHp()
|
||||
|
||||
local value = 0
|
||||
if self.nodeType == GConst.HeroConst.ATTR_SHOW_TOTAL then
|
||||
value = self.heroEntity:getTotalAttrValue(self.attrName)
|
||||
if self.heroEntity:isActived() then
|
||||
value = self.heroEntity:getTotalAttrValue(self.attrName)
|
||||
else
|
||||
value = self.heroEntity:getCfgHp(self.heroEntity:getBeginLv())
|
||||
end
|
||||
elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_BASE then
|
||||
value = self.heroEntity:getCfgHp(self.heroEntity:getLv())
|
||||
if self.heroEntity:isActived() then
|
||||
value = self.heroEntity:getCfgHp(self.heroEntity:getLv())
|
||||
else
|
||||
value = self.heroEntity:getCfgHp(self.heroEntity:getBeginLv())
|
||||
end
|
||||
elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_WEAPON then
|
||||
value = self.weaponEntity:getHp()
|
||||
elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_ARMOR then
|
||||
@ -72,9 +80,17 @@ function AttrCell:showAtk()
|
||||
|
||||
local value = 0
|
||||
if self.nodeType == GConst.HeroConst.ATTR_SHOW_TOTAL then
|
||||
value = self.heroEntity:getTotalAttrValue(self.attrName)
|
||||
if self.heroEntity:isActived() then
|
||||
value = self.heroEntity:getTotalAttrValue(self.attrName)
|
||||
else
|
||||
value = self.heroEntity:getCfgAtk(self.heroEntity:getBeginLv())
|
||||
end
|
||||
elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_BASE then
|
||||
value = self.heroEntity:getCfgAtk(self.heroEntity:getLv())
|
||||
if self.heroEntity:isActived() then
|
||||
value = self.heroEntity:getCfgAtk(self.heroEntity:getLv())
|
||||
else
|
||||
value = self.heroEntity:getCfgAtk(self.heroEntity:getBeginLv())
|
||||
end
|
||||
elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_WEAPON then
|
||||
value = self.weaponEntity:getAttack()
|
||||
elseif self.nodeType == GConst.HeroConst.ATTR_SHOW_ARMOR then
|
||||
|
||||
@ -171,8 +171,8 @@ function HeroInfoComp:refresh(checkLevel)
|
||||
end
|
||||
else
|
||||
str = I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_5)
|
||||
hpStr = self.heroEntity:getHp(self.heroEntity:getBeginLv()) // DEFAULT_FACTOR
|
||||
atkStr = self.heroEntity:getAtk(self.heroEntity:getBeginLv()) // DEFAULT_FACTOR
|
||||
hpStr = self.heroEntity:getCfgHp(self.heroEntity:getBeginLv()) // DEFAULT_FACTOR
|
||||
atkStr = self.heroEntity:getCfgAtk(self.heroEntity:getBeginLv()) // DEFAULT_FACTOR
|
||||
end
|
||||
self.txUpdesc:setText(str)
|
||||
self.txUpNum:setText(materials[2])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user