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