From e56378d804b80d1a010130a3b3c311ef01103688 Mon Sep 17 00:00:00 2001 From: Fang Date: Tue, 25 Jul 2023 16:32:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/userdata/hero/hero_entity.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/app/userdata/hero/hero_entity.lua b/lua/app/userdata/hero/hero_entity.lua index d81628fc..1aec126d 100644 --- a/lua/app/userdata/hero/hero_entity.lua +++ b/lua/app/userdata/hero/hero_entity.lua @@ -129,6 +129,9 @@ function HeroEntity:setEquipAttrValue(name, value) end function HeroEntity:addEquipAttrValue(name, value) + if self.equipAttr[name] == nil then + self.equipAttr[name] = 0 + end self.equipAttr[name] = self.equipAttr[name] + value end