Commit 91019d1fb0496f0b22f20b4c48c738cc2ad954d1
1 parent
6a18cfa7
cb 返利调整
Showing
2 changed files
with
8 additions
and
3 deletions
Show diff stats
src/GlobalVar.lua
src/actions/RoleAction.lua
... | ... | @@ -385,12 +385,16 @@ function _M.createRpc(agent, data) |
385 | 385 | if cbbackd then |
386 | 386 | local status, back = pcall(cluster.call, "center", cbbackd, "getCbBack", {uid = uid, id = roleId}) |
387 | 387 | if status then |
388 | - if back and next(back) then | |
388 | + if back and next(back) and back.reward and next(back.reward) then | |
389 | 389 | local reward = "" |
390 | - for itemId, count in pairs(back) do | |
390 | + for itemId, count in pairs(back.reward) do | |
391 | 391 | reward = reward:setv(itemId, count) |
392 | 392 | end |
393 | - redisproxy:insertEmail({roleId = roleId, emailId = MailId.CBBackAward, createtime = skynet.timex(), attachments = reward}) | |
393 | + if back.reward[70] then | |
394 | + redisproxy:insertEmail({roleId = roleId, emailId = MailId.CBBackAward2, contentPms = {back.money}, createtime = skynet.timex(), attachments = reward}) | |
395 | + else | |
396 | + redisproxy:insertEmail({roleId = roleId, emailId = MailId.CBBackAward, contentPms = {back.money}, createtime = skynet.timex(), attachments = reward}) | |
397 | + end | |
394 | 398 | newRole:mylog("cbback", {key1 = uid, int2 = roleId}) |
395 | 399 | end |
396 | 400 | else | ... | ... |