This commit is contained in:
puxuan 2025-09-23 20:57:51 +08:00
parent 73bd541e94
commit 1a4a8ff880

View File

@ -10,6 +10,7 @@ function HeroEntity:ctor(cfgId, lv, skin, star)
self.config = ConfigManager:getConfig("hero")[self.cfgId] self.config = ConfigManager:getConfig("hero")[self.cfgId]
self.beginLv = 1 -- 激活等级 self.beginLv = 1 -- 激活等级
self.isNew = false self.isNew = false
-- self.data.star = 2
self.baseAttrOriginal = {} self.baseAttrOriginal = {}
self.starAttr = {} self.starAttr = {}
@ -185,7 +186,7 @@ function HeroEntity:_updateStarAttr()
self.starAttr = {} self.starAttr = {}
for i = 1, self.data.star do for i = 1, self.data.star do
local attr = self:getStarAttrCfg()[i] local attr = self:getStarAttrCfg()[i]
self.starAttr[attr.type] = attr.num self.starAttr[attr.type] = (self.starAttr[attr.type] or 0) + attr.num
end end
end end