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,7 +293,9 @@ function _M.loginRpc( agent, data )
293 local hangPass = role:getProperty("hangPass") 293 local hangPass = role:getProperty("hangPass")
294 role:log("onLogin") 294 role:log("onLogin")
295 role:mylog("login", {key1 = agent.ip:toArray(false, ":")[1], int1 = hangPass[1] or 0}) 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 return true 299 return true
298 end 300 end
299 301
@@ -361,7 +363,9 @@ function _M.createRpc(agent, data) @@ -361,7 +363,9 @@ function _M.createRpc(agent, data)
361 end 363 end
362 newRole:log("onCreateRole") 364 newRole:log("onCreateRole")
363 newRole:mylog("create", {key1 = agent.ip:toArray(false, ":")[1]}) 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 SendPacket(actionCodes.Role_createRpc, MsgPack.pack(response)) 370 SendPacket(actionCodes.Role_createRpc, MsgPack.pack(response))
367 return true 371 return true
@@ -554,7 +558,7 @@ function _M.openTimeBoxRpc(agent, data) @@ -554,7 +558,7 @@ function _M.openTimeBoxRpc(agent, data)
554 if boxL[slot].time > skynet.timex() then -- 没开完 558 if boxL[slot].time > skynet.timex() then -- 没开完
555 if not quick then return end 559 if not quick then return end
556 local cost_pre = globalCsv.box_timeOpen_diamond:toArray(true, "=") 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 if not role:checkItemEnough({[ItemId.BoxKey] = costKey}) then return end 562 if not role:checkItemEnough({[ItemId.BoxKey] = costKey}) then return end
559 role:costItems({[ItemId.BoxKey] = costKey}, {log = {desc = "openTimeBox"}}) 563 role:costItems({[ItemId.BoxKey] = costKey}, {log = {desc = "openTimeBox"}})
560 end 564 end
@@ -689,8 +693,8 @@ function _M.storyBookRewardRpc(agent, data) @@ -689,8 +693,8 @@ function _M.storyBookRewardRpc(agent, data)
689 role:log("carriage_video", { 693 role:log("carriage_video", {
690 carriage_video_type = storyBookData.type, --放映室类型,剧情CG:0, 角色CG:1, 主线剧情:2, 角色剧情:3, 活动剧情:4, 图鉴:5 694 carriage_video_type = storyBookData.type, --放映室类型,剧情CG:0, 角色CG:1, 主线剧情:2, 角色剧情:3, 活动剧情:4, 图鉴:5
691 carriage_video_id = storyId, --放映室片段ID 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 carriage_video_item = reward, --放映奖励其他物品数量,json格式记录,{'itemid1':10,'itemid2':5,…………..},无奖励则填写0 698 carriage_video_item = reward, --放映奖励其他物品数量,json格式记录,{'itemid1':10,'itemid2':5,…………..},无奖励则填写0
695 }) 699 })
696 700