diff --git a/src/GlobalVar.lua b/src/GlobalVar.lua index f34c4d7..367dd74 100644 --- a/src/GlobalVar.lua +++ b/src/GlobalVar.lua @@ -323,6 +323,7 @@ MailId = { PaySignAward = 241, PayBackAward = 242, CBBackAward = 243, + CBBackAward2 = 244, } TriggerEventType = { diff --git a/src/actions/RoleAction.lua b/src/actions/RoleAction.lua index d45a499..db371e2 100644 --- a/src/actions/RoleAction.lua +++ b/src/actions/RoleAction.lua @@ -385,12 +385,16 @@ function _M.createRpc(agent, data) if cbbackd then local status, back = pcall(cluster.call, "center", cbbackd, "getCbBack", {uid = uid, id = roleId}) if status then - if back and next(back) then + if back and next(back) and back.reward and next(back.reward) then local reward = "" - for itemId, count in pairs(back) do + for itemId, count in pairs(back.reward) do reward = reward:setv(itemId, count) end - redisproxy:insertEmail({roleId = roleId, emailId = MailId.CBBackAward, createtime = skynet.timex(), attachments = reward}) + if back.reward[70] then + redisproxy:insertEmail({roleId = roleId, emailId = MailId.CBBackAward2, contentPms = {back.money}, createtime = skynet.timex(), attachments = reward}) + else + redisproxy:insertEmail({roleId = roleId, emailId = MailId.CBBackAward, contentPms = {back.money}, createtime = skynet.timex(), attachments = reward}) + end newRole:mylog("cbback", {key1 = uid, int2 = roleId}) end else -- libgit2 0.21.2