diff --git a/lua/app/userdata/hero/hero_entity.lua b/lua/app/userdata/hero/hero_entity.lua index eb1536d4..ce2a46f0 100644 --- a/lua/app/userdata/hero/hero_entity.lua +++ b/lua/app/userdata/hero/hero_entity.lua @@ -10,6 +10,7 @@ function HeroEntity:ctor(cfgId, lv, skin, star) self.config = ConfigManager:getConfig("hero")[self.cfgId] self.beginLv = 1 -- 激活等级 self.isNew = false + -- self.data.star = 2 self.baseAttrOriginal = {} self.starAttr = {} @@ -185,7 +186,7 @@ function HeroEntity:_updateStarAttr() self.starAttr = {} for i = 1, self.data.star do 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