From 3aac1e3a57bd2fa5a5eaed0efa5f58eefc30cfca Mon Sep 17 00:00:00 2001 From: zhouhaihai Date: Sat, 12 Sep 2020 14:42:27 +0800 Subject: [PATCH] 新设备 --- src/actions/RoleAction.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/actions/RoleAction.lua b/src/actions/RoleAction.lua index 6b0ff53..7f42b84 100644 --- a/src/actions/RoleAction.lua +++ b/src/actions/RoleAction.lua @@ -293,7 +293,9 @@ function _M.loginRpc( agent, data ) local hangPass = role:getProperty("hangPass") role:log("onLogin") role:mylog("login", {key1 = agent.ip:toArray(false, ":")[1], int1 = hangPass[1] or 0}) - + if msg.newdevice then + role:mylog("newdevice", {key1 = agent.ip:toArray(false, ":")[1]}) + end return true end @@ -361,7 +363,9 @@ function _M.createRpc(agent, data) end newRole:log("onCreateRole") newRole:mylog("create", {key1 = agent.ip:toArray(false, ":")[1]}) - + if msg.newdevice then + newRole:mylog("newdevice", {key1 = agent.ip:toArray(false, ":")[1]}) + end SendPacket(actionCodes.Role_createRpc, MsgPack.pack(response)) return true -- libgit2 0.21.2