From 1a4a8ff880bcf9ba59cc638bb6db68a96ebf7c43 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Tue, 23 Sep 2025 20:57:51 +0800 Subject: [PATCH] fix bug --- lua/app/userdata/hero/hero_entity.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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