Commit 887c1843acebc1d342c93f68d5589343da0636b9
1 parent
c59e058b
日志新一批
Showing
16 changed files
with
107 additions
and
238 deletions
Show diff stats
src/actions/ActivityAction.lua
@@ -68,7 +68,7 @@ function _M.sudokuRpc(agent, data) | @@ -68,7 +68,7 @@ function _M.sudokuRpc(agent, data) | ||
68 | role:log("activity", { | 68 | role:log("activity", { |
69 | activity_id = id, -- 活动ID(或活动指定任务的ID) | 69 | activity_id = id, -- 活动ID(或活动指定任务的ID) |
70 | activity_type = 0, -- 活动类型,见活动类型枚举表 | 70 | activity_type = 0, -- 活动类型,见活动类型枚举表 |
71 | - activity_reward = json.encode(reward), -- 活动奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} | 71 | + activity_reward = reward, -- 活动奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} |
72 | }) | 72 | }) |
73 | 73 | ||
74 | SendPacket(actionCodes.Activity_sudokuRpc, MsgPack.pack({task = role:packReward(task, tchange), reward = role:packReward(reward, rchange), rId = rId})) | 74 | SendPacket(actionCodes.Activity_sudokuRpc, MsgPack.pack({task = role:packReward(task, tchange), reward = role:packReward(reward, rchange), rId = rId})) |
@@ -107,7 +107,7 @@ function _M.sudokuRewardRpc(agent, data) | @@ -107,7 +107,7 @@ function _M.sudokuRewardRpc(agent, data) | ||
107 | role:log("activity", { | 107 | role:log("activity", { |
108 | activity_id = 10000 + phase, -- 活动ID(或活动指定任务的ID) | 108 | activity_id = 10000 + phase, -- 活动ID(或活动指定任务的ID) |
109 | activity_type = 0, -- 活动类型,见活动类型枚举表 | 109 | activity_type = 0, -- 活动类型,见活动类型枚举表 |
110 | - activity_reward = json.encode(reward), -- 活动奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} | 110 | + activity_reward = reward, -- 活动奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} |
111 | }) | 111 | }) |
112 | 112 | ||
113 | SendPacket(actionCodes.Activity_sudokuRewardRpc, MsgPack.pack(role:packReward(reward, change))) | 113 | SendPacket(actionCodes.Activity_sudokuRewardRpc, MsgPack.pack(role:packReward(reward, change))) |
@@ -170,7 +170,7 @@ function _M.actSignRpc(agent, data) | @@ -170,7 +170,7 @@ function _M.actSignRpc(agent, data) | ||
170 | role:log("activity", { | 170 | role:log("activity", { |
171 | activity_id = curData[0], -- 活动ID(或活动指定任务的ID) | 171 | activity_id = curData[0], -- 活动ID(或活动指定任务的ID) |
172 | activity_type = role.activity.ActivityType.Sign, -- 活动类型,见活动类型枚举表 | 172 | activity_type = role.activity.ActivityType.Sign, -- 活动类型,见活动类型枚举表 |
173 | - activity_reward = json.encode(reward), -- 活动奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} | 173 | + activity_reward = reward, -- 活动奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} |
174 | }) | 174 | }) |
175 | 175 | ||
176 | SendPacket(actionCodes.Activity_actSignRpc, MsgPack.pack(role:packReward(reward, change))) | 176 | SendPacket(actionCodes.Activity_actSignRpc, MsgPack.pack(role:packReward(reward, change))) |
src/actions/AdvAction.lua
@@ -254,7 +254,6 @@ function _M.startHangRpc(agent, data) | @@ -254,7 +254,6 @@ function _M.startHangRpc(agent, data) | ||
254 | 254 | ||
255 | role:changeAdvCount(adv_idle_energy) | 255 | role:changeAdvCount(adv_idle_energy) |
256 | role:checkTaskEnter("AdvStart", {id = chapterId}) | 256 | role:checkTaskEnter("AdvStart", {id = chapterId}) |
257 | - role:log("adv_action", {desc = "startHang", int1 = chapterId}) | ||
258 | 257 | ||
259 | SendPacket(actionCodes.Adv_startHangRpc, '') | 258 | SendPacket(actionCodes.Adv_startHangRpc, '') |
260 | return true | 259 | return true |
@@ -294,8 +293,6 @@ function _M.quickHangRpc(agent, data) | @@ -294,8 +293,6 @@ function _M.quickHangRpc(agent, data) | ||
294 | info.time = 0 | 293 | info.time = 0 |
295 | role:changeUpdates({{type = "advHang", field = chapterId, value = info}}) | 294 | role:changeUpdates({{type = "advHang", field = chapterId, value = info}}) |
296 | 295 | ||
297 | - role:log("adv_action", {desc = "advQuickHang", int1 = chapterId}) | ||
298 | - | ||
299 | SendPacket(actionCodes.Adv_quickHangRpc, '') | 296 | SendPacket(actionCodes.Adv_quickHangRpc, '') |
300 | return true | 297 | return true |
301 | end | 298 | end |
@@ -376,8 +373,6 @@ function _M.endHangRpc(agent, data) | @@ -376,8 +373,6 @@ function _M.endHangRpc(agent, data) | ||
376 | 373 | ||
377 | role:changeUpdates({{type = "advHang", field = chapterId, value = nil}}) | 374 | role:changeUpdates({{type = "advHang", field = chapterId, value = nil}}) |
378 | 375 | ||
379 | - role:log("adv_action", {desc = "endHang", int1 = chapterId, short1 = cancel and 1 or 0}) | ||
380 | - | ||
381 | SendPacket(actionCodes.Adv_endHangRpc, MsgPack.pack({reward = reward, change = change, isFull = isFull})) | 376 | SendPacket(actionCodes.Adv_endHangRpc, MsgPack.pack({reward = reward, change = change, isFull = isFull})) |
382 | return true | 377 | return true |
383 | end | 378 | end |
@@ -399,7 +394,7 @@ function _M.buyAdvCountRpc(agent , data) | @@ -399,7 +394,7 @@ function _M.buyAdvCountRpc(agent , data) | ||
399 | 394 | ||
400 | 395 | ||
401 | if not role:checkItemEnough(cost) then return end | 396 | if not role:checkItemEnough(cost) then return end |
402 | - role:costItems(cost, {log = {desc = "buyAdvCount", short1 = isEl and 1 or 0, int1 = count}}) | 397 | + role:costItems(cost, {log = {desc = "buyAdvCount", int1 = isEl and 1 or 0, int2 = count}}) |
403 | if isEl then | 398 | if isEl then |
404 | role.dailyData:updateProperty({field = "advElC", delta = -count}) | 399 | role.dailyData:updateProperty({field = "advElC", delta = -count}) |
405 | role.dailyData:updateProperty({field = "advElBC", delta = count}) | 400 | role.dailyData:updateProperty({field = "advElBC", delta = count}) |
@@ -407,7 +402,6 @@ function _M.buyAdvCountRpc(agent , data) | @@ -407,7 +402,6 @@ function _M.buyAdvCountRpc(agent , data) | ||
407 | role:changeAdvCount(-count * globalCsv.adv_daily_buy_num) | 402 | role:changeAdvCount(-count * globalCsv.adv_daily_buy_num) |
408 | role.dailyData:updateProperty({field = "advBC", delta = count}) | 403 | role.dailyData:updateProperty({field = "advBC", delta = count}) |
409 | end | 404 | end |
410 | - role:log("adv_action", {desc = "buyAdvCount", short1 = isEl and 1 or 0, int1 = count}) | ||
411 | 405 | ||
412 | SendPacket(actionCodes.Adv_buyAdvCountRpc, '') | 406 | SendPacket(actionCodes.Adv_buyAdvCountRpc, '') |
413 | return true | 407 | return true |
@@ -432,8 +426,6 @@ function _M.finishTaskRpc(agent, data) | @@ -432,8 +426,6 @@ function _M.finishTaskRpc(agent, data) | ||
432 | if not status then return end | 426 | if not status then return end |
433 | role:checkTaskEnter("AdvOverTask", {id = taskId}) | 427 | role:checkTaskEnter("AdvOverTask", {id = taskId}) |
434 | 428 | ||
435 | - adv:log({desc = "finishTask", int1 = taskId}) | ||
436 | - | ||
437 | SendPacket(actionCodes.Adv_finishTaskRpc, MsgPack.pack(role:packReward(reward, change))) | 429 | SendPacket(actionCodes.Adv_finishTaskRpc, MsgPack.pack(role:packReward(reward, change))) |
438 | return true | 430 | return true |
439 | end | 431 | end |
@@ -455,8 +447,6 @@ function _M.clickBlockRpc(agent, data) | @@ -455,8 +447,6 @@ function _M.clickBlockRpc(agent, data) | ||
455 | 447 | ||
456 | if adv:isWaitChooseArtifact() then return returnFail() end | 448 | if adv:isWaitChooseArtifact() then return returnFail() end |
457 | 449 | ||
458 | - adv:log({desc = "clickBlock", int1 = msg.roomId, int2 = msg.blockId}) | ||
459 | - | ||
460 | local status, errorCode = adv:clickBlock(msg.roomId, msg.blockId, msg) | 450 | local status, errorCode = adv:clickBlock(msg.roomId, msg.blockId, msg) |
461 | if not status then return returnFail(errorCode) end | 451 | if not status then return returnFail(errorCode) end |
462 | 452 | ||
@@ -494,7 +484,6 @@ function _M.useItemRpc(agent, data) | @@ -494,7 +484,6 @@ function _M.useItemRpc(agent, data) | ||
494 | end | 484 | end |
495 | 485 | ||
496 | adv:checkAchievement(adv.AchievType.UseItem, count, itemId) | 486 | adv:checkAchievement(adv.AchievType.UseItem, count, itemId) |
497 | - adv:log({desc = "useItem", int1 = itemId, int2 = count}) | ||
498 | 487 | ||
499 | for i = 1, count do | 488 | for i = 1, count do |
500 | adv:doActive(itemData.effect, target) -- target | 489 | adv:doActive(itemData.effect, target) -- target |
@@ -530,7 +519,6 @@ function _M.usePotionRpc(agent, data) | @@ -530,7 +519,6 @@ function _M.usePotionRpc(agent, data) | ||
530 | local adv = role:getAdvData() | 519 | local adv = role:getAdvData() |
531 | if adv:isWaitChooseArtifact() then return end | 520 | if adv:isWaitChooseArtifact() then return end |
532 | 521 | ||
533 | - adv:log({desc = "usePotion", int1 = potionId}) | ||
534 | 522 | ||
535 | local status = adv:doActive(potionData.effect, target) -- target | 523 | local status = adv:doActive(potionData.effect, target) -- target |
536 | if not status then return end | 524 | if not status then return end |
@@ -631,7 +619,6 @@ function _M.exitAdvRpc(agent, data) | @@ -631,7 +619,6 @@ function _M.exitAdvRpc(agent, data) | ||
631 | role:saveGuide(57,1,true) | 619 | role:saveGuide(57,1,true) |
632 | end | 620 | end |
633 | local adv = role:getAdvData() | 621 | local adv = role:getAdvData() |
634 | - adv:log({desc = "exit"}) | ||
635 | local status = adv:exit() -- target {roomId = 1, blockId = 1} 选择的目标 | 622 | local status = adv:exit() -- target {roomId = 1, blockId = 1} 选择的目标 |
636 | SendPacket(actionCodes.Adv_exitAdvRpc, MsgPack.pack({events = adv:popBackEvents()})) | 623 | SendPacket(actionCodes.Adv_exitAdvRpc, MsgPack.pack({events = adv:popBackEvents()})) |
637 | return true | 624 | return true |
@@ -703,7 +690,6 @@ function _M.endBattleRpc(agent, data) | @@ -703,7 +690,6 @@ function _M.endBattleRpc(agent, data) | ||
703 | end | 690 | end |
704 | end | 691 | end |
705 | 692 | ||
706 | - adv:log({desc = "endBattle"}) | ||
707 | local status = adv:clickBlock(roomId, blockId, {player = player, bySkill = bySkill}) | 693 | local status = adv:clickBlock(roomId, blockId, {player = player, bySkill = bySkill}) |
708 | 694 | ||
709 | if not status then return end | 695 | if not status then return end |
@@ -787,7 +773,6 @@ function _M.wheelSurfRpc(agent, data) | @@ -787,7 +773,6 @@ function _M.wheelSurfRpc(agent, data) | ||
787 | role:award(reward, {log = {desc = "advWheelSurf", int1 = ptype}}) | 773 | role:award(reward, {log = {desc = "advWheelSurf", int1 = ptype}}) |
788 | role:finishGuide(58) | 774 | role:finishGuide(58) |
789 | role:checkTaskEnter("AdvDraw", {count = count, ptype = ptype}) | 775 | role:checkTaskEnter("AdvDraw", {count = count, ptype = ptype}) |
790 | - role:log("adv_action", {desc = "advWheelSurf", int1 = ptype, int2 = count}) | ||
791 | 776 | ||
792 | SendPacket(actionCodes.Adv_wheelSurfRpc, MsgPack.pack({reward = backReward})) | 777 | SendPacket(actionCodes.Adv_wheelSurfRpc, MsgPack.pack({reward = backReward})) |
793 | return true | 778 | return true |
@@ -816,7 +801,6 @@ function _M.repayWheelSurfRpc(agent, data) | @@ -816,7 +801,6 @@ function _M.repayWheelSurfRpc(agent, data) | ||
816 | local gift = drawData["pool3"]:randWeight(true) | 801 | local gift = drawData["pool3"]:randWeight(true) |
817 | local reward, change = {[gift[1]] = gift[2]} | 802 | local reward, change = {[gift[1]] = gift[2]} |
818 | reward, change = role:award(reward, {log = {desc = "advRepayWheelSurf", int1 = ptype}}) | 803 | reward, change = role:award(reward, {log = {desc = "advRepayWheelSurf", int1 = ptype}}) |
819 | - role:log("adv_action", {desc = "advRepayWheelSurf", int1 = ptype}) | ||
820 | 804 | ||
821 | SendPacket(actionCodes.Adv_repayWheelSurfRpc, MsgPack.pack(role:packReward(reward, change))) | 805 | SendPacket(actionCodes.Adv_repayWheelSurfRpc, MsgPack.pack(role:packReward(reward, change))) |
822 | return true | 806 | return true |
@@ -839,7 +823,6 @@ function _M.finishAchievRpc(agent, data) | @@ -839,7 +823,6 @@ function _M.finishAchievRpc(agent, data) | ||
839 | end | 823 | end |
840 | if not status then return end | 824 | if not status then return end |
841 | adv:updateAchievement() | 825 | adv:updateAchievement() |
842 | - role:log("adv_action", {desc = "finishAchiev", short1 = ctype, int1 = chapterId, int2 = taskId}) | ||
843 | role:finishGuide(57) | 826 | role:finishGuide(57) |
844 | SendPacket(actionCodes.Adv_finishAchievRpc, MsgPack.pack(role:packReward(reward, change))) | 827 | SendPacket(actionCodes.Adv_finishAchievRpc, MsgPack.pack(role:packReward(reward, change))) |
845 | return true | 828 | return true |
@@ -896,7 +879,6 @@ function _M.refreshSupportRpc(agent, data) | @@ -896,7 +879,6 @@ function _M.refreshSupportRpc(agent, data) | ||
896 | end | 879 | end |
897 | 880 | ||
898 | role:advRandomSupportEffect() | 881 | role:advRandomSupportEffect() |
899 | - role:log("adv_action", {desc = "advSupRe", short1 = cr < al and 0 or 1}) | ||
900 | 882 | ||
901 | SendPacket(actionCodes.Adv_refreshSupportRpc, '') | 883 | SendPacket(actionCodes.Adv_refreshSupportRpc, '') |
902 | return true | 884 | return true |
src/actions/CarAction.lua
@@ -40,13 +40,12 @@ function _M.makePotionRpc( agent, data ) | @@ -40,13 +40,12 @@ function _M.makePotionRpc( agent, data ) | ||
40 | role:updateProperty({field = "potionBag", value = potionBag}) | 40 | role:updateProperty({field = "potionBag", value = potionBag}) |
41 | role:checkTaskEnter("PotionMake", {count = count, id = potionId}) | 41 | role:checkTaskEnter("PotionMake", {count = count, id = potionId}) |
42 | 42 | ||
43 | - role:log("role_action", {desc = "makePotion", int1 = potionId, int2 = count}) | ||
44 | role:log("carriage_cook", { | 43 | role:log("carriage_cook", { |
45 | item_id = potionId, -- 道具id | 44 | item_id = potionId, -- 道具id |
46 | item_level = potionLv, -- 道具等级 | 45 | item_level = potionLv, -- 道具等级 |
47 | item_type = 0, -- 道具类型,具体见枚举表中道具类型枚举表 | 46 | item_type = 0, -- 道具类型,具体见枚举表中道具类型枚举表 |
48 | carriage_cook_amount = count, -- 制作总量 | 47 | carriage_cook_amount = count, -- 制作总量 |
49 | - carriage_cook_cost = json.encode(cost), -- 制作消耗道具,json格式记录,{'itemid1':10,'itemid2':5,…………..} | 48 | + carriage_cook_cost = cost, -- 制作消耗道具,json格式记录,{'itemid1':10,'itemid2':5,…………..} |
50 | }) | 49 | }) |
51 | SendPacket(actionCodes.Car_makePotionRpc, MsgPack.pack({potionBag = potionBag})) | 50 | SendPacket(actionCodes.Car_makePotionRpc, MsgPack.pack({potionBag = potionBag})) |
52 | return true | 51 | return true |
@@ -104,7 +103,7 @@ function _M.equipUpRpc( agent, data ) | @@ -104,7 +103,7 @@ function _M.equipUpRpc( agent, data ) | ||
104 | equip_upgrade_amount = count, -- 升级获取的装备数量 | 103 | equip_upgrade_amount = count, -- 升级获取的装备数量 |
105 | equip_upgrade_usedid = lv, -- 升级消耗的装备ID | 104 | equip_upgrade_usedid = lv, -- 升级消耗的装备ID |
106 | equip_upgrade_cost = costCount, -- 升级操作消耗装备数量 | 105 | equip_upgrade_cost = costCount, -- 升级操作消耗装备数量 |
107 | - equip_upgrade_current = json.encode(cost), -- 升级消耗的货币类型 | 106 | + equip_upgrade_current = cost, -- 升级消耗的货币类型 |
108 | }) | 107 | }) |
109 | 108 | ||
110 | SendPacket(actionCodes.Car_equipUpRpc, '') | 109 | SendPacket(actionCodes.Car_equipUpRpc, '') |
@@ -181,8 +180,6 @@ function _M.saleEquipRpc(agent, data ) | @@ -181,8 +180,6 @@ function _M.saleEquipRpc(agent, data ) | ||
181 | role:checkTaskEnter("SaleEquip", {count = allCount}) | 180 | role:checkTaskEnter("SaleEquip", {count = allCount}) |
182 | reward, change = role:award(reward, {log = {desc = "saleEquip"}}) | 181 | reward, change = role:award(reward, {log = {desc = "saleEquip"}}) |
183 | 182 | ||
184 | - role:log("role_action", {desc = "saleEquip", int1 = allCount}) | ||
185 | - | ||
186 | SendPacket(actionCodes.Car_saleEquipRpc, MsgPack.pack(role:packReward(reward, change))) | 183 | SendPacket(actionCodes.Car_saleEquipRpc, MsgPack.pack(role:packReward(reward, change))) |
187 | return true | 184 | return true |
188 | end | 185 | end |
src/actions/DinerAction.lua
@@ -105,7 +105,6 @@ function _M.addSellRpc( agent, data ) | @@ -105,7 +105,6 @@ function _M.addSellRpc( agent, data ) | ||
105 | role.dinerData:updateProperty({field = "customer", value = customer}) | 105 | role.dinerData:updateProperty({field = "customer", value = customer}) |
106 | end | 106 | end |
107 | role:finishGuide(28) | 107 | role:finishGuide(28) |
108 | - role:log("diner_action", {desc = "addSell", int1 = dish, int2 = count}) | ||
109 | 108 | ||
110 | role.dinerData:updateProperty({field = "sells", value = json.encode(sells)}) | 109 | role.dinerData:updateProperty({field = "sells", value = json.encode(sells)}) |
111 | SendPacket(actionCodes.Diner_addSellRpc, "") | 110 | SendPacket(actionCodes.Diner_addSellRpc, "") |
@@ -312,8 +311,6 @@ function _M.expediteSellRpc( agent, data ) | @@ -312,8 +311,6 @@ function _M.expediteSellRpc( agent, data ) | ||
312 | end | 311 | end |
313 | role:checkTaskEnter("FoodSellQuick") | 312 | role:checkTaskEnter("FoodSellQuick") |
314 | 313 | ||
315 | - role:log("diner_action", {desc = "sellQ"}) | ||
316 | - | ||
317 | SendPacket(actionCodes.Diner_expediteSellRpc, MsgPack.pack({reward = reward, change = change, popular = popular})) | 314 | SendPacket(actionCodes.Diner_expediteSellRpc, MsgPack.pack({reward = reward, change = change, popular = popular})) |
318 | return true | 315 | return true |
319 | end | 316 | end |
@@ -442,7 +439,6 @@ function _M.talentUpRpc( agent, data ) | @@ -442,7 +439,6 @@ function _M.talentUpRpc( agent, data ) | ||
442 | 439 | ||
443 | role:checkTaskEnter("DinerTalentUp", {type = talentData.effect:toArray(true,"=")[1], level = dishLevel + 1}) | 440 | role:checkTaskEnter("DinerTalentUp", {type = talentData.effect:toArray(true,"=")[1], level = dishLevel + 1}) |
444 | role:finishGuide(27) | 441 | role:finishGuide(27) |
445 | - role:log("diner_action", {desc = "talentUp", int1 = dish, int2 = dishLevel + 1}) | ||
446 | role:log("carriage_logistics", { | 442 | role:log("carriage_logistics", { |
447 | carriage_logistics_type = typ, -- 后勤室制作类型ID,变异:0,通常:1,魔法:2 | 443 | carriage_logistics_type = typ, -- 后勤室制作类型ID,变异:0,通常:1,魔法:2 |
448 | carriage_logistics_itemid = dish, -- 后勤室升级物品或技能ID | 444 | carriage_logistics_itemid = dish, -- 后勤室升级物品或技能ID |
@@ -483,7 +479,6 @@ function _M.skillUpRpc( agent, data ) | @@ -483,7 +479,6 @@ function _M.skillUpRpc( agent, data ) | ||
483 | 479 | ||
484 | role:costItems(cost, {log = {desc = "dinerSkillUp", int1 = skill, int2 = skillLevel + 1}}) | 480 | role:costItems(cost, {log = {desc = "dinerSkillUp", int1 = skill, int2 = skillLevel + 1}}) |
485 | role.dinerData:updateProperty({field = "skillTree", value = skillTree:setv(skill, skillLevel + 1)}) | 481 | role.dinerData:updateProperty({field = "skillTree", value = skillTree:setv(skill, skillLevel + 1)}) |
486 | - role:log("diner_action", {desc = "skillUp", int1 = skill, int2 = skillLevel + 1}) | ||
487 | 482 | ||
488 | SendPacket(actionCodes.Diner_skillUpRpc, '') | 483 | SendPacket(actionCodes.Diner_skillUpRpc, '') |
489 | return true | 484 | return true |
@@ -511,8 +506,6 @@ function _M.lockTaskRpc( agent, data ) | @@ -511,8 +506,6 @@ function _M.lockTaskRpc( agent, data ) | ||
511 | end | 506 | end |
512 | role.dinerData:updateProperty({field = "order", value = json.encode(orders)}) | 507 | role.dinerData:updateProperty({field = "order", value = json.encode(orders)}) |
513 | 508 | ||
514 | - role:log("diner_action", {desc = "lockTask", int1 = order.id}) | ||
515 | - | ||
516 | SendPacket(actionCodes.Diner_lockTaskRpc, MsgPack.pack({lock = order.lock})) | 509 | SendPacket(actionCodes.Diner_lockTaskRpc, MsgPack.pack({lock = order.lock})) |
517 | return true | 510 | return true |
518 | end | 511 | end |
@@ -576,7 +569,7 @@ function _M.updateTaskRpc( agent, data ) | @@ -576,7 +569,7 @@ function _M.updateTaskRpc( agent, data ) | ||
576 | role:log("restaurant_order", { | 569 | role:log("restaurant_order", { |
577 | restaurant_order_id = order.id, -- 订单任务ID | 570 | restaurant_order_id = order.id, -- 订单任务ID |
578 | restaurant_order_status = cmd, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 | 571 | restaurant_order_status = cmd, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 |
579 | - restaurant_order_rwd = json.encode(reward), -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} | 572 | + restaurant_order_rwd = reward, -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} |
580 | restaurant_order_lv = taskSet.rarity, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 | 573 | restaurant_order_lv = taskSet.rarity, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 |
581 | }) | 574 | }) |
582 | 575 | ||
@@ -654,7 +647,6 @@ function _M.refreshTaskRpc( agent, data ) | @@ -654,7 +647,6 @@ function _M.refreshTaskRpc( agent, data ) | ||
654 | end | 647 | end |
655 | end | 648 | end |
656 | 649 | ||
657 | - role:log("diner_action", {desc = "reTask"}) | ||
658 | role:finishGuide(41) | 650 | role:finishGuide(41) |
659 | role.dinerData:updateProperty({field = "order", value = json.encode(orders)}) | 651 | role.dinerData:updateProperty({field = "order", value = json.encode(orders)}) |
660 | 652 | ||
@@ -695,7 +687,6 @@ function _M.addWantFoodRpc(agent , data) | @@ -695,7 +687,6 @@ function _M.addWantFoodRpc(agent , data) | ||
695 | gfood[slot] = {id = itemId, st = skynet.timex()} | 687 | gfood[slot] = {id = itemId, st = skynet.timex()} |
696 | end | 688 | end |
697 | 689 | ||
698 | - role:log("diner_action", {desc = "wantFood"}) | ||
699 | role:finishGuide(36) | 690 | role:finishGuide(36) |
700 | role.dinerData:updateProperty({field = "gfood", value = gfood}) | 691 | role.dinerData:updateProperty({field = "gfood", value = gfood}) |
701 | 692 | ||
@@ -880,8 +871,6 @@ function _M.entrustRpc(agent , data) | @@ -880,8 +871,6 @@ function _M.entrustRpc(agent , data) | ||
880 | end | 871 | end |
881 | role.dinerData:updateProperty({field = "entrust", value = entrust}) | 872 | role.dinerData:updateProperty({field = "entrust", value = entrust}) |
882 | 873 | ||
883 | - role:log("diner_action", {desc = "entrus", short1 = ctype, int1 = entrustId}) | ||
884 | - | ||
885 | role:finishGuide(26) | 874 | role:finishGuide(26) |
886 | 875 | ||
887 | SendPacket(actionCodes.Diner_entrustRpc, MsgPack.pack({reward = reward, change = change})) | 876 | SendPacket(actionCodes.Diner_entrustRpc, MsgPack.pack({reward = reward, change = change})) |
@@ -916,7 +905,7 @@ function _M.collectRpc(agent , data) | @@ -916,7 +905,7 @@ function _M.collectRpc(agent , data) | ||
916 | 905 | ||
917 | role:log("restaurant_collect", { | 906 | role:log("restaurant_collect", { |
918 | restaurant_collect_id = id, -- 图谱收集ID | 907 | restaurant_collect_id = id, -- 图谱收集ID |
919 | - restaurant_collect_rwd = json.encode(reward), -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} | 908 | + restaurant_collect_rwd = reward, -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} |
920 | restaurant_collect_plan = count, -- 收集进度,即解锁顾客,数字表示 | 909 | restaurant_collect_plan = count, -- 收集进度,即解锁顾客,数字表示 |
921 | }) | 910 | }) |
922 | 911 | ||
@@ -948,8 +937,6 @@ function _M.comboRewardRpc(agent , data) | @@ -948,8 +937,6 @@ function _M.comboRewardRpc(agent , data) | ||
948 | 937 | ||
949 | role.dinerData:updateProperty({field = "comboStatus", value = comboStatus}) -- 解锁了 | 938 | role.dinerData:updateProperty({field = "comboStatus", value = comboStatus}) -- 解锁了 |
950 | 939 | ||
951 | - role:log("diner_action", {desc = "combo", int1 = id}) | ||
952 | - | ||
953 | SendPacket(actionCodes.Diner_comboRewardRpc, MsgPack.pack({reward = reward, change = change})) | 940 | SendPacket(actionCodes.Diner_comboRewardRpc, MsgPack.pack({reward = reward, change = change})) |
954 | return true | 941 | return true |
955 | end | 942 | end |
src/actions/FriendAction.lua
@@ -111,7 +111,6 @@ function _M.searchRpc(agent, data) | @@ -111,7 +111,6 @@ function _M.searchRpc(agent, data) | ||
111 | })) | 111 | })) |
112 | end | 112 | end |
113 | 113 | ||
114 | - role:log("role_action", {desc = "searchFriend"}) | ||
115 | SendPacket(actionCodes.Friend_searchRpc, MsgPack.pack({searchList = searchList})) | 114 | SendPacket(actionCodes.Friend_searchRpc, MsgPack.pack({searchList = searchList})) |
116 | return true | 115 | return true |
117 | end | 116 | end |
@@ -178,8 +177,6 @@ function _M.applyRpc(agent, data) | @@ -178,8 +177,6 @@ function _M.applyRpc(agent, data) | ||
178 | myInfo.online = true | 177 | myInfo.online = true |
179 | myInfo.hadApply = true | 178 | myInfo.hadApply = true |
180 | 179 | ||
181 | - role:log("role_action", {desc = "addFriend", int1 = 1}) | ||
182 | - | ||
183 | rpcRole(objectId, "SendPacket", actionCodes.Friend_updateProperty, MsgPack.pack({newApply = 1, info = {myInfo}})) -- 通知对方 | 180 | rpcRole(objectId, "SendPacket", actionCodes.Friend_updateProperty, MsgPack.pack({newApply = 1, info = {myInfo}})) -- 通知对方 |
184 | end | 181 | end |
185 | 182 | ||
@@ -350,8 +347,6 @@ function _M.handleApplyRpc(agent, data) | @@ -350,8 +347,6 @@ function _M.handleApplyRpc(agent, data) | ||
350 | rpcRole(objectId, "SendPacket", actionCodes.Friend_updateProperty, MsgPack.pack({newFriend = 1, info = {myInfo}})) -- 通知对方 | 347 | rpcRole(objectId, "SendPacket", actionCodes.Friend_updateProperty, MsgPack.pack({newFriend = 1, info = {myInfo}})) -- 通知对方 |
351 | end | 348 | end |
352 | if next(needAdd) then | 349 | if next(needAdd) then |
353 | - role:log("role_action", {desc = "addFriend", int1 = #needAdd}) | ||
354 | - | ||
355 | SendPacket(actionCodes.Friend_updateProperty, MsgPack.pack({newFriend = 1, info = needAddInfo})) | 350 | SendPacket(actionCodes.Friend_updateProperty, MsgPack.pack({newFriend = 1, info = needAddInfo})) |
356 | else | 351 | else |
357 | result = 1 | 352 | result = 1 |
@@ -558,8 +553,6 @@ function _M.pointRpc(agent, data) | @@ -558,8 +553,6 @@ function _M.pointRpc(agent, data) | ||
558 | role.dailyData:updateProperty({field = "giveFP", value = giveP}) | 553 | role.dailyData:updateProperty({field = "giveFP", value = giveP}) |
559 | role:checkTaskEnter("GiveFriendP", {count = 1}) | 554 | role:checkTaskEnter("GiveFriendP", {count = 1}) |
560 | rpcRole(objId, "SendPacket", actionCodes.Friend_updateProperty, MsgPack.pack({newPoint = 1, roleId = roleId})) | 555 | rpcRole(objId, "SendPacket", actionCodes.Friend_updateProperty, MsgPack.pack({newPoint = 1, roleId = roleId})) |
561 | - | ||
562 | - role:log("role_action", {desc = "giveFPoint", int1 = 1}) | ||
563 | end | 556 | end |
564 | elseif cmd == 2 then -- 领取 | 557 | elseif cmd == 2 then -- 领取 |
565 | local objId = msg.roleId | 558 | local objId = msg.roleId |
@@ -579,7 +572,6 @@ function _M.pointRpc(agent, data) | @@ -579,7 +572,6 @@ function _M.pointRpc(agent, data) | ||
579 | role.dailyData:updateProperty({field = "getFP", value = getP}) | 572 | role.dailyData:updateProperty({field = "getFP", value = getP}) |
580 | role:checkTaskEnter("GetFriendP", {count = 1}) | 573 | role:checkTaskEnter("GetFriendP", {count = 1}) |
581 | 574 | ||
582 | - role:log("role_action", {desc = "getFPoint", int1 = 1}) | ||
583 | end | 575 | end |
584 | elseif cmd == 3 then -- 一键赠送领取 | 576 | elseif cmd == 3 then -- 一键赠送领取 |
585 | -- 赠送 | 577 | -- 赠送 |
@@ -601,8 +593,6 @@ function _M.pointRpc(agent, data) | @@ -601,8 +593,6 @@ function _M.pointRpc(agent, data) | ||
601 | role.dailyData:updateProperty({field = "giveFP", value = giveP}) | 593 | role.dailyData:updateProperty({field = "giveFP", value = giveP}) |
602 | role:checkTaskEnter("GiveFriendP", {count = change}) | 594 | role:checkTaskEnter("GiveFriendP", {count = change}) |
603 | 595 | ||
604 | - role:log("role_action", {desc = "giveFPoint", int1 = change}) | ||
605 | - | ||
606 | else | 596 | else |
607 | result = 1 | 597 | result = 1 |
608 | end | 598 | end |
@@ -627,7 +617,6 @@ function _M.pointRpc(agent, data) | @@ -627,7 +617,6 @@ function _M.pointRpc(agent, data) | ||
627 | reward = role:award({[ItemId.FriendPoint] = getCount}, {log = {desc = "friendPoint"}}) | 617 | reward = role:award({[ItemId.FriendPoint] = getCount}, {log = {desc = "friendPoint"}}) |
628 | role.dailyData:updateProperty({field = "getFP", value = getP}) | 618 | role.dailyData:updateProperty({field = "getFP", value = getP}) |
629 | role:checkTaskEnter("GetFriendP", {count = getCount}) | 619 | role:checkTaskEnter("GetFriendP", {count = getCount}) |
630 | - role:log("role_action", {desc = "getFPoint", int1 = getCount}) | ||
631 | else | 620 | else |
632 | result = (result or 0) + 2 | 621 | result = (result or 0) + 2 |
633 | end | 622 | end |
src/actions/GmAction.lua
@@ -27,7 +27,6 @@ function _M.ignoreout(role, pms) | @@ -27,7 +27,6 @@ function _M.ignoreout(role, pms) | ||
27 | else -- 解除 | 27 | else -- 解除 |
28 | role:updateProperty({field = "ignoreMt", value = 0}) | 28 | role:updateProperty({field = "ignoreMt", value = 0}) |
29 | end | 29 | end |
30 | - role:log("gm_action", {desc = "ignoreout", key1 = pms.sender}) | ||
31 | return "指令生效" | 30 | return "指令生效" |
32 | end | 31 | end |
33 | 32 | ||
@@ -47,17 +46,11 @@ function _M.ban(role, pms) | @@ -47,17 +46,11 @@ function _M.ban(role, pms) | ||
47 | end) | 46 | end) |
48 | end | 47 | end |
49 | end | 48 | end |
50 | - | ||
51 | - role:log("gm_action", {desc = "ban", int1 = time, int2 = ctype, key1 = pms.sender}) | ||
52 | - | ||
53 | return isBan and "解封杀成功" or "封杀成功" | 49 | return isBan and "解封杀成功" or "封杀成功" |
54 | end | 50 | end |
55 | 51 | ||
56 | function _M.unban(role, pms) | 52 | function _M.unban(role, pms) |
57 | role:setBan(0, 0) | 53 | role:setBan(0, 0) |
58 | - | ||
59 | - role:log("gm_action", {desc = "unban", key1 = pms.sender}) | ||
60 | - | ||
61 | return "解封杀成功" | 54 | return "解封杀成功" |
62 | end | 55 | end |
63 | 56 | ||
@@ -70,8 +63,6 @@ function _M.gmmsg(role, pms) | @@ -70,8 +63,6 @@ function _M.gmmsg(role, pms) | ||
70 | skynet.call(agent.gate_serv, "lua", "forcekick", agent.fd) | 63 | skynet.call(agent.gate_serv, "lua", "forcekick", agent.fd) |
71 | end) | 64 | end) |
72 | end | 65 | end |
73 | - role:log("gm_action", {desc = "gmmsg", text1 = pms.pm1, key1 = pms.sender}) | ||
74 | - | ||
75 | return "指令成功" | 66 | return "指令成功" |
76 | end | 67 | end |
77 | 68 | ||
@@ -82,8 +73,6 @@ function _M.silent(role, pms) | @@ -82,8 +73,6 @@ function _M.silent(role, pms) | ||
82 | return "解禁言成功" | 73 | return "解禁言成功" |
83 | end | 74 | end |
84 | role:updateProperty({field = "silent", value = specTime({hour = 0}, skynet.timex()) + pm1 * 86400}) | 75 | role:updateProperty({field = "silent", value = specTime({hour = 0}, skynet.timex()) + pm1 * 86400}) |
85 | - | ||
86 | - role:log("gm_action", {desc = "silent", int1 = pms.pm1, key1 = pms.sender}) | ||
87 | return "禁言成功" | 76 | return "禁言成功" |
88 | end | 77 | end |
89 | 78 | ||
@@ -101,8 +90,6 @@ function _M.hero(role, pms) | @@ -101,8 +90,6 @@ function _M.hero(role, pms) | ||
101 | if not role:addHero({type = heroType, log = {desc = "gm"}}) then | 90 | if not role:addHero({type = heroType, log = {desc = "gm"}}) then |
102 | return "失败" | 91 | return "失败" |
103 | end | 92 | end |
104 | - | ||
105 | - role:log("gm_action", {desc = "hero", int1 = heroType, key1 = pms.sender}) | ||
106 | return "成功" | 93 | return "成功" |
107 | end | 94 | end |
108 | 95 | ||
@@ -135,8 +122,6 @@ function _M.herol(role, pms) | @@ -135,8 +122,6 @@ function _M.herol(role, pms) | ||
135 | hero:updateProperty({field = "level", delta = addLevel}) | 122 | hero:updateProperty({field = "level", delta = addLevel}) |
136 | role:checkTaskEnter("HeroLevelUp", {level = hero:getProperty("level")}) | 123 | role:checkTaskEnter("HeroLevelUp", {level = hero:getProperty("level")}) |
137 | 124 | ||
138 | - role:log("gm_action", {desc = "herol", int1 = heroType, int2 = addLevel, key1 = pms.sender}) | ||
139 | - | ||
140 | return "成功" | 125 | return "成功" |
141 | end | 126 | end |
142 | 127 | ||
@@ -148,8 +133,6 @@ function _M.herola(role, pms) | @@ -148,8 +133,6 @@ function _M.herola(role, pms) | ||
148 | _M.herol(role, {pm1 = hero:getProperty("type"), pm2 = addLevel}) | 133 | _M.herol(role, {pm1 = hero:getProperty("type"), pm2 = addLevel}) |
149 | end | 134 | end |
150 | 135 | ||
151 | - role:log("gm_action", {desc = "herola", int1 = addLevel, key1 = pms.sender}) | ||
152 | - | ||
153 | return "成功" | 136 | return "成功" |
154 | end | 137 | end |
155 | 138 | ||
@@ -160,7 +143,6 @@ function _M.equip(role, pms) | @@ -160,7 +143,6 @@ function _M.equip(role, pms) | ||
160 | local level = tonum(pms.pm2) | 143 | local level = tonum(pms.pm2) |
161 | local count = tonum(pms.pm3) | 144 | local count = tonum(pms.pm3) |
162 | role:addEquip(typ, level, count, {log = {desc = "gm"}}) | 145 | role:addEquip(typ, level, count, {log = {desc = "gm"}}) |
163 | - role:log("gm_action", {desc = "equip", int1 = typ, int2 = level, long1 = count, key1 = pms.sender}) | ||
164 | return "成功" | 146 | return "成功" |
165 | end | 147 | end |
166 | 148 | ||
@@ -169,7 +151,6 @@ function _M.rune(role, pms) | @@ -169,7 +151,6 @@ function _M.rune(role, pms) | ||
169 | local typ = tonum(pms.pm1) | 151 | local typ = tonum(pms.pm1) |
170 | local id = tonum(pms.pm2) | 152 | local id = tonum(pms.pm2) |
171 | local result = role:addRune({type = typ,id = id, log = {desc = "gm"}}) | 153 | local result = role:addRune({type = typ,id = id, log = {desc = "gm"}}) |
172 | - role:log("gm_action", {desc = "rune", int1 = typ, int2 = id, key1 = pms.sender}) | ||
173 | 154 | ||
174 | return result | 155 | return result |
175 | end | 156 | end |
@@ -190,8 +171,6 @@ function _M.fb(role, pms) -- 直接通关 | @@ -190,8 +171,6 @@ function _M.fb(role, pms) -- 直接通关 | ||
190 | role:hangFinish(carbonId) | 171 | role:hangFinish(carbonId) |
191 | addPre(carbonId) | 172 | addPre(carbonId) |
192 | 173 | ||
193 | - role:log("gm_action", {desc = "fb", int1 = carbonId, key1 = pms.sender}) | ||
194 | - | ||
195 | role:checkTaskEnter("HangPass", {id = carbonId}) | 174 | role:checkTaskEnter("HangPass", {id = carbonId}) |
196 | return "成功" | 175 | return "成功" |
197 | end | 176 | end |
@@ -212,8 +191,6 @@ function _M.fbc(role, pms) -- 直接通关 | @@ -212,8 +191,6 @@ function _M.fbc(role, pms) -- 直接通关 | ||
212 | end | 191 | end |
213 | role:updateProperty({field = "hangPass", value = {}}) | 192 | role:updateProperty({field = "hangPass", value = {}}) |
214 | addPre(carbonId) | 193 | addPre(carbonId) |
215 | - | ||
216 | - role:log("gm_action", {desc = "fbc", int1 = carbonId, key1 = pms.sender}) | ||
217 | 194 | ||
218 | return "成功" | 195 | return "成功" |
219 | end | 196 | end |
@@ -247,8 +224,6 @@ function _M.exp(role, pms) | @@ -247,8 +224,6 @@ function _M.exp(role, pms) | ||
247 | exp = math.floor(math.max(exp, 0)) | 224 | exp = math.floor(math.max(exp, 0)) |
248 | role:addPlayExp(exp, {log = {desc = "gm"}}) | 225 | role:addPlayExp(exp, {log = {desc = "gm"}}) |
249 | 226 | ||
250 | - role:log("gm_action", {desc = "exp", int1 = exp, key1 = pms.sender}) | ||
251 | - | ||
252 | return "成功" | 227 | return "成功" |
253 | end | 228 | end |
254 | 229 | ||
@@ -305,7 +280,6 @@ function _M.get(role, pms) | @@ -305,7 +280,6 @@ function _M.get(role, pms) | ||
305 | end | 280 | end |
306 | local count = tonum(pms.pm2, 1) | 281 | local count = tonum(pms.pm2, 1) |
307 | role:award({[itemId] = count}, {log = {desc = "gm"}}) | 282 | role:award({[itemId] = count}, {log = {desc = "gm"}}) |
308 | - role:log("gm_action", {desc = "get", int1 = itemId, int2 = count, key1 = pms.sender}) | ||
309 | end | 283 | end |
310 | return "成功" | 284 | return "成功" |
311 | end | 285 | end |
@@ -329,9 +303,6 @@ function _M.advc(role, pms) | @@ -329,9 +303,6 @@ function _M.advc(role, pms) | ||
329 | advAFWear = {}, | 303 | advAFWear = {}, |
330 | }, notNotify) | 304 | }, notNotify) |
331 | role.advData = nil | 305 | role.advData = nil |
332 | - | ||
333 | - role:log("gm_action", {desc = "advc", key1 = pms.sender}) | ||
334 | - | ||
335 | return "成功" | 306 | return "成功" |
336 | end | 307 | end |
337 | 308 | ||
@@ -340,8 +311,6 @@ function _M.advf(role, pms) | @@ -340,8 +311,6 @@ function _M.advf(role, pms) | ||
340 | role:updateProperty({field = "advC", value = 0}) | 311 | role:updateProperty({field = "advC", value = 0}) |
341 | role.dailyData:updateProperty({field = "advElC", value = 0}) | 312 | role.dailyData:updateProperty({field = "advElC", value = 0}) |
342 | 313 | ||
343 | - role:log("gm_action", {desc = "advf", key1 = pms.sender}) | ||
344 | - | ||
345 | return "成功" | 314 | return "成功" |
346 | end | 315 | end |
347 | 316 | ||
@@ -361,7 +330,6 @@ function _M.adv(role, pms) | @@ -361,7 +330,6 @@ function _M.adv(role, pms) | ||
361 | advPass[chapterId] = layer | 330 | advPass[chapterId] = layer |
362 | role:updateProperty({field = "advPass", value = advPass}) | 331 | role:updateProperty({field = "advPass", value = advPass}) |
363 | end | 332 | end |
364 | - role:log("gm_action", {desc = "adv", int1 = chapterId, int2 = layer, key1 = pms.sender}) | ||
365 | 333 | ||
366 | return "成功" | 334 | return "成功" |
367 | end | 335 | end |
@@ -388,7 +356,6 @@ function _M.advt(role, pms) | @@ -388,7 +356,6 @@ function _M.advt(role, pms) | ||
388 | isEnter = true, | 356 | isEnter = true, |
389 | debugMapId = mapId, | 357 | debugMapId = mapId, |
390 | }) | 358 | }) |
391 | - role:log("gm_action", {desc = "advt", int1 = chapterId, int2 = layer, key1 = pms.sender}) | ||
392 | return "成功" | 359 | return "成功" |
393 | end | 360 | end |
394 | 361 | ||
@@ -397,8 +364,6 @@ function _M.advl(role, pms) | @@ -397,8 +364,6 @@ function _M.advl(role, pms) | ||
397 | local exp = tonum(pms.pm1) | 364 | local exp = tonum(pms.pm1) |
398 | role:addAdvLvExp(math.max(0, exp)) | 365 | role:addAdvLvExp(math.max(0, exp)) |
399 | 366 | ||
400 | - role:log("gm_action", {desc = "advl", int1 = exp, key1 = pms.sender}) | ||
401 | - | ||
402 | return "成功" | 367 | return "成功" |
403 | end | 368 | end |
404 | 369 | ||
@@ -412,7 +377,6 @@ function _M.advcl(role, pms) | @@ -412,7 +377,6 @@ function _M.advcl(role, pms) | ||
412 | end | 377 | end |
413 | advData.battle.player:addExp(exp) | 378 | advData.battle.player:addExp(exp) |
414 | advData:saveDB() | 379 | advData:saveDB() |
415 | - role:log("gm_action", {desc = "advcl", int1 = exp, key1 = pms.sender}) | ||
416 | 380 | ||
417 | return "成功" | 381 | return "成功" |
418 | end | 382 | end |
@@ -422,7 +386,6 @@ function _M.idlec(role, pms) | @@ -422,7 +386,6 @@ function _M.idlec(role, pms) | ||
422 | role:updateProperty({field = "hangTeam", value = {}}) | 386 | role:updateProperty({field = "hangTeam", value = {}}) |
423 | role:updateProperty({field = "hangInfo", value = {}}) | 387 | role:updateProperty({field = "hangInfo", value = {}}) |
424 | role:updateProperty({field = "hangBag", value = {}}) | 388 | role:updateProperty({field = "hangBag", value = {}}) |
425 | - role:log("gm_action", {desc = "idlec", key1 = pms.sender}) | ||
426 | 389 | ||
427 | role.advData = nil | 390 | role.advData = nil |
428 | return "成功" | 391 | return "成功" |
@@ -447,8 +410,6 @@ function _M.advit(role, pms) | @@ -447,8 +410,6 @@ function _M.advit(role, pms) | ||
447 | local itemId = tonum(pms.pm1) | 410 | local itemId = tonum(pms.pm1) |
448 | local count = tonum(pms.pm2) | 411 | local count = tonum(pms.pm2) |
449 | reward[itemId] = count | 412 | reward[itemId] = count |
450 | - | ||
451 | - role:log("gm_action", {desc = "advit", int1 = itemId, int2 = count, key1 = pms.sender}) | ||
452 | end | 413 | end |
453 | 414 | ||
454 | 415 | ||
@@ -464,8 +425,6 @@ function _M.tower(role, pms) | @@ -464,8 +425,6 @@ function _M.tower(role, pms) | ||
464 | if not csvdb["tower_battleCsv"][level] then return "不存在" end | 425 | if not csvdb["tower_battleCsv"][level] then return "不存在" end |
465 | role:updateProperty({field = "towerInfo", value = {c = globalCsv.tower_count_limit, l = level}}) | 426 | role:updateProperty({field = "towerInfo", value = {c = globalCsv.tower_count_limit, l = level}}) |
466 | 427 | ||
467 | - role:log("gm_action", {desc = "tower", int1 = level, key1 = pms.sender}) | ||
468 | - | ||
469 | return "成功" | 428 | return "成功" |
470 | end | 429 | end |
471 | 430 | ||
@@ -484,8 +443,6 @@ function _M.email(role, pms) | @@ -484,8 +443,6 @@ function _M.email(role, pms) | ||
484 | rewardPms = id ~= 0 and reward or nil, | 443 | rewardPms = id ~= 0 and reward or nil, |
485 | }) | 444 | }) |
486 | 445 | ||
487 | - role:log("gm_action", {desc = "email", int1 = id, key1 = pms.sender}) | ||
488 | - | ||
489 | return "成功" | 446 | return "成功" |
490 | end | 447 | end |
491 | 448 | ||
@@ -503,7 +460,6 @@ function _M.cguide(role, pms) | @@ -503,7 +460,6 @@ function _M.cguide(role, pms) | ||
503 | role:updateProperty({field = "funcGuide", value = ""}) | 460 | role:updateProperty({field = "funcGuide", value = ""}) |
504 | end | 461 | end |
505 | 462 | ||
506 | - role:log("gm_action", {desc = "cguide", int1 = id, key1 = pms.sender}) | ||
507 | return "成功" | 463 | return "成功" |
508 | end | 464 | end |
509 | 465 |
src/actions/HangAction.lua
@@ -156,8 +156,6 @@ function _M.startRpc( agent, data ) | @@ -156,8 +156,6 @@ function _M.startRpc( agent, data ) | ||
156 | end | 156 | end |
157 | role:updateProperty({field = "hangInfo", value = hangInfo}) | 157 | role:updateProperty({field = "hangInfo", value = hangInfo}) |
158 | 158 | ||
159 | - role:log("hang_action", {desc = "startHang", int1 = carbonId}) | ||
160 | - | ||
161 | SendPacket(actionCodes.Hang_startRpc, '') | 159 | SendPacket(actionCodes.Hang_startRpc, '') |
162 | return true | 160 | return true |
163 | end | 161 | end |
@@ -248,7 +246,6 @@ function _M.endBattleRpc(agent, data) | @@ -248,7 +246,6 @@ function _M.endBattleRpc(agent, data) | ||
248 | role:updateProperty({field = "hangInfo", value = hangInfo}) | 246 | role:updateProperty({field = "hangInfo", value = hangInfo}) |
249 | 247 | ||
250 | local team = role:getProperty("pvpTC") | 248 | local team = role:getProperty("pvpTC") |
251 | - role:log("hang_action", {desc = "hangBattle", short1 = msg.starNum > 0 and 1 or 0, int1 = carbonId, int2 = role:getProperty("hangTBV"), cint1 = role:getHerosCamp(team.heros)}) | ||
252 | 249 | ||
253 | -- 引导 | 250 | -- 引导 |
254 | if carbonId == 10101 then | 251 | if carbonId == 10101 then |
@@ -500,7 +497,7 @@ function _M.buyBonusCountRpc(agent, data) | @@ -500,7 +497,7 @@ function _M.buyBonusCountRpc(agent, data) | ||
500 | 497 | ||
501 | if not role:checkItemEnough({[ItemId.Diamond] = globalCsv.bonus_buy_cost * count}) then return 2 end | 498 | if not role:checkItemEnough({[ItemId.Diamond] = globalCsv.bonus_buy_cost * count}) then return 2 end |
502 | 499 | ||
503 | - role:costItems({[ItemId.Diamond] = globalCsv.bonus_buy_cost * count}, {log = {desc = "buyBonusCount", short1 = btype, int1 = count}}) | 500 | + role:costItems({[ItemId.Diamond] = globalCsv.bonus_buy_cost * count}, {log = {desc = "buyBonusCount", int1 = btype, int2 = count}}) |
504 | bonusC[btype]["b"] = bonusC[btype]["b"] + count | 501 | bonusC[btype]["b"] = bonusC[btype]["b"] + count |
505 | bonusC[btype]["c"] = bonusC[btype]["c"] - count | 502 | bonusC[btype]["c"] = bonusC[btype]["c"] - count |
506 | 503 | ||
@@ -571,8 +568,6 @@ function _M.endBonusBattleRpc(agent, data) | @@ -571,8 +568,6 @@ function _M.endBonusBattleRpc(agent, data) | ||
571 | role:checkTaskEnter("BonusPass", {id = id}) | 568 | role:checkTaskEnter("BonusPass", {id = id}) |
572 | end | 569 | end |
573 | 570 | ||
574 | - role:log("hang_action", {desc = "bonusBattle", short1 = msg.starNum > 0 and 1 or 0, int1 = id}) | ||
575 | - | ||
576 | SendPacket(actionCodes.Hang_endBonusBattleRpc, MsgPack.pack({ | 571 | SendPacket(actionCodes.Hang_endBonusBattleRpc, MsgPack.pack({ |
577 | starNum = starNum, | 572 | starNum = starNum, |
578 | reward = reward, | 573 | reward = reward, |
@@ -593,7 +588,6 @@ function _M.hangGiftRpc(agent, data) | @@ -593,7 +588,6 @@ function _M.hangGiftRpc(agent, data) | ||
593 | if hangGift[id] then return 2 end | 588 | if hangGift[id] then return 2 end |
594 | 589 | ||
595 | local reward, change = role:award(carbonData.item_clear_special, {log = {desc = "hangGift", int1 = id}}) | 590 | local reward, change = role:award(carbonData.item_clear_special, {log = {desc = "hangGift", int1 = id}}) |
596 | - role:log("hang_action", {desc = "hangGift", int1 = id}) | ||
597 | 591 | ||
598 | role:changeUpdates({{type = "hangGift", field = id, value = 1}}) | 592 | role:changeUpdates({{type = "hangGift", field = id, value = 1}}) |
599 | 593 |
src/actions/HeroAction.lua
@@ -25,7 +25,7 @@ local function getChangeAttrJson(oldAttr, newAttr) | @@ -25,7 +25,7 @@ local function getChangeAttrJson(oldAttr, newAttr) | ||
25 | change[k] = nil | 25 | change[k] = nil |
26 | end | 26 | end |
27 | end | 27 | end |
28 | - return json.encode(change) | 28 | + return change |
29 | end | 29 | end |
30 | 30 | ||
31 | function _M.levelUpRpc( agent, data ) | 31 | function _M.levelUpRpc( agent, data ) |
@@ -47,7 +47,7 @@ function _M.levelUpRpc( agent, data ) | @@ -47,7 +47,7 @@ function _M.levelUpRpc( agent, data ) | ||
47 | 47 | ||
48 | role:log("hero_upgrade", { | 48 | role:log("hero_upgrade", { |
49 | hero_id = hero:getProperty("type"), --英雄ID | 49 | hero_id = hero:getProperty("type"), --英雄ID |
50 | - hero_upgrade_cost = json.encode(cost), -- 英雄升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | 50 | + hero_upgrade_cost = cost, -- 英雄升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} |
51 | hero_upgrade_result = getChangeAttrJson(oldAttr, hero:getTotalAttrs()), -- 英雄升级效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} | 51 | hero_upgrade_result = getChangeAttrJson(oldAttr, hero:getTotalAttrs()), -- 英雄升级效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} |
52 | hero_upgrade_type = 0, -- 英雄升级方式,连续升级:1,单击升级:0 | 52 | hero_upgrade_type = 0, -- 英雄升级方式,连续升级:1,单击升级:0 |
53 | hero_upgrade_score = hero:getProperty("battleV"), -- 英雄升级后评分 | 53 | hero_upgrade_score = hero:getProperty("battleV"), -- 英雄升级后评分 |
@@ -80,7 +80,7 @@ function _M.breakRpc( agent, data ) | @@ -80,7 +80,7 @@ function _M.breakRpc( agent, data ) | ||
80 | 80 | ||
81 | role:log("hero_break", { | 81 | role:log("hero_break", { |
82 | hero_id = hero:getProperty("type"), --英雄ID | 82 | hero_id = hero:getProperty("type"), --英雄ID |
83 | - hero_break_cost = json.encode(cost), -- 英雄突破消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | 83 | + hero_break_cost = cost, -- 英雄突破消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} |
84 | hero_break_result = getChangeAttrJson(oldAttr, hero:getTotalAttrs()), -- 英雄突破效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} | 84 | hero_break_result = getChangeAttrJson(oldAttr, hero:getTotalAttrs()), -- 英雄突破效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} |
85 | hero_break_level = hero:getMaxLevel(), -- 英雄突破后等级上限 | 85 | hero_break_level = hero:getMaxLevel(), -- 英雄突破后等级上限 |
86 | }) | 86 | }) |
@@ -117,7 +117,7 @@ function _M.wakeRpc(agent, data) | @@ -117,7 +117,7 @@ function _M.wakeRpc(agent, data) | ||
117 | 117 | ||
118 | role:log("hero_rise", { | 118 | role:log("hero_rise", { |
119 | hero_id = typ, --英雄ID | 119 | hero_id = typ, --英雄ID |
120 | - hero_rise_cost = json.encode(cost), --英雄觉醒消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | 120 | + hero_rise_cost = cost, --英雄觉醒消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} |
121 | hero_rise_score = hero:getProperty("battleV"), --英雄觉醒后评分提升 | 121 | hero_rise_score = hero:getProperty("battleV"), --英雄觉醒后评分提升 |
122 | hero_rise_result = getChangeAttrJson(oldAttr, hero:getTotalAttrs()), --英雄觉醒效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} | 122 | hero_rise_result = getChangeAttrJson(oldAttr, hero:getTotalAttrs()), --英雄觉醒效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} |
123 | }) | 123 | }) |
@@ -195,7 +195,7 @@ function _M.talentRpc(agent, data) | @@ -195,7 +195,7 @@ function _M.talentRpc(agent, data) | ||
195 | 195 | ||
196 | role:log("hero_talent", { | 196 | role:log("hero_talent", { |
197 | hero_id = hero:getProperty("type"), --英雄ID | 197 | hero_id = hero:getProperty("type"), --英雄ID |
198 | - hero_talent_cost = json.encode(cost), -- 英雄天赋升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | 198 | + hero_talent_cost = cost, -- 英雄天赋升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} |
199 | hero_talent_levelbef = oldSkillLv, -- 英雄技能升级前等级 | 199 | hero_talent_levelbef = oldSkillLv, -- 英雄技能升级前等级 |
200 | hero_talent_level = hero:getSkillLevel(1), -- 英雄技能升级后等级 | 200 | hero_talent_level = hero:getSkillLevel(1), -- 英雄技能升级后等级 |
201 | }) | 201 | }) |
@@ -683,7 +683,7 @@ function _M.getResetRewardRpc(agent, data) | @@ -683,7 +683,7 @@ function _M.getResetRewardRpc(agent, data) | ||
683 | 683 | ||
684 | role:log("hero_recycle", { | 684 | role:log("hero_recycle", { |
685 | hero_recycle_list = hero:getProperty("type"), -- 回收的英雄id列表,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | 685 | hero_recycle_list = hero:getProperty("type"), -- 回收的英雄id列表,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
686 | - hero_recycle_reward = json.encode(reward), -- 回收后获得的奖励,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | 686 | + hero_recycle_reward = reward, -- 回收后获得的奖励,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
687 | hero_recycle_cnt = 1, -- 总回收英雄量 | 687 | hero_recycle_cnt = 1, -- 总回收英雄量 |
688 | }) | 688 | }) |
689 | SendPacket(actionCodes.Hero_getResetRewardRpc, MsgPack.pack(role:packReward(reward, change))) | 689 | SendPacket(actionCodes.Hero_getResetRewardRpc, MsgPack.pack(role:packReward(reward, change))) |
@@ -862,8 +862,8 @@ function _M.drawHeroRpc(agent, data) | @@ -862,8 +862,8 @@ function _M.drawHeroRpc(agent, data) | ||
862 | gacha_type = btype, -- 卡池类型 | 862 | gacha_type = btype, -- 卡池类型 |
863 | gacha_up = 0, -- 卡池UP角色 | 863 | gacha_up = 0, -- 卡池UP角色 |
864 | gacha_times = drawCount[drawType], -- 抽卡次数 | 864 | gacha_times = drawCount[drawType], -- 抽卡次数 |
865 | - gacha_reward = json.encode(reward), -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | ||
866 | - currency = json.encode(cost), -- 购买道具消耗的货币 | 865 | + gacha_reward = reward, -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
866 | + currency = cost, -- 购买道具消耗的货币 | ||
867 | }) | 867 | }) |
868 | SendPacket(actionCodes.Hero_drawHeroRpc, MsgPack.pack({reward = reward})) -- 这个 reward 是数组 | 868 | SendPacket(actionCodes.Hero_drawHeroRpc, MsgPack.pack({reward = reward})) -- 这个 reward 是数组 |
869 | return true | 869 | return true |
src/actions/PvpAction.lua
@@ -287,7 +287,7 @@ function _M.startBattleRpc(agent, data) | @@ -287,7 +287,7 @@ function _M.startBattleRpc(agent, data) | ||
287 | if pvpFree >= globalCsv.pvp_battle_free_count then | 287 | if pvpFree >= globalCsv.pvp_battle_free_count then |
288 | local cost = {[ItemId.PvpKey] = 1} | 288 | local cost = {[ItemId.PvpKey] = 1} |
289 | if not role:checkItemEnough(cost) then return 5 end | 289 | if not role:checkItemEnough(cost) then return 5 end |
290 | - role:costItems(cost, {log = {desc = "startPvp", short1 = 1}}) | 290 | + role:costItems(cost, {log = {desc = "startPvp", int1 = 1}}) |
291 | else | 291 | else |
292 | role.dailyData:updateProperty({field = "pvpFree", delta = 1}) | 292 | role.dailyData:updateProperty({field = "pvpFree", delta = 1}) |
293 | end | 293 | end |
@@ -296,9 +296,6 @@ function _M.startBattleRpc(agent, data) | @@ -296,9 +296,6 @@ function _M.startBattleRpc(agent, data) | ||
296 | _pvpStartBattleCacheC = {idx = idx, key = key, revenge = revenge} | 296 | _pvpStartBattleCacheC = {idx = idx, key = key, revenge = revenge} |
297 | 297 | ||
298 | role:checkTaskEnter("PvpBattle") | 298 | role:checkTaskEnter("PvpBattle") |
299 | - | ||
300 | - | ||
301 | - role:log("pvp_action", {desc = "startBattle", short1 = 1, int1 = revenge and 1 or 0}) | ||
302 | end | 299 | end |
303 | 300 | ||
304 | SendPacket(actionCodes.Pvp_startBattleRpc, MsgPack.pack({matchInfo = matchInfo, key = key, result = result, wait = wait})) | 301 | SendPacket(actionCodes.Pvp_startBattleRpc, MsgPack.pack({matchInfo = matchInfo, key = key, result = result, wait = wait})) |
@@ -391,8 +388,6 @@ function _M.endBattleRpc(agent, data) | @@ -391,8 +388,6 @@ function _M.endBattleRpc(agent, data) | ||
391 | if isWin then | 388 | if isWin then |
392 | role:checkTaskEnter("PvpWin", {score = myScore}) | 389 | role:checkTaskEnter("PvpWin", {score = myScore}) |
393 | end | 390 | end |
394 | - | ||
395 | - role:log("pvp_action", {desc = "battleEnd", short1 = 1, int1 = isWin and 1 or 0, int2 = revenge and 1 or 0}) | ||
396 | 391 | ||
397 | SendPacket(actionCodes.Pvp_endBattleRpc, MsgPack.pack({ | 392 | SendPacket(actionCodes.Pvp_endBattleRpc, MsgPack.pack({ |
398 | reward = reward, | 393 | reward = reward, |
@@ -494,7 +489,7 @@ function _M.startBattleHRpc(agent, data) | @@ -494,7 +489,7 @@ function _M.startBattleHRpc(agent, data) | ||
494 | if pvpFreeH >= globalCsv.pvp_battle_free_count_high then | 489 | if pvpFreeH >= globalCsv.pvp_battle_free_count_high then |
495 | local cost = {[ItemId.PvpKey] = globalCsv.pvp_battle_high_cost} | 490 | local cost = {[ItemId.PvpKey] = globalCsv.pvp_battle_high_cost} |
496 | if not role:checkItemEnough(cost) then return 5 end | 491 | if not role:checkItemEnough(cost) then return 5 end |
497 | - role:costItems(cost, {log = {desc = "startPvp", short1 = 2}}) | 492 | + role:costItems(cost, {log = {desc = "startPvp", int1 = 2}}) |
498 | else | 493 | else |
499 | role.dailyData:updateProperty({field = "pvpFreeH", delta = 1}) | 494 | role.dailyData:updateProperty({field = "pvpFreeH", delta = 1}) |
500 | end | 495 | end |
@@ -520,8 +515,6 @@ function _M.startBattleHRpc(agent, data) | @@ -520,8 +515,6 @@ function _M.startBattleHRpc(agent, data) | ||
520 | 515 | ||
521 | role:checkTaskEnter("PvpBattle") | 516 | role:checkTaskEnter("PvpBattle") |
522 | 517 | ||
523 | - role:log("pvp_action", {desc = "startBattle", short1 = 2, int1 = revenge and 1 or 0}) | ||
524 | - | ||
525 | end | 518 | end |
526 | 519 | ||
527 | SendPacket(actionCodes.Pvp_startBattleHRpc, MsgPack.pack({ | 520 | SendPacket(actionCodes.Pvp_startBattleHRpc, MsgPack.pack({ |
@@ -693,7 +686,6 @@ function _M.endBattleHRpc(agent, data) | @@ -693,7 +686,6 @@ function _M.endBattleHRpc(agent, data) | ||
693 | if isWin then | 686 | if isWin then |
694 | role:checkTaskEnter("PvpWin", {score = myScore}) | 687 | role:checkTaskEnter("PvpWin", {score = myScore}) |
695 | end | 688 | end |
696 | - role:log("pvp_action", {desc = "battleEnd", short1 = 2, int1 = isWin and 1 or 0, int2 = revenge and 1 or 0}) | ||
697 | 689 | ||
698 | SendPacket(actionCodes.Pvp_endBattleHRpc, MsgPack.pack({ | 690 | SendPacket(actionCodes.Pvp_endBattleHRpc, MsgPack.pack({ |
699 | reward = reward, | 691 | reward = reward, |
@@ -842,7 +834,6 @@ function _M.highDivisionGiftRpc(agent, data) | @@ -842,7 +834,6 @@ function _M.highDivisionGiftRpc(agent, data) | ||
842 | }) | 834 | }) |
843 | 835 | ||
844 | local reward, change = role:award(newReward, {log = {desc = "pvpDivisionH"}}) | 836 | local reward, change = role:award(newReward, {log = {desc = "pvpDivisionH"}}) |
845 | - role:log("pvp_action", {desc = "pvpDivisionH"}) | ||
846 | 837 | ||
847 | SendPacket(actionCodes.Pvp_highDivisionGiftRpc, MsgPack.pack(role:packReward(reward, change))) | 838 | SendPacket(actionCodes.Pvp_highDivisionGiftRpc, MsgPack.pack(role:packReward(reward, change))) |
848 | return true | 839 | return true |
@@ -877,8 +868,6 @@ function _M.shopBuyRpc(agent, data) | @@ -877,8 +868,6 @@ function _M.shopBuyRpc(agent, data) | ||
877 | end | 868 | end |
878 | local reward, change = role:award(gift, {log = {desc = "pvpShop", int1 = id, int2 = count}}) | 869 | local reward, change = role:award(gift, {log = {desc = "pvpShop", int1 = id, int2 = count}}) |
879 | 870 | ||
880 | - role:log("pvp_action", {desc = "pvpShop", int1 = id, int2 = count}) | ||
881 | - | ||
882 | SendPacket(actionCodes.Pvp_shopBuyRpc, MsgPack.pack(role:packReward(reward, change))) | 871 | SendPacket(actionCodes.Pvp_shopBuyRpc, MsgPack.pack(role:packReward(reward, change))) |
883 | return true | 872 | return true |
884 | end | 873 | end |
@@ -970,7 +959,6 @@ function _M.crossBetRpc(agent, data) | @@ -970,7 +959,6 @@ function _M.crossBetRpc(agent, data) | ||
970 | local result, code = role:setCrossServerPvpBet(msg.idx) | 959 | local result, code = role:setCrossServerPvpBet(msg.idx) |
971 | if not result then return 10 + code end | 960 | if not result then return 10 + code end |
972 | 961 | ||
973 | - role:log("pvp_action", {desc = "crossBet"}) | ||
974 | SendPacket(actionCodes.Pvp_crossBetRpc, MsgPack.pack(result)) | 962 | SendPacket(actionCodes.Pvp_crossBetRpc, MsgPack.pack(result)) |
975 | return true | 963 | return true |
976 | end | 964 | end |
src/actions/RoleAction.lua
@@ -586,7 +586,7 @@ function _M.openTimeBoxRpc(agent, data) | @@ -586,7 +586,7 @@ function _M.openTimeBoxRpc(agent, data) | ||
586 | carriage_dismantle_type = quick and 1 or 0, -- 拆解方式,时间到期:0,钥匙开启:1 | 586 | carriage_dismantle_type = quick and 1 or 0, -- 拆解方式,时间到期:0,钥匙开启:1 |
587 | carriage_dismantle_time = costTime, -- 拆解耗时,填写实际耗时 | 587 | carriage_dismantle_time = costTime, -- 拆解耗时,填写实际耗时 |
588 | carriage_dismantle_cost = costKey, -- 拆解花费钥匙数量,未使用填写0 | 588 | carriage_dismantle_cost = costKey, -- 拆解花费钥匙数量,未使用填写0 |
589 | - carriage_dismantle_rwd = json.encode(reward), -- 拆解获得物资,json格式记录,{'itemid1':2,'itemid2':3,…………..} | 589 | + carriage_dismantle_rwd = reward, -- 拆解获得物资,json格式记录,{'itemid1':2,'itemid2':3,…………..} |
590 | }) | 590 | }) |
591 | else | 591 | else |
592 | return | 592 | return |
@@ -681,7 +681,7 @@ function _M.storyBookRewardRpc(agent, data) | @@ -681,7 +681,7 @@ function _M.storyBookRewardRpc(agent, data) | ||
681 | carriage_video_id = storyId, --放映室片段ID | 681 | carriage_video_id = storyId, --放映室片段ID |
682 | carriage_video_coinid = reward[ItemId.Gold] and ItemId.Gold or 0, --放映奖励货币类型,无奖励则填写0 | 682 | carriage_video_coinid = reward[ItemId.Gold] and ItemId.Gold or 0, --放映奖励货币类型,无奖励则填写0 |
683 | carriage_video_coinnum = reward[ItemId.Gold] or 0, --放映奖励货币数量,无奖励则填写0 | 683 | carriage_video_coinnum = reward[ItemId.Gold] or 0, --放映奖励货币数量,无奖励则填写0 |
684 | - carriage_video_item = json.encode(reward), --放映奖励其他物品数量,json格式记录,{'itemid1':10,'itemid2':5,…………..},无奖励则填写0 | 684 | + carriage_video_item = reward, --放映奖励其他物品数量,json格式记录,{'itemid1':10,'itemid2':5,…………..},无奖励则填写0 |
685 | }) | 685 | }) |
686 | 686 | ||
687 | SendPacket(actionCodes.Role_storyBookRewardRpc, MsgPack.pack(role:packReward(reward, change))) | 687 | SendPacket(actionCodes.Role_storyBookRewardRpc, MsgPack.pack(role:packReward(reward, change))) |
@@ -749,7 +749,7 @@ function _M.taskRpc(agent, data) | @@ -749,7 +749,7 @@ function _M.taskRpc(agent, data) | ||
749 | role:log("task_reward", { | 749 | role:log("task_reward", { |
750 | task_reward_id = taskId, --任务奖励ID | 750 | task_reward_id = taskId, --任务奖励ID |
751 | task_reward_type = taskType, --任务奖励类型,见 任务奖励类型枚举表 | 751 | task_reward_type = taskType, --任务奖励类型,见 任务奖励类型枚举表 |
752 | - task_reward_detail = json.encode(reward), --任务奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} | 752 | + task_reward_detail = reward, --任务奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} |
753 | }) | 753 | }) |
754 | 754 | ||
755 | SendPacket(actionCodes.Role_taskRpc, MsgPack.pack(role:packReward(reward, change))) | 755 | SendPacket(actionCodes.Role_taskRpc, MsgPack.pack(role:packReward(reward, change))) |
@@ -844,7 +844,7 @@ function _M.achiveRpc(agent, data) | @@ -844,7 +844,7 @@ function _M.achiveRpc(agent, data) | ||
844 | role:log("achievement", { | 844 | role:log("achievement", { |
845 | achievement_id = taskId, -- 成就id | 845 | achievement_id = taskId, -- 成就id |
846 | achievement_type = achiveTask.type, -- 成就类型,具体枚举表中成就类型枚举表 | 846 | achievement_type = achiveTask.type, -- 成就类型,具体枚举表中成就类型枚举表 |
847 | - achievement_reward = json.encode(reward), -- 达成成就奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} | 847 | + achievement_reward = reward, -- 达成成就奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} |
848 | }) | 848 | }) |
849 | 849 | ||
850 | SendPacket(actionCodes.Role_achiveRpc, MsgPack.pack(role:packReward(reward, change))) | 850 | SendPacket(actionCodes.Role_achiveRpc, MsgPack.pack(role:packReward(reward, change))) |
@@ -1000,8 +1000,6 @@ function _M.changeSettingRpc(agent, data) | @@ -1000,8 +1000,6 @@ function _M.changeSettingRpc(agent, data) | ||
1000 | setting[id] = status | 1000 | setting[id] = status |
1001 | role:updateProperty({field = "setting", value = setting}) | 1001 | role:updateProperty({field = "setting", value = setting}) |
1002 | 1002 | ||
1003 | - role:log("role_action", {desc = "changeSetting", int1 = id, int2 = status}) | ||
1004 | - | ||
1005 | SendPacket(actionCodes.Role_changeSettingRpc, '') | 1003 | SendPacket(actionCodes.Role_changeSettingRpc, '') |
1006 | return true | 1004 | return true |
1007 | end | 1005 | end |
@@ -1035,7 +1033,7 @@ function _M.drawCodeRpc(agent, data) | @@ -1035,7 +1033,7 @@ function _M.drawCodeRpc(agent, data) | ||
1035 | role:log("get_gift", { | 1033 | role:log("get_gift", { |
1036 | gift_id = giftId, -- 礼包ID | 1034 | gift_id = giftId, -- 礼包ID |
1037 | gift_key = code, -- 礼包key | 1035 | gift_key = code, -- 礼包key |
1038 | - gift_reward = json.encode(reward), -- 礼包奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} | 1036 | + gift_reward = reward, -- 礼包奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} |
1039 | gift_name = "", -- 礼包名称 | 1037 | gift_name = "", -- 礼包名称 |
1040 | gift_reason = 0, -- 礼包发放原因,见发放原因枚举表 | 1038 | gift_reason = 0, -- 礼包发放原因,见发放原因枚举表 |
1041 | }) | 1039 | }) |
src/actions/TowerAction.lua
@@ -76,8 +76,6 @@ function _M.startBattleRpc(agent, data) | @@ -76,8 +76,6 @@ function _M.startBattleRpc(agent, data) | ||
76 | role:updateProperty({field = "towerInfo", value = towerInfo}) | 76 | role:updateProperty({field = "towerInfo", value = towerInfo}) |
77 | role:checkTaskEnter("TowerBattle", {level = towerInfo.l}) | 77 | role:checkTaskEnter("TowerBattle", {level = towerInfo.l}) |
78 | 78 | ||
79 | - role:log("tower_action", {desc = "startBattle", int1 = id}) | ||
80 | - | ||
81 | SendPacket(actionCodes.Tower_startBattleRpc, '') | 79 | SendPacket(actionCodes.Tower_startBattleRpc, '') |
82 | return true | 80 | return true |
83 | end | 81 | end |
@@ -116,8 +114,6 @@ function _M.endBattleRpc(agent, data) | @@ -116,8 +114,6 @@ function _M.endBattleRpc(agent, data) | ||
116 | towerInfo.k = nil | 114 | towerInfo.k = nil |
117 | role:updateProperty({field = "towerInfo", value = towerInfo}) | 115 | role:updateProperty({field = "towerInfo", value = towerInfo}) |
118 | 116 | ||
119 | - role:log("tower_action", {desc = "endBattle", short1 = msg.starNum > 0 and 1 or 0, int1 = id}) | ||
120 | - | ||
121 | SendPacket(actionCodes.Tower_endBattleRpc, MsgPack.pack({reward = reward, change = change})) | 117 | SendPacket(actionCodes.Tower_endBattleRpc, MsgPack.pack({reward = reward, change = change})) |
122 | return true | 118 | return true |
123 | end | 119 | end |
@@ -140,7 +136,6 @@ function _M.bugCountRpc(agent, data) | @@ -140,7 +136,6 @@ function _M.bugCountRpc(agent, data) | ||
140 | towerInfo.c = curCount | 136 | towerInfo.c = curCount |
141 | towerInfo.t = nextTime | 137 | towerInfo.t = nextTime |
142 | role:updateProperty({field = "towerInfo", value = towerInfo}) | 138 | role:updateProperty({field = "towerInfo", value = towerInfo}) |
143 | - role:log("tower_action", {desc = "bugCount"}) | ||
144 | 139 | ||
145 | SendPacket(actionCodes.Tower_bugCountRpc, '') | 140 | SendPacket(actionCodes.Tower_bugCountRpc, '') |
146 | return true | 141 | return true |
src/adv/Adv.lua
@@ -24,17 +24,6 @@ function Adv:ctor(owner) | @@ -24,17 +24,6 @@ function Adv:ctor(owner) | ||
24 | self:initByInfo(self.owner:getProperty("advInfo")) | 24 | self:initByInfo(self.owner:getProperty("advInfo")) |
25 | end | 25 | end |
26 | 26 | ||
27 | -function Adv:log(contents) | ||
28 | - contents = contents or {} | ||
29 | - if contents["cint1"] or contents["cint2"] or contents["cint3"] then | ||
30 | - print("advLog error log have cint1 or cint2 or cint3 ", debug.traceback()) | ||
31 | - end | ||
32 | - contents["cint1"] = self.chapterId | ||
33 | - contents["cint2"] = self.level | ||
34 | - | ||
35 | - self.owner:log("adv_action", contents) | ||
36 | -end | ||
37 | - | ||
38 | --初始化adv 信息 | 27 | --初始化adv 信息 |
39 | function Adv:initByInfo(advInfo) | 28 | function Adv:initByInfo(advInfo) |
40 | if not next(advInfo) then return end --还没有 开始新地图 | 29 | if not next(advInfo) then return end --还没有 开始新地图 |
@@ -509,18 +498,18 @@ function Adv:awardArtifact(id, params) | @@ -509,18 +498,18 @@ function Adv:awardArtifact(id, params) | ||
509 | self:checkAchievement(Adv.AchievType.GetMWeapon, 1, id) | 498 | self:checkAchievement(Adv.AchievType.GetMWeapon, 1, id) |
510 | 499 | ||
511 | 500 | ||
512 | - if params.log then | ||
513 | - local log = clone(params.log) | ||
514 | - if log["cint1"] or log["cint2"] or log["cint3"] then | ||
515 | - print("awardArtifact error log have cint1 or cint2 or cint3 ", debug.traceback()) | ||
516 | - end | ||
517 | - log["cint1"] = self.chapterId | ||
518 | - log["cint2"] = self.level | ||
519 | - log["cint3"] = id | ||
520 | - self.owner:log("in_artifact", log) | ||
521 | - else | ||
522 | - print("awardArtifact no log ", debug.traceback()) | ||
523 | - end | 501 | + -- if params.log then |
502 | + -- local log = clone(params.log) | ||
503 | + -- if log["cint1"] or log["cint2"] or log["cint3"] then | ||
504 | + -- print("awardArtifact error log have cint1 or cint2 or cint3 ", debug.traceback()) | ||
505 | + -- end | ||
506 | + -- log["cint1"] = self.chapterId | ||
507 | + -- log["cint2"] = self.level | ||
508 | + -- log["cint3"] = id | ||
509 | + -- self.owner:log("in_artifact", log) | ||
510 | + -- else | ||
511 | + -- print("awardArtifact no log ", debug.traceback()) | ||
512 | + -- end | ||
524 | if not params.isChoose then | 513 | if not params.isChoose then |
525 | self:pushBackEvent(AdvBackEventType.Artifact, {id = id}) | 514 | self:pushBackEvent(AdvBackEventType.Artifact, {id = id}) |
526 | end | 515 | end |
@@ -609,7 +598,6 @@ function Adv:wearArtifact(slot, id) | @@ -609,7 +598,6 @@ function Adv:wearArtifact(slot, id) | ||
609 | else | 598 | else |
610 | id = nil | 599 | id = nil |
611 | end | 600 | end |
612 | - self:log({desc = "wearArtifact", int1 = id}) | ||
613 | 601 | ||
614 | self.owner:changeUpdates({{type = "advAFWear", field = slot, value = id}}) | 602 | self.owner:changeUpdates({{type = "advAFWear", field = slot, value = id}}) |
615 | return true | 603 | return true |
@@ -668,9 +656,6 @@ function Adv:artifactLevelUp(id, level) | @@ -668,9 +656,6 @@ function Adv:artifactLevelUp(id, level) | ||
668 | end | 656 | end |
669 | if newLv == advAFGet[id] then return end | 657 | if newLv == advAFGet[id] then return end |
670 | 658 | ||
671 | - self:log({desc = "artifactLevelUp", int1 = id, int2 = level}) | ||
672 | - | ||
673 | - | ||
674 | local status = 0 | 659 | local status = 0 |
675 | if curWear[id] then -- 穿着呢 | 660 | if curWear[id] then -- 穿着呢 |
676 | local oldData = csvdb["adv_artifactCsv"][id][advAFGet[id]] | 661 | local oldData = csvdb["adv_artifactCsv"][id][advAFGet[id]] |
@@ -715,8 +700,6 @@ function Adv:chooseArtifact(index) | @@ -715,8 +700,6 @@ function Adv:chooseArtifact(index) | ||
715 | if not self.waitArtifact or not self.waitArtifact[index] then return end | 700 | if not self.waitArtifact or not self.waitArtifact[index] then return end |
716 | self:award({[self.waitArtifact[index]] = 1}, {log = {desc = "chooseArtifact"}, isChoose = true}) | 701 | self:award({[self.waitArtifact[index]] = 1}, {log = {desc = "chooseArtifact"}, isChoose = true}) |
717 | 702 | ||
718 | - self:log({desc = "chooseArtifact", int1 = self.waitArtifact[index]}) | ||
719 | - | ||
720 | self.waitArtifact = nil | 703 | self.waitArtifact = nil |
721 | 704 | ||
722 | -- 支援效果继续选择 | 705 | -- 支援效果继续选择 |
@@ -809,8 +792,6 @@ function Adv:over(success, rewardRatio, overType) | @@ -809,8 +792,6 @@ function Adv:over(success, rewardRatio, overType) | ||
809 | end | 792 | end |
810 | self:clearAdvUnlockCache() | 793 | self:clearAdvUnlockCache() |
811 | 794 | ||
812 | - self:log({desc = "over", short1 = success and 1 or 0, int1 = overType}) | ||
813 | - | ||
814 | local chapterId = self.chapterId | 795 | local chapterId = self.chapterId |
815 | self:clear() | 796 | self:clear() |
816 | self.owner:checkTaskEnter("AdvScore", {score = score}) | 797 | self.owner:checkTaskEnter("AdvScore", {score = score}) |
@@ -911,23 +892,23 @@ function Adv:award(gift, params) | @@ -911,23 +892,23 @@ function Adv:award(gift, params) | ||
911 | items = items:setv(itemId, nums) | 892 | items = items:setv(itemId, nums) |
912 | end | 893 | end |
913 | 894 | ||
914 | - if params.log then | ||
915 | - local log = clone(params.log) | ||
916 | - if log["cint1"] or log["cint2"] or log["cint3"] or log["long1"] then | ||
917 | - print("addAdvItem error log have cint1 or cint2 or cint3 ", debug.traceback()) | ||
918 | - end | ||
919 | - log["cint1"] = itemId | ||
920 | - log["cint2"] = math.abs(count) | ||
921 | - log["cint3"] = self.chapterId | ||
922 | - log["long1"] = self.level | ||
923 | - if count >= 0 then | ||
924 | - self.owner:log("in_adv", log) | ||
925 | - else | ||
926 | - self.owner:log("out_adv", log) | ||
927 | - end | ||
928 | - else | ||
929 | - print("addAdvItem no log ", debug.traceback()) | ||
930 | - end | 895 | + -- if params.log then |
896 | + -- local log = clone(params.log) | ||
897 | + -- if log["cint1"] or log["cint2"] or log["cint3"] or log["long1"] then | ||
898 | + -- print("addAdvItem error log have cint1 or cint2 or cint3 ", debug.traceback()) | ||
899 | + -- end | ||
900 | + -- log["cint1"] = itemId | ||
901 | + -- log["cint2"] = math.abs(count) | ||
902 | + -- log["cint3"] = self.chapterId | ||
903 | + -- log["long1"] = self.level | ||
904 | + -- if count >= 0 then | ||
905 | + -- self.owner:log("in_adv", log) | ||
906 | + -- else | ||
907 | + -- self.owner:log("out_adv", log) | ||
908 | + -- end | ||
909 | + -- else | ||
910 | + -- print("addAdvItem no log ", debug.traceback()) | ||
911 | + -- end | ||
931 | end | 912 | end |
932 | end | 913 | end |
933 | if items ~= oldItems then | 914 | if items ~= oldItems then |
@@ -1021,7 +1002,6 @@ local function clickOut(self, room, block, params, isExit) | @@ -1021,7 +1002,6 @@ local function clickOut(self, room, block, params, isExit) | ||
1021 | isRelay = true, | 1002 | isRelay = true, |
1022 | }) | 1003 | }) |
1023 | else | 1004 | else |
1024 | - self:log({desc = "pass"}) | ||
1025 | self:initByChapter({ | 1005 | self:initByChapter({ |
1026 | chapterId = self.chapterId, | 1006 | chapterId = self.chapterId, |
1027 | level = self.level + 1, | 1007 | level = self.level + 1, |
src/models/Activity.lua
@@ -219,7 +219,7 @@ function Activity:checkWeeklyAct(actType, notify, count, pool) | @@ -219,7 +219,7 @@ function Activity:checkWeeklyAct(actType, notify, count, pool) | ||
219 | self.owner:log("activity", { | 219 | self.owner:log("activity", { |
220 | activity_id = cfg.id, -- 活动ID(或活动指定任务的ID) | 220 | activity_id = cfg.id, -- 活动ID(或活动指定任务的ID) |
221 | activity_type = actType, -- 活动类型,见活动类型枚举表 | 221 | activity_type = actType, -- 活动类型,见活动类型枚举表 |
222 | - activity_reward = json.encode(cfg.reward:toNumMap()), -- 活动奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} | 222 | + activity_reward = cfg.reward:toNumMap(), -- 活动奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} |
223 | }) | 223 | }) |
224 | 224 | ||
225 | self.owner:sendMail(info.mailId, nil, cfg.reward, {cfg.condition1}) | 225 | self.owner:sendMail(info.mailId, nil, cfg.reward, {cfg.condition1}) |
src/models/RoleLog.lua
@@ -123,7 +123,7 @@ local MethodType = { | @@ -123,7 +123,7 @@ local MethodType = { | ||
123 | level_before = true, -- 变动前的等级,可以跳级 | 123 | level_before = true, -- 变动前的等级,可以跳级 |
124 | level_changemain = true, -- 等级变动原因,副本通关:mission,领取奖励:reward | 124 | level_changemain = true, -- 等级变动原因,副本通关:mission,领取奖励:reward |
125 | level_changedetail = true, -- 等级变动原因明细,副本通关则记录关卡ID,领取奖励则记录奖励ID | 125 | level_changedetail = true, -- 等级变动原因明细,副本通关则记录关卡ID,领取奖励则记录奖励ID |
126 | - level_reward = true, -- 等级变动奖励,json格式记录,{道具ID1:道具数量,道具ID2:道具数量} | 126 | + level_reward = "json", -- 等级变动奖励,json格式记录,{道具ID1:道具数量,道具ID2:道具数量} |
127 | }, | 127 | }, |
128 | onGuidePoint = { --游戏引导 | 128 | onGuidePoint = { --游戏引导 |
129 | guild_type = true, --引导类型,新手引导:0,系统引导:1,弱引导:2 | 129 | guild_type = true, --引导类型,新手引导:0,系统引导:1,弱引导:2 |
@@ -180,7 +180,7 @@ local MethodType = { | @@ -180,7 +180,7 @@ local MethodType = { | ||
180 | mission_enemylist = true, -- 地方英雄ID,排序以玩家出战设置为准,PVP多个队伍则记录多个列表。示例:[[1,2,3],[456]] | 180 | mission_enemylist = true, -- 地方英雄ID,排序以玩家出战设置为准,PVP多个队伍则记录多个列表。示例:[[1,2,3],[456]] |
181 | mission_damage = true, -- 英雄输出值。示例:{'heroid1':1000,'heroid2':2000,………..} | 181 | mission_damage = true, -- 英雄输出值。示例:{'heroid1':1000,'heroid2':2000,………..} |
182 | mission_ultskill = true, -- 大招使用情况。示例:{'heroid1':1000,'heroid2':2000,………..} | 182 | mission_ultskill = true, -- 大招使用情况。示例:{'heroid1':1000,'heroid2':2000,………..} |
183 | - mission_reward = true, -- 获得奖励,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | 183 | + mission_reward = "json", -- 获得奖励,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
184 | mission_starttime = true, -- 战斗开始时间,格式 unixtime 秒级 | 184 | mission_starttime = true, -- 战斗开始时间,格式 unixtime 秒级 |
185 | mission_roundtime = true, -- 对局时长(秒) | 185 | mission_roundtime = true, -- 对局时长(秒) |
186 | mission_result = true, -- 战斗结果(0-无效,1-胜利,2-失败) | 186 | mission_result = true, -- 战斗结果(0-无效,1-胜利,2-失败) |
@@ -191,9 +191,9 @@ local MethodType = { | @@ -191,9 +191,9 @@ local MethodType = { | ||
191 | mission_score = true, -- 本局分数,PVP玩法记录为对战后积分,无得分的填0 | 191 | mission_score = true, -- 本局分数,PVP玩法记录为对战后积分,无得分的填0 |
192 | mission_cleartype = true, -- 1正常通关;2代理拾荒 | 192 | mission_cleartype = true, -- 1正常通关;2代理拾荒 |
193 | mission_rank = true, -- 对战后排名,适用于PVP玩法和电波塔,其他玩法留空 | 193 | mission_rank = true, -- 对战后排名,适用于PVP玩法和电波塔,其他玩法留空 |
194 | - misson_monsterkill = true, -- 击杀怪物ID和数量,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | ||
195 | - misson_teamskill = true, -- 编队支援技能和技能等级情况,json格式记录,{"teamskill1":1,"teamskill2":2,………..} | ||
196 | - misson_teambond = true, -- 编队羁绊和羁绊等级,json格式记录,{"bondid1":1,"bondid2":2,………..} | 194 | + misson_monsterkill = "json", -- 击杀怪物ID和数量,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
195 | + misson_teamskill = "json", -- 编队支援技能和技能等级情况,json格式记录,{"teamskill1":1,"teamskill2":2,………..} | ||
196 | + misson_teambond = "json", -- 编队羁绊和羁绊等级,json格式记录,{"bondid1":1,"bondid2":2,………..} | ||
197 | }, | 197 | }, |
198 | residence_reward = { --玩家挂机或排名奖励 --TODO | 198 | residence_reward = { --玩家挂机或排名奖励 --TODO |
199 | mission_threadid = true, --大关卡ID | 199 | mission_threadid = true, --大关卡ID |
@@ -201,31 +201,31 @@ local MethodType = { | @@ -201,31 +201,31 @@ local MethodType = { | ||
201 | mission_type = true, --关卡类型,见关卡类型枚举表 | 201 | mission_type = true, --关卡类型,见关卡类型枚举表 |
202 | residence_reward_type = true, --领取奖励方式,快速(超前领取)记录为1,正常领取记录为0 | 202 | residence_reward_type = true, --领取奖励方式,快速(超前领取)记录为1,正常领取记录为0 |
203 | residence_time = true, --挂机或排名时长 | 203 | residence_time = true, --挂机或排名时长 |
204 | - residence_reward = true, --获得奖励,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | 204 | + residence_reward = "json", --获得奖励,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
205 | }, | 205 | }, |
206 | hero_rise = { --英雄觉醒 | 206 | hero_rise = { --英雄觉醒 |
207 | hero_id = true, --英雄ID | 207 | hero_id = true, --英雄ID |
208 | - hero_rise_cost = true, --英雄觉醒消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | 208 | + hero_rise_cost = "json", --英雄觉醒消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} |
209 | hero_rise_score = true, --英雄觉醒后评分提升 | 209 | hero_rise_score = true, --英雄觉醒后评分提升 |
210 | - hero_rise_result = true, --英雄觉醒效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} | 210 | + hero_rise_result = "json", --英雄觉醒效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} |
211 | }, | 211 | }, |
212 | hero_upgrade = { --英雄升级 | 212 | hero_upgrade = { --英雄升级 |
213 | hero_id = true, -- 英雄ID | 213 | hero_id = true, -- 英雄ID |
214 | - hero_upgrade_cost = true, -- 英雄升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | ||
215 | - hero_upgrade_result = true, -- 英雄升级效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} | 214 | + hero_upgrade_cost = "json", -- 英雄升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} |
215 | + hero_upgrade_result = "json", -- 英雄升级效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} | ||
216 | hero_upgrade_type = true, -- 英雄升级方式,连续升级:1,单击升级:0 | 216 | hero_upgrade_type = true, -- 英雄升级方式,连续升级:1,单击升级:0 |
217 | hero_upgrade_score = true, -- 英雄升级后评分 | 217 | hero_upgrade_score = true, -- 英雄升级后评分 |
218 | hero_upgrade_scoreget = true, -- 通过英雄升级提升的评分 | 218 | hero_upgrade_scoreget = true, -- 通过英雄升级提升的评分 |
219 | }, | 219 | }, |
220 | hero_break = { --英雄突破 | 220 | hero_break = { --英雄突破 |
221 | hero_id = true, -- 英雄ID | 221 | hero_id = true, -- 英雄ID |
222 | - hero_break_cost = true, -- 英雄突破消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | ||
223 | - hero_break_result = true, -- 英雄突破效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} | 222 | + hero_break_cost = "json", -- 英雄突破消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} |
223 | + hero_break_result = "json", -- 英雄突破效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} | ||
224 | hero_break_level = true, -- 英雄突破后等级上限 | 224 | hero_break_level = true, -- 英雄突破后等级上限 |
225 | }, | 225 | }, |
226 | hero_talent = { --英雄天赋升级 | 226 | hero_talent = { --英雄天赋升级 |
227 | hero_id = true, -- 英雄ID | 227 | hero_id = true, -- 英雄ID |
228 | - hero_talent_cost = true, -- 英雄天赋升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | 228 | + hero_talent_cost = "json", -- 英雄天赋升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} |
229 | hero_talent_levelbef = true, -- 英雄技能升级前等级 | 229 | hero_talent_levelbef = true, -- 英雄技能升级前等级 |
230 | hero_talent_level = true, -- 英雄技能升级后等级 | 230 | hero_talent_level = true, -- 英雄技能升级后等级 |
231 | }, | 231 | }, |
@@ -236,7 +236,7 @@ local MethodType = { | @@ -236,7 +236,7 @@ local MethodType = { | ||
236 | hero_jewel_part = true, -- 铭文装备部位 | 236 | hero_jewel_part = true, -- 铭文装备部位 |
237 | hero_jewel_score = true, -- 铭文装备后的英雄分值 | 237 | hero_jewel_score = true, -- 铭文装备后的英雄分值 |
238 | hero_jewel_scorebefore = true, -- 铭文装备前的英雄分值 | 238 | hero_jewel_scorebefore = true, -- 铭文装备前的英雄分值 |
239 | - hero_jewel_result = true, -- 铭文装备后效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} | 239 | + hero_jewel_result = "json", -- 铭文装备后效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} |
240 | }, | 240 | }, |
241 | hero_note = { --英雄评价 | 241 | hero_note = { --英雄评价 |
242 | hero_id = true, -- 英雄ID | 242 | hero_id = true, -- 英雄ID |
@@ -248,8 +248,8 @@ local MethodType = { | @@ -248,8 +248,8 @@ local MethodType = { | ||
248 | hero_id = true, -- 英雄ID | 248 | hero_id = true, -- 英雄ID |
249 | }, | 249 | }, |
250 | hero_recycle = { --英雄回收 | 250 | hero_recycle = { --英雄回收 |
251 | - hero_recycle_list = true, -- 回收的英雄id列表,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | ||
252 | - hero_recycle_reward = true, -- 回收后获得的奖励,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | 251 | + hero_recycle_list = "json", -- 回收的英雄id列表,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
252 | + hero_recycle_reward = "json", -- 回收后获得的奖励,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | ||
253 | hero_recycle_cnt = true, -- 总回收英雄量 | 253 | hero_recycle_cnt = true, -- 总回收英雄量 |
254 | }, | 254 | }, |
255 | gacha = { --英雄招募 | 255 | gacha = { --英雄招募 |
@@ -257,16 +257,16 @@ local MethodType = { | @@ -257,16 +257,16 @@ local MethodType = { | ||
257 | gacha_type = true, -- 卡池类型 | 257 | gacha_type = true, -- 卡池类型 |
258 | gacha_up = true, -- 卡池UP角色 | 258 | gacha_up = true, -- 卡池UP角色 |
259 | gacha_times = true, -- 抽卡次数 | 259 | gacha_times = true, -- 抽卡次数 |
260 | - gacha_reward = true, -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | ||
261 | - currency = true, -- 消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | 260 | + gacha_reward = "json", -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
261 | + currency = "json", -- 消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | ||
262 | }, | 262 | }, |
263 | equip_wear = { --装备穿戴与卸载 | 263 | equip_wear = { --装备穿戴与卸载 |
264 | hero_id = true, --英雄ID | 264 | hero_id = true, --英雄ID |
265 | equip_id = true, --装备ID | 265 | equip_id = true, --装备ID |
266 | equip_wear_action = true, --装备操作类型:装备:0,卸载:1 | 266 | equip_wear_action = true, --装备操作类型:装备:0,卸载:1 |
267 | equip_wear_part = true, --装备部位,记录部位ID | 267 | equip_wear_part = true, --装备部位,记录部位ID |
268 | - equip_wear_result = true, --装备操作后结果,记录属性变化,json格式记录,{“aa”:1234,"bb":4567} | ||
269 | - equip_wear_change = true, --装备操作变化值,记录属性变化,记录正负值,json格式记录,{“aa”:1234,"bb":-45} | 268 | + equip_wear_result = "json", --装备操作后结果,记录属性变化,json格式记录,{“aa”:1234,"bb":4567} |
269 | + equip_wear_change = "json", --装备操作变化值,记录属性变化,记录正负值,json格式记录,{“aa”:1234,"bb":-45} | ||
270 | equip_wear_mode = true, --用以区分自动装备还是手动装备,自动记录为0,手动记录为1 | 270 | equip_wear_mode = true, --用以区分自动装备还是手动装备,自动记录为0,手动记录为1 |
271 | equip_wear_seqid = "ucode", --自动穿戴时记录的系列ID,用以关联一次性装备时候产生的多条记录 | 271 | equip_wear_seqid = "ucode", --自动穿戴时记录的系列ID,用以关联一次性装备时候产生的多条记录 |
272 | }, | 272 | }, |
@@ -287,7 +287,7 @@ local MethodType = { | @@ -287,7 +287,7 @@ local MethodType = { | ||
287 | carriage_dismantle_type = true, -- 拆解方式,时间到期:0,钥匙开启:1 | 287 | carriage_dismantle_type = true, -- 拆解方式,时间到期:0,钥匙开启:1 |
288 | carriage_dismantle_time = true, -- 拆解耗时,填写实际耗时 | 288 | carriage_dismantle_time = true, -- 拆解耗时,填写实际耗时 |
289 | carriage_dismantle_cost = true, -- 拆解花费钥匙数量,未使用填写0 | 289 | carriage_dismantle_cost = true, -- 拆解花费钥匙数量,未使用填写0 |
290 | - carriage_dismantle_rwd = true, -- 拆解获得物资,json格式记录,{'itemid1':2,'itemid2':3,…………..} | 290 | + carriage_dismantle_rwd = "json", -- 拆解获得物资,json格式记录,{'itemid1':2,'itemid2':3,…………..} |
291 | }, | 291 | }, |
292 | carriage_logistics = { --后勤室 | 292 | carriage_logistics = { --后勤室 |
293 | carriage_logistics_type = true, -- 后勤室制作类型ID,变异:0,通常:1,魔法:2 | 293 | carriage_logistics_type = true, -- 后勤室制作类型ID,变异:0,通常:1,魔法:2 |
@@ -310,24 +310,24 @@ local MethodType = { | @@ -310,24 +310,24 @@ local MethodType = { | ||
310 | carriage_video_id = true, --放映室片段ID | 310 | carriage_video_id = true, --放映室片段ID |
311 | carriage_video_coinid = true, --放映奖励货币类型,无奖励则填写0 | 311 | carriage_video_coinid = true, --放映奖励货币类型,无奖励则填写0 |
312 | carriage_video_coinnum = true, --放映奖励货币数量,无奖励则填写0 | 312 | carriage_video_coinnum = true, --放映奖励货币数量,无奖励则填写0 |
313 | - carriage_video_item = true, --放映奖励其他物品数量,json格式记录,{'itemid1':10,'itemid2':5,…………..},无奖励则填写0 | 313 | + carriage_video_item = "json", --放映奖励其他物品数量,json格式记录,{'itemid1':10,'itemid2':5,…………..},无奖励则填写0 |
314 | }, | 314 | }, |
315 | carriage_cook = { --调理室 | 315 | carriage_cook = { --调理室 |
316 | item_id = true, -- 道具id | 316 | item_id = true, -- 道具id |
317 | item_level = true, -- 道具等级 | 317 | item_level = true, -- 道具等级 |
318 | item_type = true, -- 道具类型,具体见枚举表中道具类型枚举表 | 318 | item_type = true, -- 道具类型,具体见枚举表中道具类型枚举表 |
319 | carriage_cook_amount = true, -- 制作总量 | 319 | carriage_cook_amount = true, -- 制作总量 |
320 | - carriage_cook_cost = true, -- 制作消耗道具,json格式记录,{'itemid1':10,'itemid2':5,…………..} | 320 | + carriage_cook_cost = "json", -- 制作消耗道具,json格式记录,{'itemid1':10,'itemid2':5,…………..} |
321 | }, | 321 | }, |
322 | activity = { --活动或指南奖励 | 322 | activity = { --活动或指南奖励 |
323 | activity_id = true, -- 活动ID(或活动指定任务的ID) | 323 | activity_id = true, -- 活动ID(或活动指定任务的ID) |
324 | activity_type = true, -- 活动类型,见活动类型枚举表 | 324 | activity_type = true, -- 活动类型,见活动类型枚举表 |
325 | - activity_reward = true, -- 活动奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} | 325 | + activity_reward = "json", -- 活动奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} |
326 | }, | 326 | }, |
327 | task_reward = { --任务奖励 | 327 | task_reward = { --任务奖励 |
328 | task_reward_id = true, --任务奖励ID | 328 | task_reward_id = true, --任务奖励ID |
329 | task_reward_type = true, --任务奖励类型,见 任务奖励类型枚举表 | 329 | task_reward_type = true, --任务奖励类型,见 任务奖励类型枚举表 |
330 | - task_reward_detail = true, --任务奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} | 330 | + task_reward_detail = "json", --任务奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} |
331 | }, | 331 | }, |
332 | shop_purchase = { --商店购买行为 | 332 | shop_purchase = { --商店购买行为 |
333 | item_id = true, -- 道具id | 333 | item_id = true, -- 道具id |
@@ -351,14 +351,6 @@ local MethodType = { | @@ -351,14 +351,6 @@ local MethodType = { | ||
351 | friend_roleid = true, -- 好友账户下的角色id | 351 | friend_roleid = true, -- 好友账户下的角色id |
352 | friend_cnt = true, -- 操作后好友数量 | 352 | friend_cnt = true, -- 操作后好友数量 |
353 | }, | 353 | }, |
354 | - friend_list = { --好友列表 --TODO | ||
355 | - friend_accountid = true, --好友账户id | ||
356 | - friend_roleid = true, --好友账户下的角色id | ||
357 | - }, | ||
358 | - friend_black = { --黑名单列表 --TODO | ||
359 | - friend_accountid = true, -- 好友账户id | ||
360 | - friend_roleid = true, -- 好友账户下的角色id | ||
361 | - }, | ||
362 | communication = { --玩家发言 | 354 | communication = { --玩家发言 |
363 | publish_type = true, --发言类型,全部:0,公告:1,世界:2,联盟:3,私聊:4 | 355 | publish_type = true, --发言类型,全部:0,公告:1,世界:2,联盟:3,私聊:4 |
364 | publish_status = true, --发送状态,发送成功:0,发送失败:1,被屏蔽:2,其他:3 | 356 | publish_status = true, --发送状态,发送成功:0,发送失败:1,被屏蔽:2,其他:3 |
@@ -390,28 +382,41 @@ local MethodType = { | @@ -390,28 +382,41 @@ local MethodType = { | ||
390 | restaurant_order = { --订单任务 | 382 | restaurant_order = { --订单任务 |
391 | restaurant_order_id = true, -- 订单任务ID | 383 | restaurant_order_id = true, -- 订单任务ID |
392 | restaurant_order_status = true, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 | 384 | restaurant_order_status = true, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 |
393 | - restaurant_order_rwd = true, -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} | 385 | + restaurant_order_rwd = "json", -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} |
394 | restaurant_order_lv = true, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 | 386 | restaurant_order_lv = true, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 |
395 | }, | 387 | }, |
396 | restaurant_collect = { --餐厅顾客图谱 | 388 | restaurant_collect = { --餐厅顾客图谱 |
397 | restaurant_collect_id = true, -- 图谱收集ID | 389 | restaurant_collect_id = true, -- 图谱收集ID |
398 | - restaurant_collect_rwd = true, -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} | 390 | + restaurant_collect_rwd = "json", -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} |
399 | restaurant_collect_plan = true, -- 收集进度,即解锁顾客,数字表示 | 391 | restaurant_collect_plan = true, -- 收集进度,即解锁顾客,数字表示 |
400 | }, | 392 | }, |
401 | achievement = { --成就达成 | 393 | achievement = { --成就达成 |
402 | achievement_id = true, -- 成就id | 394 | achievement_id = true, -- 成就id |
403 | achievement_type = true, -- 成就类型,具体枚举表中成就类型枚举表 | 395 | achievement_type = true, -- 成就类型,具体枚举表中成就类型枚举表 |
404 | - achievement_reward = true, -- 达成成就奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} | 396 | + achievement_reward = "json", -- 达成成就奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} |
405 | }, | 397 | }, |
406 | get_gift = { --礼包兑换 | 398 | get_gift = { --礼包兑换 |
407 | gift_id = true, -- 礼包ID | 399 | gift_id = true, -- 礼包ID |
408 | gift_key = true, -- 礼包key | 400 | gift_key = true, -- 礼包key |
409 | - gift_reward = true, -- 礼包奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} | 401 | + gift_reward = "json", -- 礼包奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} |
410 | gift_name = true, -- 礼包名称 | 402 | gift_name = true, -- 礼包名称 |
411 | gift_reason = true, -- 礼包发放原因,见发放原因枚举表 | 403 | gift_reason = true, -- 礼包发放原因,见发放原因枚举表 |
412 | }, | 404 | }, |
413 | } | 405 | } |
414 | 406 | ||
407 | +local function printError(info) | ||
408 | + print(info) | ||
409 | + print(debug.traceback()) | ||
410 | +end | ||
411 | + | ||
412 | +local function jsonEncode(tab) | ||
413 | + local newTab = {} | ||
414 | + for k , v in pairs(tab) do | ||
415 | + newTab[tostring(k)] = v | ||
416 | + end | ||
417 | + return json.encode(newTab) | ||
418 | +end | ||
419 | + | ||
415 | local function isIos(self) | 420 | local function isIos(self) |
416 | local sid = self:getProperty("sid") | 421 | local sid = self:getProperty("sid") |
417 | return sid == 2 | 422 | return sid == 2 |
@@ -450,18 +455,11 @@ local function getBaseLog(self) | @@ -450,18 +455,11 @@ local function getBaseLog(self) | ||
450 | return log | 455 | return log |
451 | end | 456 | end |
452 | 457 | ||
453 | -local function printError(info) | ||
454 | - print(info) | ||
455 | - print(debug.traceback()) | ||
456 | -end | 458 | + |
457 | 459 | ||
458 | local RoleLog = {} | 460 | local RoleLog = {} |
459 | function RoleLog.bind(Role) | 461 | function RoleLog.bind(Role) |
460 | - | ||
461 | - function Role:log() | ||
462 | - end | ||
463 | - | ||
464 | - function Role:log_new(logType, contents) | 462 | + function Role:log(logType, contents) |
465 | contents = contents or {} | 463 | contents = contents or {} |
466 | local schema = MethodType[logType] | 464 | local schema = MethodType[logType] |
467 | if not schema then | 465 | if not schema then |
@@ -472,8 +470,13 @@ function RoleLog.bind(Role) | @@ -472,8 +470,13 @@ function RoleLog.bind(Role) | ||
472 | 470 | ||
473 | doc["method"] = logType | 471 | doc["method"] = logType |
474 | for field, value in pairs(contents) do | 472 | for field, value in pairs(contents) do |
475 | - if not schema[ftype] then | ||
476 | - printError(string.format("LOG ERROR: logType [%s] have new field [%s], call yunying.", logType, field)) | 473 | + if not schema[field] then |
474 | + printError(string.format("LOG ERROR: logType [%s] have new field [%s], call.", logType, field)) | ||
475 | + else | ||
476 | + if value == 'json' then | ||
477 | + value = jsonEncode(value) | ||
478 | + end | ||
479 | + doc[field] = value | ||
477 | end | 480 | end |
478 | end | 481 | end |
479 | 482 |
src/models/RolePlugin.lua
@@ -837,7 +837,7 @@ function RolePlugin.bind(Role) | @@ -837,7 +837,7 @@ function RolePlugin.bind(Role) | ||
837 | 837 | ||
838 | count = count or 1 | 838 | count = count or 1 |
839 | 839 | ||
840 | - self:logItems(equipCsv.id, 0, count, params.log) | 840 | + self:logItems(func, 0, count, params.log) |
841 | 841 | ||
842 | if csvdb["itemCsv"][func] and csvdb["itemCsv"][func].type == ItemType.FuncOpen then | 842 | if csvdb["itemCsv"][func] and csvdb["itemCsv"][func].type == ItemType.FuncOpen then |
843 | local unlockData = csvdb["unlockCsv"][func] | 843 | local unlockData = csvdb["unlockCsv"][func] |
src/models/RolePvp.lua
@@ -500,7 +500,7 @@ function Role:setCrossServerPvpBet(idx) | @@ -500,7 +500,7 @@ function Role:setCrossServerPvpBet(idx) | ||
500 | local ok, result = pcall(skynet.call, pvpd, "lua", "setBet", idx, self:getProperty("id"), costNum) | 500 | local ok, result = pcall(skynet.call, pvpd, "lua", "setBet", idx, self:getProperty("id"), costNum) |
501 | if ok then | 501 | if ok then |
502 | if result then | 502 | if result then |
503 | - self:costItems(cost, {log = {desc = "crossPvpBet", short1 = day}}) | 503 | + self:costItems(cost, {log = {desc = "crossPvpBet", int1 = day}}) |
504 | pvpBet[day] = {idx, cost[ItemId.Gold]} | 504 | pvpBet[day] = {idx, cost[ItemId.Gold]} |
505 | self:setProperty("pvpBet", pvpBet) | 505 | self:setProperty("pvpBet", pvpBet) |
506 | end | 506 | end |