Commit 3f14b2676c741700115589271618f6ec357027c8

Authored by liuzujun
2 parents 012f7893 37c968fa

Merge branch 'cn/develop' of 120.26.43.151:wasteland/server into cn/develop

Showing 2 changed files with 4 additions and 5 deletions   Show diff stats
src/actions/RoleAction.lua
... ... @@ -1369,12 +1369,11 @@ function _M.drawCodeRpc(agent, data)
1369 1369 if type(code) ~= "string" then return 1 end
1370 1370 if code:find("[^0-9a-zA-Z]") then return 2 end
1371 1371  
1372   - local ret, reward, change= role:getCodeGift(code)
  1372 + local ret, reward = role:getCodeGift(code)
1373 1373 if ret == 0 then
1374 1374 SendPacket(actionCodes.Role_drawCodeRpc, MsgPack.pack({
1375 1375 result = ret,
1376   - reward = reward,
1377   - change = change,
  1376 + reward = reward:toNumMap(),
1378 1377 }))
1379 1378 return true
1380 1379 end
... ...
src/models/RolePlugin.lua
... ... @@ -3320,7 +3320,7 @@ function RolePlugin.bind(Role)
3320 3320 if ret == 0 then
3321 3321 local giftId = tonumber(result.giftId)
3322 3322 self:setProperty("codeStr", codestr:setv(giftId, 1))
3323   - local reward, change = self:award(result.gift, {log = {desc = "drawCode", int1 = giftId}})
  3323 + self:sendMail(MailId.DrawCode, nil, result.gift)
3324 3324  
3325 3325 self:log("get_gift", {
3326 3326 gift_id = giftId, -- 礼包ID
... ... @@ -3330,7 +3330,7 @@ function RolePlugin.bind(Role)
3330 3330 gift_reason = 0, -- 礼包发放原因,见发放原因枚举表
3331 3331 })
3332 3332 self:mylog("role_action", {desc = "drawCode", int1 = giftId, key1 = code, key2 = self:getRewardLogStr(result.gift)})
3333   - return ret, reward, change
  3333 + return ret, result.gift
3334 3334 end
3335 3335 -- 1 不存在的礼包码
3336 3336 -- 2 已经领取过相同类型物品
... ...