From baa5dbd07a0102a76daf224c2db0ca2b8b561526 Mon Sep 17 00:00:00 2001 From: xiyoo0812 Date: Thu, 30 May 2024 15:32:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=9E=E6=80=A7=E7=B3=BB=E7=BB=9F=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=A4=8D=E5=90=88=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/business/component/attr_component.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/business/component/attr_component.lua b/server/business/component/attr_component.lua index b56ebc89..271d5461 100644 --- a/server/business/component/attr_component.lua +++ b/server/business/component/attr_component.lua @@ -102,23 +102,23 @@ function AttrComponent:bind_attr(attr_id, attr, service_name) oattr_info.services[service_name] = true return end - local attr_opt = attr_db.find_one(attr_id) + local attr_opt = attr_db:find_one(attr_id) if attr_opt.complex then for idx, info in ipairs(COMPLEX_NAMES) do --复合子属性不同步 local complex_id = COMPLEX_ID + attr_id * 4 + idx local complex_info = { save = info[2], type = info[3], range = 0, share = attr.share, services = {}, base = attr_id } - self:init_attr(attr_opt.attr_type, complex_id , complex_info) + self:init_attr(attr_opt.type, complex_id , complex_info) end --复合属性不共享,不存储 - local attr_info = { save = false, share = false, range = attr.range, type = attr_opt.attr_type, services = {} } - self:init_attr(attr_opt.attr_type, attr_id, attr_info) + local attr_info = { save = false, share = false, range = attr.range, type = attr_opt.type, services = {} } + self:init_attr(attr_opt.type, attr_id, attr_info) else - local attr_info = { save = attr.save, share = attr.share, range = attr.range, type = attr_opt.attr_type, services = {} } + local attr_info = { save = attr.save, share = attr.share, range = attr.range, type = attr_opt.type, services = {} } if attr_opt.limit then attr_info.limit_id = qenum("AttrID", attr_opt.limit) end - self:init_attr(attr_opt.attr_type, attr_id, attr_info) + self:init_attr(attr_opt.type, attr_id, attr_info) end end