Commit d02f790400d409ae7c4d69224d6f8129521f70aa
1 parent
d825d304
遗失的log
Showing
3 changed files
with
61 additions
and
2 deletions
Show diff stats
src/actions/GmAction.lua
... | ... | @@ -27,6 +27,7 @@ function _M.ignoreout(role, pms) |
27 | 27 | else -- 解除 |
28 | 28 | role:updateProperty({field = "ignoreMt", value = 0}) |
29 | 29 | end |
30 | + role:mylog("gm_action", {desc = "ignoreout", key1 = pms.sender}) | |
30 | 31 | return "指令生效" |
31 | 32 | end |
32 | 33 | |
... | ... | @@ -46,11 +47,17 @@ function _M.ban(role, pms) |
46 | 47 | end) |
47 | 48 | end |
48 | 49 | end |
50 | + | |
51 | + role:mylog("gm_action", {desc = "ban", int1 = time, int2 = ctype, key1 = pms.sender}) | |
52 | + | |
49 | 53 | return isBan and "解封杀成功" or "封杀成功" |
50 | 54 | end |
51 | 55 | |
52 | 56 | function _M.unban(role, pms) |
53 | 57 | role:setBan(0, 0) |
58 | + | |
59 | + role:mylog("gm_action", {desc = "unban", key1 = pms.sender}) | |
60 | + | |
54 | 61 | return "解封杀成功" |
55 | 62 | end |
56 | 63 | |
... | ... | @@ -63,6 +70,8 @@ function _M.gmmsg(role, pms) |
63 | 70 | skynet.call(agent.gate_serv, "lua", "forcekick", agent.fd) |
64 | 71 | end) |
65 | 72 | end |
73 | + role:mylog("gm_action", {desc = "gmmsg", text1 = pms.pm1, key1 = pms.sender}) | |
74 | + | |
66 | 75 | return "指令成功" |
67 | 76 | end |
68 | 77 | |
... | ... | @@ -73,6 +82,8 @@ function _M.silent(role, pms) |
73 | 82 | return "解禁言成功" |
74 | 83 | end |
75 | 84 | role:updateProperty({field = "silent", value = specTime({hour = 0}, skynet.timex()) + pm1 * 86400}) |
85 | + | |
86 | + role:mylog("gm_action", {desc = "silent", int1 = pms.pm1, key1 = pms.sender}) | |
76 | 87 | return "禁言成功" |
77 | 88 | end |
78 | 89 | |
... | ... | @@ -90,6 +101,8 @@ function _M.hero(role, pms) |
90 | 101 | if not role:addHero({type = heroType, log = {desc = "gm"}}) then |
91 | 102 | return "失败" |
92 | 103 | end |
104 | + | |
105 | + role:mylog("gm_action", {desc = "hero", int1 = heroType, key1 = pms.sender}) | |
93 | 106 | return "成功" |
94 | 107 | end |
95 | 108 | |
... | ... | @@ -122,6 +135,8 @@ function _M.herol(role, pms) |
122 | 135 | hero:updateProperty({field = "level", delta = addLevel}) |
123 | 136 | role:checkTaskEnter("HeroLevelUp", {level = hero:getProperty("level")}) |
124 | 137 | |
138 | + role:mylog("gm_action", {desc = "herol", int1 = heroType, int2 = addLevel, key1 = pms.sender}) | |
139 | + | |
125 | 140 | return "成功" |
126 | 141 | end |
127 | 142 | |
... | ... | @@ -133,6 +148,8 @@ function _M.herola(role, pms) |
133 | 148 | _M.herol(role, {pm1 = hero:getProperty("type"), pm2 = addLevel}) |
134 | 149 | end |
135 | 150 | |
151 | + role:mylog("gm_action", {desc = "herola", int1 = addLevel, key1 = pms.sender}) | |
152 | + | |
136 | 153 | return "成功" |
137 | 154 | end |
138 | 155 | |
... | ... | @@ -143,6 +160,7 @@ function _M.equip(role, pms) |
143 | 160 | local level = tonum(pms.pm2) |
144 | 161 | local count = tonum(pms.pm3) |
145 | 162 | role:addEquip(typ, level, count, {log = {desc = "gm"}}) |
163 | + role:mylog("gm_action", {desc = "equip", int1 = typ, int2 = level, long1 = count, key1 = pms.sender}) | |
146 | 164 | return "成功" |
147 | 165 | end |
148 | 166 | |
... | ... | @@ -151,6 +169,7 @@ function _M.rune(role, pms) |
151 | 169 | local typ = tonum(pms.pm1) |
152 | 170 | local id = tonum(pms.pm2) |
153 | 171 | local result = role:addRune({type = typ,id = id, log = {desc = "gm"}}) |
172 | + role:mylog("gm_action", {desc = "rune", int1 = typ, int2 = id, key1 = pms.sender}) | |
154 | 173 | |
155 | 174 | return result |
156 | 175 | end |
... | ... | @@ -171,6 +190,8 @@ function _M.fb(role, pms) -- 直接通关 |
171 | 190 | role:hangFinish(carbonId) |
172 | 191 | addPre(carbonId) |
173 | 192 | |
193 | + role:mylog("gm_action", {desc = "fb", int1 = carbonId, key1 = pms.sender}) | |
194 | + | |
174 | 195 | role:checkTaskEnter("HangPass", {id = carbonId}) |
175 | 196 | return "成功" |
176 | 197 | end |
... | ... | @@ -191,6 +212,8 @@ function _M.fbc(role, pms) -- 直接通关 |
191 | 212 | end |
192 | 213 | role:updateProperty({field = "hangPass", value = {}}) |
193 | 214 | addPre(carbonId) |
215 | + | |
216 | + role:mylog("gm_action", {desc = "fbc", int1 = carbonId, key1 = pms.sender}) | |
194 | 217 | |
195 | 218 | return "成功" |
196 | 219 | end |
... | ... | @@ -224,6 +247,8 @@ function _M.exp(role, pms) |
224 | 247 | exp = math.floor(math.max(exp, 0)) |
225 | 248 | role:addPlayExp(exp, {log = {desc = "gm"}}) |
226 | 249 | |
250 | + role:mylog("gm_action", {desc = "exp", int1 = exp, key1 = pms.sender}) | |
251 | + | |
227 | 252 | return "成功" |
228 | 253 | end |
229 | 254 | |
... | ... | @@ -280,6 +305,7 @@ function _M.get(role, pms) |
280 | 305 | end |
281 | 306 | local count = tonum(pms.pm2, 1) |
282 | 307 | role:award({[itemId] = count}, {log = {desc = "gm"}}) |
308 | + role:mylog("gm_action", {desc = "get", int1 = itemId, int2 = count, key1 = pms.sender}) | |
283 | 309 | end |
284 | 310 | return "成功" |
285 | 311 | end |
... | ... | @@ -303,6 +329,9 @@ function _M.advc(role, pms) |
303 | 329 | advAFWear = {}, |
304 | 330 | }, notNotify) |
305 | 331 | role.advData = nil |
332 | + | |
333 | + role:mylog("gm_action", {desc = "advc", key1 = pms.sender}) | |
334 | + | |
306 | 335 | return "成功" |
307 | 336 | end |
308 | 337 | |
... | ... | @@ -311,6 +340,8 @@ function _M.advf(role, pms) |
311 | 340 | role:updateProperty({field = "advC", value = 0}) |
312 | 341 | role.dailyData:updateProperty({field = "advElC", value = 0}) |
313 | 342 | |
343 | + role:mylog("gm_action", {desc = "advf", key1 = pms.sender}) | |
344 | + | |
314 | 345 | return "成功" |
315 | 346 | end |
316 | 347 | |
... | ... | @@ -330,6 +361,7 @@ function _M.adv(role, pms) |
330 | 361 | advPass[chapterId] = layer |
331 | 362 | role:updateProperty({field = "advPass", value = advPass}) |
332 | 363 | end |
364 | + role:mylog("gm_action", {desc = "adv", int1 = chapterId, int2 = layer, key1 = pms.sender}) | |
333 | 365 | |
334 | 366 | return "成功" |
335 | 367 | end |
... | ... | @@ -356,6 +388,7 @@ function _M.advt(role, pms) |
356 | 388 | isEnter = true, |
357 | 389 | debugMapId = mapId, |
358 | 390 | }) |
391 | + role:mylog("gm_action", {desc = "advt", int1 = chapterId, int2 = layer, key1 = pms.sender}) | |
359 | 392 | return "成功" |
360 | 393 | end |
361 | 394 | |
... | ... | @@ -364,6 +397,8 @@ function _M.advl(role, pms) |
364 | 397 | local exp = tonum(pms.pm1) |
365 | 398 | role:addAdvLvExp(math.max(0, exp)) |
366 | 399 | |
400 | + role:mylog("gm_action", {desc = "advl", int1 = exp, key1 = pms.sender}) | |
401 | + | |
367 | 402 | return "成功" |
368 | 403 | end |
369 | 404 | |
... | ... | @@ -377,6 +412,7 @@ function _M.advcl(role, pms) |
377 | 412 | end |
378 | 413 | advData.battle.player:addExp(exp) |
379 | 414 | advData:saveDB() |
415 | + role:mylog("gm_action", {desc = "advcl", int1 = exp, key1 = pms.sender}) | |
380 | 416 | |
381 | 417 | return "成功" |
382 | 418 | end |
... | ... | @@ -386,6 +422,7 @@ function _M.idlec(role, pms) |
386 | 422 | role:updateProperty({field = "hangTeam", value = {}}) |
387 | 423 | role:updateProperty({field = "hangInfo", value = {}}) |
388 | 424 | role:updateProperty({field = "hangBag", value = {}}) |
425 | + role:mylog("gm_action", {desc = "idlec", key1 = pms.sender}) | |
389 | 426 | |
390 | 427 | role.advData = nil |
391 | 428 | return "成功" |
... | ... | @@ -410,6 +447,8 @@ function _M.advit(role, pms) |
410 | 447 | local itemId = tonum(pms.pm1) |
411 | 448 | local count = tonum(pms.pm2) |
412 | 449 | reward[itemId] = count |
450 | + | |
451 | + role:mylog("gm_action", {desc = "advit", int1 = itemId, int2 = count, key1 = pms.sender}) | |
413 | 452 | end |
414 | 453 | |
415 | 454 | |
... | ... | @@ -425,6 +464,8 @@ function _M.tower(role, pms) |
425 | 464 | if not csvdb["tower_battleCsv"][level] then return "不存在" end |
426 | 465 | role:updateProperty({field = "towerInfo", value = {c = globalCsv.tower_count_limit, l = level}}) |
427 | 466 | |
467 | + role:mylog("gm_action", {desc = "tower", int1 = level, key1 = pms.sender}) | |
468 | + | |
428 | 469 | return "成功" |
429 | 470 | end |
430 | 471 | |
... | ... | @@ -443,6 +484,8 @@ function _M.email(role, pms) |
443 | 484 | rewardPms = id ~= 0 and reward or nil, |
444 | 485 | }) |
445 | 486 | |
487 | + role:mylog("gm_action", {desc = "email", int1 = id, key1 = pms.sender}) | |
488 | + | |
446 | 489 | return "成功" |
447 | 490 | end |
448 | 491 | |
... | ... | @@ -461,6 +504,8 @@ function _M.guide(role, pms) |
461 | 504 | end |
462 | 505 | end |
463 | 506 | role:updateProperty({field = "funcGuide", value = str}) |
507 | + role:mylog("gm_action", {desc = "sguide", key1 = pms.sender}) | |
508 | + | |
464 | 509 | elseif cmd == "RESET" then |
465 | 510 | local id = tonum(pms.pm2, 0) |
466 | 511 | if id == 0 then |
... | ... | @@ -473,6 +518,8 @@ function _M.guide(role, pms) |
473 | 518 | elseif id == 2 then |
474 | 519 | role:updateProperty({field = "funcGuide", value = ""}) |
475 | 520 | end |
521 | + role:mylog("gm_action", {desc = "cguide", int1 = id, key1 = pms.sender}) | |
522 | + | |
476 | 523 | end |
477 | 524 | |
478 | 525 | return "成功" | ... | ... |
src/actions/HangAction.lua
... | ... | @@ -166,7 +166,7 @@ function _M.startRpc( agent, data ) |
166 | 166 | elseif carbonId == 10220 then |
167 | 167 | role:saveGuide(22,1) |
168 | 168 | end |
169 | - | |
169 | + role:mylog("hang_action", {desc = "startHang", int1 = carbonId}) | |
170 | 170 | SendPacket(actionCodes.Hang_startRpc, '') |
171 | 171 | return true |
172 | 172 | end |
... | ... | @@ -289,6 +289,9 @@ function _M.endBattleRpc(agent, data) |
289 | 289 | reward = reward, |
290 | 290 | }) |
291 | 291 | |
292 | + local team = role:getProperty("pvpTC") | |
293 | + role:mylog("hang_action", {desc = "hangBattle", short1 = msg.starNum > 0 and 1 or 0, int1 = carbonId, int2 = role:getProperty("hangTBV"), cint1 = role:getHerosCamp(team.heros)}) | |
294 | + | |
292 | 295 | SendPacket(actionCodes.Hang_endBattleRpc, MsgPack.pack({ |
293 | 296 | starNum = msg.starNum, |
294 | 297 | reward = reward, |
... | ... | @@ -564,6 +567,8 @@ function _M.endBonusBattleRpc(agent, data) |
564 | 567 | info = msg.info, |
565 | 568 | reward = reward, |
566 | 569 | }) |
570 | + role:mylog("hang_action", {desc = "bonusBattle", short1 = msg.starNum > 0 and 1 or 0, int1 = id}) | |
571 | + | |
567 | 572 | SendPacket(actionCodes.Hang_endBonusBattleRpc, MsgPack.pack({ |
568 | 573 | starNum = starNum, |
569 | 574 | reward = reward, |
... | ... | @@ -586,6 +591,7 @@ function _M.hangGiftRpc(agent, data) |
586 | 591 | local reward, change = role:award(carbonData.item_clear_special, {log = {desc = "hangGift", int1 = id}}) |
587 | 592 | |
588 | 593 | role:changeUpdates({{type = "hangGift", field = id, value = 1}}) |
594 | + role:mylog("hang_action", {desc = "hangGift", int1 = id}) | |
589 | 595 | |
590 | 596 | SendPacket(actionCodes.Hang_hangGiftRpc, MsgPack.pack({reward = reward, change = change})) |
591 | 597 | return true | ... | ... |
src/actions/RoleAction.lua
... | ... | @@ -292,6 +292,7 @@ function _M.loginRpc( agent, data ) |
292 | 292 | |
293 | 293 | local hangPass = role:getProperty("hangPass") |
294 | 294 | role:log("onLogin") |
295 | + role:mylog("login", {key1 = agent.ip:toArray(false, ":")[1], int1 = hangPass[1] or 0}) | |
295 | 296 | |
296 | 297 | return true |
297 | 298 | end |
... | ... | @@ -359,6 +360,7 @@ function _M.createRpc(agent, data) |
359 | 360 | newRole:log("onCreateAccount") |
360 | 361 | end |
361 | 362 | newRole:log("onCreateRole") |
363 | + newRole:mylog("create", {key1 = agent.ip:toArray(false, ":")[1]}) | |
362 | 364 | |
363 | 365 | |
364 | 366 | SendPacket(actionCodes.Role_createRpc, MsgPack.pack(response)) |
... | ... | @@ -1007,7 +1009,7 @@ function _M.changeSettingRpc(agent, data) |
1007 | 1009 | local setting = role:getProperty("setting") |
1008 | 1010 | setting[id] = status |
1009 | 1011 | role:updateProperty({field = "setting", value = setting}) |
1010 | - | |
1012 | + role:mylog("role_action", {desc = "changeSetting", int1 = id, int2 = status}) | |
1011 | 1013 | SendPacket(actionCodes.Role_changeSettingRpc, '') |
1012 | 1014 | return true |
1013 | 1015 | end |
... | ... | @@ -1045,6 +1047,7 @@ function _M.drawCodeRpc(agent, data) |
1045 | 1047 | gift_name = "", -- 礼包名称 |
1046 | 1048 | gift_reason = 0, -- 礼包发放原因,见发放原因枚举表 |
1047 | 1049 | }) |
1050 | + role:mylog("role_action", {desc = "drawCode", int1 = giftId, key1 = code}) | |
1048 | 1051 | SendPacket(actionCodes.Role_drawCodeRpc, MsgPack.pack({ |
1049 | 1052 | result = ret, |
1050 | 1053 | reward = reward, |
... | ... | @@ -1119,6 +1122,7 @@ function _M.guideRpc(agent, data) |
1119 | 1122 | if msg.funcType then |
1120 | 1123 | funcGuide = funcGuide:setv(msg.funcType, 1) |
1121 | 1124 | role:log("onGuidePoint", {guild_type = 2, guild_id = msg.funcType, guild_point = 0, guild_pass = 0}) |
1125 | + role:mylog("guide", {desc = "guide_weak", int1 = msg.funcType}) | |
1122 | 1126 | end |
1123 | 1127 | role:updateProperty({field = "funcGuide", value = funcGuide}) |
1124 | 1128 | elseif cmdType == 3 then |
... | ... | @@ -1128,6 +1132,7 @@ function _M.guideRpc(agent, data) |
1128 | 1132 | funcGuide = funcGuide:setv(msg.funcType, 1) |
1129 | 1133 | role:updateProperty({field = "funcGuide", value = funcGuide}) |
1130 | 1134 | role:log("onGuidePoint", {guild_type = 1, guild_id = msg.funcType, guild_point = 0, guild_pass = 0}) |
1135 | + role:mylog("guide", {desc = "guide_sys", int1 = msg.funcType}) | |
1131 | 1136 | end |
1132 | 1137 | elseif cmdType == 4 then |
1133 | 1138 | -- 弹出一个tips(进入功能界面也许要自动弹说明,value要区分1、2) |
... | ... | @@ -1135,6 +1140,7 @@ function _M.guideRpc(agent, data) |
1135 | 1140 | local value = msg.value or 1 |
1136 | 1141 | for _, funcIdx in pairs(msg.funcType:toArray(true,"=")) do |
1137 | 1142 | role:log("onGuidePoint", {guild_type = 3, guild_id = funcIdx, guild_point = 0, guild_pass = 0}) |
1143 | + role:mylog("guide", {desc = "guide_tips", int1 = funcIdx}) | |
1138 | 1144 | funcGuide = funcGuide:setv(funcIdx, value) |
1139 | 1145 | end |
1140 | 1146 | role:updateProperty({field = "funcGuide", value = funcGuide}) | ... | ... |