Commit 2853564198b407486e60898ee57112f7b90ec2c9

Authored by zhouhaihai
2 parents 7733294a fcf03f75

Merge branch 'develop' into tr/cb

* develop:
  两个记录bug
  新设备
Showing 1 changed file with 9 additions and 5 deletions   Show diff stats
src/actions/RoleAction.lua
... ... @@ -293,7 +293,9 @@ function _M.loginRpc( agent, data )
293 293 local hangPass = role:getProperty("hangPass")
294 294 role:log("onLogin")
295 295 role:mylog("login", {key1 = agent.ip:toArray(false, ":")[1], int1 = hangPass[1] or 0})
296   -
  296 + if msg.newdevice then
  297 + role:mylog("newdevice", {key1 = agent.ip:toArray(false, ":")[1]})
  298 + end
297 299 return true
298 300 end
299 301  
... ... @@ -361,7 +363,9 @@ function _M.createRpc(agent, data)
361 363 end
362 364 newRole:log("onCreateRole")
363 365 newRole:mylog("create", {key1 = agent.ip:toArray(false, ":")[1]})
364   -
  366 + if msg.newdevice then
  367 + newRole:mylog("newdevice", {key1 = agent.ip:toArray(false, ":")[1]})
  368 + end
365 369  
366 370 SendPacket(actionCodes.Role_createRpc, MsgPack.pack(response))
367 371 return true
... ... @@ -554,7 +558,7 @@ function _M.openTimeBoxRpc(agent, data)
554 558 if boxL[slot].time > skynet.timex() then -- 没开完
555 559 if not quick then return end
556 560 local cost_pre = globalCsv.box_timeOpen_diamond:toArray(true, "=")
557   - local costKey = math.ceil((boxL[slot].time - skynet.timex()) / (cost_pre[1] * 60)) * cost_pre[2]
  561 + costKey = math.ceil((boxL[slot].time - skynet.timex()) / (cost_pre[1] * 60)) * cost_pre[2]
558 562 if not role:checkItemEnough({[ItemId.BoxKey] = costKey}) then return end
559 563 role:costItems({[ItemId.BoxKey] = costKey}, {log = {desc = "openTimeBox"}})
560 564 end
... ... @@ -689,8 +693,8 @@ function _M.storyBookRewardRpc(agent, data)
689 693 role:log("carriage_video", {
690 694 carriage_video_type = storyBookData.type, --放映室类型,剧情CG:0, 角色CG:1, 主线剧情:2, 角色剧情:3, 活动剧情:4, 图鉴:5
691 695 carriage_video_id = storyId, --放映室片段ID
692   - carriage_video_coinid = reward[ItemId.Gold] and ItemId.Gold or 0, --放映奖励货币类型,无奖励则填写0
693   - carriage_video_coinnum = reward[ItemId.Gold] or 0, --放映奖励货币数量,无奖励则填写0
  696 + carriage_video_coinid = reward[ItemId.Diamond] and ItemId.Diamond or 0, --放映奖励货币类型,无奖励则填写0
  697 + carriage_video_coinnum = reward[ItemId.Diamond] or 0, --放映奖励货币数量,无奖励则填写0
694 698 carriage_video_item = reward, --放映奖励其他物品数量,json格式记录,{'itemid1':10,'itemid2':5,…………..},无奖励则填写0
695 699 })
696 700  
... ...