bug修复
This commit is contained in:
parent
ef6969c4d9
commit
96c9cf8c18
@ -8,6 +8,10 @@ function HeroEntity:ctor(cfgId, lv, collectionLevel)
|
|||||||
self.data.collectionLevel = collectionLevel
|
self.data.collectionLevel = collectionLevel
|
||||||
self.config = ConfigManager:getConfig("hero")[self.cfgId]
|
self.config = ConfigManager:getConfig("hero")[self.cfgId]
|
||||||
self.beginLv = self.config.begin_lv -- 初始等级
|
self.beginLv = self.config.begin_lv -- 初始等级
|
||||||
|
|
||||||
|
self.baseAttrOriginal = {}
|
||||||
|
self.equipAttr = {}
|
||||||
|
self.allAttr = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
function HeroEntity:initAttr()
|
function HeroEntity:initAttr()
|
||||||
@ -168,9 +172,10 @@ function HeroEntity:addTotalAttrValue(name, add)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function HeroEntity:getTotalAttrValue(name)
|
function HeroEntity:getTotalAttrValue(name)
|
||||||
if self.allAttr == nil then
|
if table.nums(self.allAttr) <= 0 then
|
||||||
self:initAttr()
|
self:initAttr()
|
||||||
end
|
end
|
||||||
|
|
||||||
if not self.allAttr[name] then
|
if not self.allAttr[name] then
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user