Commit 44baeb7ab4ac67faca87a70b02c207b8823278b0

Authored by zhouhaihai
1 parent 254ed866

漏掉了 bug

Showing 1 changed file with 4 additions and 3 deletions   Show diff stats
src/actions/EmailAction.lua
... ... @@ -119,7 +119,7 @@ function _M.drawAttachRpc(agent, data)
119 119 local attachments = getEmailAttachments(email)
120 120 if attachments == "" then return end
121 121  
122   - local reward, change = role:award(attachments, {log = {desc = "draw_attach", int1 = emailId, key1 = email:getProperty("title")}})
  122 + local reward, change = role:award(attachments, {log = {desc = "draw_attach", int1 = emailId}})
123 123 email:setProperty("status", 2)
124 124 email:log(role, 2)
125 125 SendPacket(actionCodes.Email_drawAttachRpc, MsgPack.pack({reward = reward, change = change}))
... ... @@ -134,10 +134,11 @@ function _M.checkRpc(agent, data)
134 134 local msg = MsgPack.unpack(data)
135 135 local id = msg.id
136 136  
137   - local email = require("models.Email").new({key = rds})
  137 + local emailRds = string.format("email:%d:%s", roleId, id)
  138 + local email = require("models.Email").new({key = emailRds})
138 139 if not email:load() then return end
139 140  
140   - email:setProperty(rds, "status", 1)
  141 + email:setProperty("status", 1)
141 142 email:log(role, 1)
142 143  
143 144 SendPacket(actionCodes.Email_checkRpc, '')
... ...