diff --git a/server/center/gm_mgr.lua b/server/center/gm_mgr.lua index 93197e58..9d9301a3 100644 --- a/server/center/gm_mgr.lua +++ b/server/center/gm_mgr.lua @@ -168,12 +168,11 @@ end --参数分发预处理 function GM_Mgr:dispatch_pre_command(fmtargs) local result = event_mgr:notify_listener("on_center_command", fmtargs.name, fmtargs.args) - local _, status_ok, args = tunpack(result) + local status_ok, args = tunpack(result) --无额外处理 if not status_ok then return self:dispatch_command(fmtargs.args, fmtargs.type, fmtargs.service) end - return self:dispatch_command(args, fmtargs.type, fmtargs.service) end @@ -253,9 +252,9 @@ end --local command function GM_Mgr:exec_local_cmd(service_id, cmd_name, ...) - local ok, code, res = tunpack(event_mgr:notify_listener(cmd_name, ...)) + local ok, res = tunpack(event_mgr:notify_listener(cmd_name, ...)) if not ok then - return { code = code, msg = "fail" } + return { code = 1, msg = res } end return { code = 0, msg = res } end @@ -280,4 +279,4 @@ end quanta.gm_mgr = GM_Mgr() -return GM_Mgr \ No newline at end of file +return GM_Mgr