From 9c18872bc69a713c038eb9626d42a81615b80d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 14 Oct 2019 21:03:49 +0800 Subject: =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server-beta/src/core/setindex.lua | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'server-beta/src/core/setindex.lua') diff --git a/server-beta/src/core/setindex.lua b/server-beta/src/core/setindex.lua index 895d48f5..87fe18de 100644 --- a/server-beta/src/core/setindex.lua +++ b/server-beta/src/core/setindex.lua @@ -16,33 +16,27 @@ function m:field(source, key, callback) callback(source.index, 'get') end - self:eachField(node, myKey, function (src, mode) + self:eachField(node, key, function (src, mode) if used[src] then return end used[src] = true - self:eachField(src, key, function (src, mode) - used[src] = true - if mode == 'set' then - callback(src, mode) - found = true - end - end) + if mode == 'set' then + callback(src, mode) + found = true + end end) self:eachValue(node, function (src) - self:eachField(src, myKey, function (src, mode) + self:eachField(src, key, function (src, mode) if used[src] then return end used[src] = true - self:eachField(src, key, function (src, mode) - used[src] = true - if mode == 'set' then - callback(src, mode) - found = true - end - end) + if mode == 'set' then + callback(src, mode) + found = true + end end) end) -- cgit v1.2.3