Commit bc26ccab53cf8f261a981795cde128693f3ec7e9
Merge branch 'cn/develop' into cn/publish/release
Showing
4 changed files
with
6 additions
and
6 deletions
Show diff stats
src/GlobalVar.lua
src/actions/GmAction.lua
... | ... | @@ -1157,7 +1157,7 @@ function _M.draw_code(role, pms) |
1157 | 1157 | if type(code) ~= "string" then return -2 end |
1158 | 1158 | if code:find("[^0-9a-zA-Z]") then return -3 end |
1159 | 1159 | |
1160 | - local ret, _, _= role:getCodeGift(code) | |
1160 | + local ret, _= role:getCodeGift(code) | |
1161 | 1161 | return ret |
1162 | 1162 | end |
1163 | 1163 | ... | ... |
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, result, reward, change | |
3333 | + return ret, result.gift | |
3334 | 3334 | end |
3335 | 3335 | -- 1 不存在的礼包码 |
3336 | 3336 | -- 2 已经领取过相同类型物品 | ... | ... |