diff --git a/src/actions/GmAction.lua b/src/actions/GmAction.lua index 20915d9..ab2738c 100644 --- a/src/actions/GmAction.lua +++ b/src/actions/GmAction.lua @@ -284,6 +284,22 @@ function _M.tower(role, pms) return "成功" end +table.insert(helpDes, {"发送邮件", "email", "id", "奖励"}) +function _M.email(role, pms) + local id = tonum(pms.pm1, 0) + local reward = pms.pm2 + redisproxy:insertEmail({ + roleId = role:getProperty("id"), + emailId = id, + createtime = skynet.timex(), + title = id == 0 and "来自GM的邮件!" or nil, + stitle = id == 0 and "GM测试" or nil, + content = id == 0 and "测试内容测试内容!!!\n\t 巴拉巴拉!" or nil, + attachments = id == 0 and reward or nil, + rewardPms = id ~= 0 and reward or nil, + }) + return "成功" +end function _M.helpRpc(agent, data) SendPacket(actionCodes.Gm_helpRpc, MsgPack.pack({help = helpDes})) @@ -291,4 +307,6 @@ function _M.helpRpc(agent, data) end + + return _M \ No newline at end of file diff --git a/src/actions/RoleAction.lua b/src/actions/RoleAction.lua index 3ae5aea..42169e9 100644 --- a/src/actions/RoleAction.lua +++ b/src/actions/RoleAction.lua @@ -245,8 +245,6 @@ function _M.loginRpc( agent, data ) -- 玩家登陆做的一些操作 role:saveHangTeam() role:savePvpCTeam() - - -- role:log("login", { ip = agent.ip, diamond = role:getProperty("diamond"), reDiamond = role:getProperty("reDiamond")}) return true @@ -296,8 +294,7 @@ function _M.createRpc(agent, data) newRole:award(globalCsv.birthItem) -- 欢迎邮件 - -- redisproxy:insertEmail({roleId = roleId, emailId = 1}) - -- redisproxy:insertEmail({roleId = roleId, emailId = 2}) + redisproxy:insertEmail({roleId = roleId, emailId = 1}) newRole:log("create", { ip = agent.ip}) -- libgit2 0.21.2