Commit 70fb62d1d6bc9c6d8c6d9a37a13a701806bcf4cc
1 parent
899d9b8a
服务器数据打点
Showing
15 changed files
with
75 additions
and
24 deletions
Show diff stats
src/actions/ActivityAction.lua
| @@ -143,7 +143,8 @@ function _M.signRpc(agent, data) | @@ -143,7 +143,8 @@ function _M.signRpc(agent, data) | ||
| 143 | if monthData[curDay].daily_sign_email ~= "" then | 143 | if monthData[curDay].daily_sign_email ~= "" then |
| 144 | local emails = monthData[curDay].daily_sign_email:toArray(true,"=") | 144 | local emails = monthData[curDay].daily_sign_email:toArray(true,"=") |
| 145 | for _, emailId in pairs(emails) do | 145 | for _, emailId in pairs(emails) do |
| 146 | - redisproxy:insertEmail({roleId = role:getProperty("id"), emailId = emailId}) | 146 | + --redisproxy:insertEmail({roleId = role:getProperty("id"), emailId = emailId}) |
| 147 | + role:sendMail(emailId) | ||
| 147 | end | 148 | end |
| 148 | end | 149 | end |
| 149 | 150 | ||
| @@ -312,6 +313,7 @@ function _M.actBattleCommandTaskRpc(agent, data) | @@ -312,6 +313,7 @@ function _M.actBattleCommandTaskRpc(agent, data) | ||
| 312 | activity_type = role.activity.ActivityType.BattleCommandTask, -- 活动类型,见活动类型枚举表 | 313 | activity_type = role.activity.ActivityType.BattleCommandTask, -- 活动类型,见活动类型枚举表 |
| 313 | activity_reward = reward, -- 活动奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} | 314 | activity_reward = reward, -- 活动奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} |
| 314 | }) | 315 | }) |
| 316 | + role:mylog("act_action", {desc="bcTask", int1=taskId, int2=taskCfg.resetType}) | ||
| 315 | 317 | ||
| 316 | role:checkTaskEnter("FinishSpeTask", {taskId = taskId, actId = actId}) | 318 | role:checkTaskEnter("FinishSpeTask", {taskId = taskId, actId = actId}) |
| 317 | 319 | ||
| @@ -1327,6 +1329,7 @@ function _M.buyBattleCommandLvlRpc(agent, data) | @@ -1327,6 +1329,7 @@ function _M.buyBattleCommandLvlRpc(agent, data) | ||
| 1327 | role:costItems({[ItemId.Jade] = cost}, {log = {desc = "actBuyBpLevel", int1 = curLvl}}) | 1329 | role:costItems({[ItemId.Jade] = cost}, {log = {desc = "actBuyBpLevel", int1 = curLvl}}) |
| 1328 | actData["lvl"] = nextLvl | 1330 | actData["lvl"] = nextLvl |
| 1329 | role.activity:updateActData("BattleCommand", actData) | 1331 | role.activity:updateActData("BattleCommand", actData) |
| 1332 | + role:mylog("act_action", {desc="buyBcLvl", int1=count, int2=nextLvl}) | ||
| 1330 | 1333 | ||
| 1331 | SendPacket(actionCodes.Activity_buyBattleCommandLvlRpc, MsgPack.pack({})) | 1334 | SendPacket(actionCodes.Activity_buyBattleCommandLvlRpc, MsgPack.pack({})) |
| 1332 | return true | 1335 | return true |
src/actions/AdvAction.lua
| @@ -183,6 +183,7 @@ function _M.startAdvRpc( agent, data ) | @@ -183,6 +183,7 @@ function _M.startAdvRpc( agent, data ) | ||
| 183 | cost = relayData.supply | 183 | cost = relayData.supply |
| 184 | end | 184 | end |
| 185 | role:checkTaskEnter("AdvCostPower", {count = cost}) | 185 | role:checkTaskEnter("AdvCostPower", {count = cost}) |
| 186 | + role:mylog("adv_action", {desc = "costPower", int1 = cost}) | ||
| 186 | 187 | ||
| 187 | local support = {} -- 支援效果 | 188 | local support = {} -- 支援效果 |
| 188 | if AdvCommon.isEndless(chapterId) then | 189 | if AdvCommon.isEndless(chapterId) then |
| @@ -293,6 +294,7 @@ function _M.startHangRpc(agent, data) | @@ -293,6 +294,7 @@ function _M.startHangRpc(agent, data) | ||
| 293 | if not role:checkAdvCount(adv_idle_energy) then return 7 end -- 是否有体力 | 294 | if not role:checkAdvCount(adv_idle_energy) then return 7 end -- 是否有体力 |
| 294 | 295 | ||
| 295 | role:checkTaskEnter("AdvCostPower", {count = adv_idle_energy}) | 296 | role:checkTaskEnter("AdvCostPower", {count = adv_idle_energy}) |
| 297 | + role:mylog("adv_action", {desc = "costPower", int1 = adv_idle_energy}) | ||
| 296 | 298 | ||
| 297 | if not checkFormat(role, format, role:getAdvData():isRunning()) then return 8 end --编队是否正确 | 299 | if not checkFormat(role, format, role:getAdvData():isRunning()) then return 8 end --编队是否正确 |
| 298 | 300 |
src/actions/DinerAction.lua
| @@ -182,13 +182,17 @@ function _M.getSellRewardRpc( agent, data ) | @@ -182,13 +182,17 @@ function _M.getSellRewardRpc( agent, data ) | ||
| 182 | local sells = json.decode(role.dinerData:getProperty("sells")) | 182 | local sells = json.decode(role.dinerData:getProperty("sells")) |
| 183 | 183 | ||
| 184 | local deltaTimes = {} | 184 | local deltaTimes = {} |
| 185 | - for slot, _ in pairs(sells) do | 185 | + for slot, sell in pairs(sells) do |
| 186 | + local oldCount = sell.count | ||
| 187 | + local sellDish = sell.dish | ||
| 186 | local temp = role.dinerData:updateSell(slot) or { | 188 | local temp = role.dinerData:updateSell(slot) or { |
| 187 | deltaCount = 0, | 189 | deltaCount = 0, |
| 188 | deltaTime = 0, | 190 | deltaTime = 0, |
| 189 | lastCount = 0, | 191 | lastCount = 0, |
| 190 | } | 192 | } |
| 191 | deltaTimes[slot] = temp.deltaTime | 193 | deltaTimes[slot] = temp.deltaTime |
| 194 | + local sellCount = oldCount - temp.lastCount | ||
| 195 | + role:mylog("diner_action", {desc = "sell", int1 = sellDish, int2 = sellCount}) | ||
| 192 | end | 196 | end |
| 193 | sells = json.decode(role.dinerData:getProperty("sells")) | 197 | sells = json.decode(role.dinerData:getProperty("sells")) |
| 194 | for slot, sell in pairs(sells) do | 198 | for slot, sell in pairs(sells) do |
| @@ -238,7 +242,7 @@ function _M.getSellRewardRpc( agent, data ) | @@ -238,7 +242,7 @@ function _M.getSellRewardRpc( agent, data ) | ||
| 238 | role.dinerData:notifyUpdateProperty("order", role.dinerData:getProperty("order")) | 242 | role.dinerData:notifyUpdateProperty("order", role.dinerData:getProperty("order")) |
| 239 | end | 243 | end |
| 240 | 244 | ||
| 241 | - role:mylog("diner_action", {desc = "sell"}) | 245 | + --role:mylog("diner_action", {desc = "sell"}) |
| 242 | 246 | ||
| 243 | SendPacket(actionCodes.Diner_getSellRewardRpc, MsgPack.pack({reward = reward, change = change})) | 247 | SendPacket(actionCodes.Diner_getSellRewardRpc, MsgPack.pack({reward = reward, change = change})) |
| 244 | return true | 248 | return true |
| @@ -327,7 +331,7 @@ function _M.expediteSellRpc( agent, data ) | @@ -327,7 +331,7 @@ function _M.expediteSellRpc( agent, data ) | ||
| 327 | end | 331 | end |
| 328 | role:checkTaskEnter("FoodSellQuick") | 332 | role:checkTaskEnter("FoodSellQuick") |
| 329 | 333 | ||
| 330 | - role:mylog("diner_action", {desc = "sellQ"}) | 334 | + role:mylog("diner_action", {desc = "sellQ", int1 = count + 1}) |
| 331 | 335 | ||
| 332 | SendPacket(actionCodes.Diner_expediteSellRpc, MsgPack.pack({reward = reward, change = change, popular = popular})) | 336 | SendPacket(actionCodes.Diner_expediteSellRpc, MsgPack.pack({reward = reward, change = change, popular = popular})) |
| 333 | return true | 337 | return true |
src/actions/EmailAction.lua
| @@ -133,6 +133,7 @@ function _M.drawAttachRpc(agent, data) | @@ -133,6 +133,7 @@ function _M.drawAttachRpc(agent, data) | ||
| 133 | 133 | ||
| 134 | 134 | ||
| 135 | local email = require("models.Email").new({key = string.format("%d", id), id = id}) | 135 | local email = require("models.Email").new({key = string.format("%d", id), id = id}) |
| 136 | + email.owner = role | ||
| 136 | if not email:load() then return end | 137 | if not email:load() then return end |
| 137 | 138 | ||
| 138 | local attachments = getEmailAttachments(email) | 139 | local attachments = getEmailAttachments(email) |
| @@ -142,7 +143,7 @@ function _M.drawAttachRpc(agent, data) | @@ -142,7 +143,7 @@ function _M.drawAttachRpc(agent, data) | ||
| 142 | email:setProperty("status", 2, true) | 143 | email:setProperty("status", 2, true) |
| 143 | email:log(role, 2) | 144 | email:log(role, 2) |
| 144 | SendPacket(actionCodes.Email_drawAttachRpc, MsgPack.pack({reward = reward, change = change})) | 145 | SendPacket(actionCodes.Email_drawAttachRpc, MsgPack.pack({reward = reward, change = change})) |
| 145 | - role:mylog("mail_action", {desc = "draw_attach", int1 = id, key1 = email:getProperty("title"), key2 = attachments}) | 146 | + role:mylog("mail_action", {desc = "draw_attach", int1 = email:getProperty("emailId"), key1 = email:getProperty("title"), key2 = attachments}) |
| 146 | return true | 147 | return true |
| 147 | end | 148 | end |
| 148 | 149 |
src/actions/FriendAction.lua
| @@ -171,7 +171,7 @@ function _M.applyRpc(agent, data) | @@ -171,7 +171,7 @@ function _M.applyRpc(agent, data) | ||
| 171 | myInfo.online = true | 171 | myInfo.online = true |
| 172 | myInfo.hadApply = true | 172 | myInfo.hadApply = true |
| 173 | 173 | ||
| 174 | - role:mylog("role_action", {desc = "addFriend", int1 = 1}) | 174 | + role:mylog("role_action", {desc = "applyFriend", int1 = 1}) |
| 175 | 175 | ||
| 176 | rpcRole(objectId, "SendPacket", actionCodes.Friend_updateProperty, MsgPack.pack({newApply = 1, info = {myInfo}})) -- 通知对方 | 176 | rpcRole(objectId, "SendPacket", actionCodes.Friend_updateProperty, MsgPack.pack({newApply = 1, info = {myInfo}})) -- 通知对方 |
| 177 | end | 177 | end |
| @@ -420,6 +420,7 @@ function _M.deleteRpc(agent, data) | @@ -420,6 +420,7 @@ function _M.deleteRpc(agent, data) | ||
| 420 | friend_roleid = objectId, -- 好友账户下的角色id | 420 | friend_roleid = objectId, -- 好友账户下的角色id |
| 421 | friend_cnt = 0, -- 操作后好友数量 | 421 | friend_cnt = 0, -- 操作后好友数量 |
| 422 | }) | 422 | }) |
| 423 | + role:mylog("role_action", {desc = "delFriend", int1 = 1}) | ||
| 423 | SendPacket(actionCodes.Friend_deleteRpc, MsgPack.pack("")) | 424 | SendPacket(actionCodes.Friend_deleteRpc, MsgPack.pack("")) |
| 424 | return true | 425 | return true |
| 425 | end | 426 | end |
src/actions/HangAction.lua
| @@ -16,6 +16,17 @@ local table_unpack = table.unpack | @@ -16,6 +16,17 @@ local table_unpack = table.unpack | ||
| 16 | 16 | ||
| 17 | local _M = {} | 17 | local _M = {} |
| 18 | 18 | ||
| 19 | +local function getHangTime(role) | ||
| 20 | + local hangInfo = role:getProperty("hangInfo") | ||
| 21 | + if not hangInfo.carbonId or not hangInfo.coinTime or not hangInfo.itemTime then | ||
| 22 | + return 0 | ||
| 23 | + end | ||
| 24 | + local carbonData = csvdb["idle_battleCsv"][hangInfo.carbonId] | ||
| 25 | + local nowCoinTime = math.min(skynet.timex(), hangInfo.endCoinTime or 0) | ||
| 26 | + | ||
| 27 | + return nowCoinTime - hangInfo.coinTime | ||
| 28 | +end | ||
| 29 | + | ||
| 19 | local function checkReward(role) | 30 | local function checkReward(role) |
| 20 | local hangInfo = role:getProperty("hangInfo") | 31 | local hangInfo = role:getProperty("hangInfo") |
| 21 | if not hangInfo.carbonId or not hangInfo.coinTime or not hangInfo.itemTime then | 32 | if not hangInfo.carbonId or not hangInfo.coinTime or not hangInfo.itemTime then |
| @@ -214,6 +225,7 @@ function _M.startBattleRpc(agent, data) | @@ -214,6 +225,7 @@ function _M.startBattleRpc(agent, data) | ||
| 214 | end | 225 | end |
| 215 | 226 | ||
| 216 | _BattleKey = tostring(math.random()) | 227 | _BattleKey = tostring(math.random()) |
| 228 | + role._StartBattleTs = skynet.timex() | ||
| 217 | 229 | ||
| 218 | role:checkTaskEnter("HangBattle", {id = carbonId}) | 230 | role:checkTaskEnter("HangBattle", {id = carbonId}) |
| 219 | SendPacket(actionCodes.Hang_startBattleRpc, MsgPack.pack({key = _BattleKey})) | 231 | SendPacket(actionCodes.Hang_startBattleRpc, MsgPack.pack({key = _BattleKey})) |
| @@ -323,7 +335,9 @@ function _M.endBattleRpc(agent, data) | @@ -323,7 +335,9 @@ function _M.endBattleRpc(agent, data) | ||
| 323 | }) | 335 | }) |
| 324 | 336 | ||
| 325 | local team = role:getProperty("pvpTC") | 337 | local team = role:getProperty("pvpTC") |
| 326 | - 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)}) | 338 | + |
| 339 | + local battleTime = skynet.timex() - role._StartBattleTs | ||
| 340 | + 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), cint2 = battleTime}) | ||
| 327 | 341 | ||
| 328 | SendPacket(actionCodes.Hang_endBattleRpc, MsgPack.pack({ | 342 | SendPacket(actionCodes.Hang_endBattleRpc, MsgPack.pack({ |
| 329 | starNum = msg.starNum, | 343 | starNum = msg.starNum, |
| @@ -394,6 +408,7 @@ end | @@ -394,6 +408,7 @@ end | ||
| 394 | 408 | ||
| 395 | function _M.getRewardRpc(agent , data) | 409 | function _M.getRewardRpc(agent , data) |
| 396 | local role = agent.role | 410 | local role = agent.role |
| 411 | + local hangTime = getHangTime(role) | ||
| 397 | checkReward(role) | 412 | checkReward(role) |
| 398 | local items = role:getProperty("hangBag") | 413 | local items = role:getProperty("hangBag") |
| 399 | if not next(items) then return end | 414 | if not next(items) then return end |
| @@ -424,6 +439,7 @@ function _M.getRewardRpc(agent , data) | @@ -424,6 +439,7 @@ function _M.getRewardRpc(agent , data) | ||
| 424 | residence_reward = reward, --获得奖励,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | 439 | residence_reward = reward, --获得奖励,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
| 425 | }) | 440 | }) |
| 426 | 441 | ||
| 442 | + role:mylog("hang_action", {desc = "hangReward", int1 = hangTime}) | ||
| 427 | 443 | ||
| 428 | SendPacket(actionCodes.Hang_getRewardRpc, MsgPack.pack({ | 444 | SendPacket(actionCodes.Hang_getRewardRpc, MsgPack.pack({ |
| 429 | reward = reward, | 445 | reward = reward, |
| @@ -493,6 +509,8 @@ function _M.quickRpc(agent , data) | @@ -493,6 +509,8 @@ function _M.quickRpc(agent , data) | ||
| 493 | residence_time = time, --挂机或排名时长 | 509 | residence_time = time, --挂机或排名时长 |
| 494 | residence_reward = reward, --获得奖励,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} | 510 | residence_reward = reward, --获得奖励,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
| 495 | }) | 511 | }) |
| 512 | + role:mylog("hang_action", {desc = "quick", short1 = curCount}) | ||
| 513 | + | ||
| 496 | SendPacket(actionCodes.Hang_quickRpc, MsgPack.pack({ | 514 | SendPacket(actionCodes.Hang_quickRpc, MsgPack.pack({ |
| 497 | reward = reward, | 515 | reward = reward, |
| 498 | change = change | 516 | change = change |
src/actions/HeroAction.lua
| @@ -728,7 +728,7 @@ function _M.getResetRewardRpc(agent, data) | @@ -728,7 +728,7 @@ function _M.getResetRewardRpc(agent, data) | ||
| 728 | equip = "", | 728 | equip = "", |
| 729 | rune = "", | 729 | rune = "", |
| 730 | }) | 730 | }) |
| 731 | - hero:mylog({desc = "resetHero"}) | 731 | + hero:mylog({desc = "resetHero", int1=tmpLevel}) |
| 732 | 732 | ||
| 733 | --local coef = globalCsv.unit_back_discount | 733 | --local coef = globalCsv.unit_back_discount |
| 734 | --coef = (pay or tmpLevel <= 60) and 1 or coef | 734 | --coef = (pay or tmpLevel <= 60) and 1 or coef |
| @@ -991,11 +991,11 @@ function _M.drawHeroRpc(agent, data) | @@ -991,11 +991,11 @@ function _M.drawHeroRpc(agent, data) | ||
| 991 | local fragId = itemData.id - ItemStartId.Hero | 991 | local fragId = itemData.id - ItemStartId.Hero |
| 992 | local heroData = csvdb["unitCsv"][fragId] | 992 | local heroData = csvdb["unitCsv"][fragId] |
| 993 | local count = globalCsv.draw_unit_tofragment[heroData.rare] | 993 | local count = globalCsv.draw_unit_tofragment[heroData.rare] |
| 994 | - role:award({[fragId] = count}, {log = {desc = "drawHero", int1 = btype, int2 = poolId}}) | 994 | + role:award({[fragId] = count}, {log = {desc = "drawHero", int1 = btype, int2 = poolId, short1=isFloorBack and 1 or 0}}) |
| 995 | logReward[fragId] = (logReward[fragId] or 0) + count | 995 | logReward[fragId] = (logReward[fragId] or 0) + count |
| 996 | table.insert(reward, {id = fragId, count = count, from = itemId, fcount = 1}) | 996 | table.insert(reward, {id = fragId, count = count, from = itemId, fcount = 1}) |
| 997 | else | 997 | else |
| 998 | - role:award({[itemId] = 1}, {log = {desc = "drawHero", int1 = btype, int2 = poolId}}) | 998 | + role:award({[itemId] = 1}, {log = {desc = "drawHero", int1 = btype, int2 = poolId, short1=isFloorBack and 1 or 0}}) |
| 999 | logReward[itemId] = (logReward[itemId] or 0) + 1 | 999 | logReward[itemId] = (logReward[itemId] or 0) + 1 |
| 1000 | table.insert(reward, {id = itemId, count = 1}) | 1000 | table.insert(reward, {id = itemId, count = 1}) |
| 1001 | end | 1001 | end |
| @@ -1035,6 +1035,8 @@ function _M.drawHeroRpc(agent, data) | @@ -1035,6 +1035,8 @@ function _M.drawHeroRpc(agent, data) | ||
| 1035 | gacha_cost = cost, -- 购买道具消耗的货币 | 1035 | gacha_cost = cost, -- 购买道具消耗的货币 |
| 1036 | gacha_cnt = floorHeroCount, | 1036 | gacha_cnt = floorHeroCount, |
| 1037 | }) | 1037 | }) |
| 1038 | + | ||
| 1039 | + role:mylog("hero_action", {desc = "drawHero", int1=poolId, int2=btype, short1 = drawCount[drawType]}) | ||
| 1038 | SendPacket(actionCodes.Hero_drawHeroRpc, MsgPack.pack({reward = reward})) -- 这个 reward 是数组 | 1040 | SendPacket(actionCodes.Hero_drawHeroRpc, MsgPack.pack({reward = reward})) -- 这个 reward 是数组 |
| 1039 | 1041 | ||
| 1040 | local feedbackId = buildTypeData["can_feedback"] or 0 | 1042 | local feedbackId = buildTypeData["can_feedback"] or 0 |
src/actions/RadioAction.lua
| @@ -199,7 +199,8 @@ function _M.finishQuestRpc(agent, data) | @@ -199,7 +199,8 @@ function _M.finishQuestRpc(agent, data) | ||
| 199 | mission_result = 1, -- 战斗结果(0-无效,1-胜利,2-失败) | 199 | mission_result = 1, -- 战斗结果(0-无效,1-胜利,2-失败) |
| 200 | mission_roundtime = config.time, -- 完成耗时(秒) | 200 | mission_roundtime = config.time, -- 完成耗时(秒) |
| 201 | mission_cleartype = 2, -- 1-开始; 2-完成(领取奖励时) | 201 | mission_cleartype = 2, -- 1-开始; 2-完成(领取奖励时) |
| 202 | - }) | 202 | + }) |
| 203 | + role:mylog("role_action", {desc = "radioTask", int1 = id, short1 = bigSuccess and 1 or 0}) | ||
| 203 | 204 | ||
| 204 | return true | 205 | return true |
| 205 | end | 206 | end |
src/actions/RoleAction.lua
| @@ -399,7 +399,8 @@ function _M.createRpc(agent, data) | @@ -399,7 +399,8 @@ function _M.createRpc(agent, data) | ||
| 399 | 399 | ||
| 400 | newRole:award(globalCsv.birthItem, {log = {desc = "birth"}, notNotify = true}) | 400 | newRole:award(globalCsv.birthItem, {log = {desc = "birth"}, notNotify = true}) |
| 401 | -- 欢迎邮件 | 401 | -- 欢迎邮件 |
| 402 | - mysqlproxy:insertEmail({roleId = roleId, emailId = 1}) | 402 | + --mysqlproxy:insertEmail({roleId = roleId, emailId = 1}) |
| 403 | + newRole:sendMail(1) | ||
| 403 | 404 | ||
| 404 | if msg.newuser then | 405 | if msg.newuser then |
| 405 | newRole:log("onCreateAccount") | 406 | newRole:log("onCreateAccount") |
| @@ -904,8 +905,10 @@ function _M.taskRpc(agent, data) | @@ -904,8 +905,10 @@ function _M.taskRpc(agent, data) | ||
| 904 | -- 日常活动完成 | 905 | -- 日常活动完成 |
| 905 | if taskType == 1 then | 906 | if taskType == 1 then |
| 906 | role:checkTaskEnter("DailyTask", {pre = (taskStatus["a"] or 0), cur = active}) | 907 | role:checkTaskEnter("DailyTask", {pre = (taskStatus["a"] or 0), cur = active}) |
| 908 | + role:mylog("role_action", {desc="dayTask", int1=taskId, int2=active}) | ||
| 907 | else | 909 | else |
| 908 | role:checkTaskEnter("WeekTask", {pre = (taskStatus["a"] or 0), cur = active}) | 910 | role:checkTaskEnter("WeekTask", {pre = (taskStatus["a"] or 0), cur = active}) |
| 911 | + role:mylog("role_action", {desc="weekTask", int1=taskId, int2=active}) | ||
| 909 | end | 912 | end |
| 910 | 913 | ||
| 911 | role:changeUpdates({ | 914 | role:changeUpdates({ |
| @@ -1000,6 +1003,8 @@ function _M.achiveRpc(agent, data) | @@ -1000,6 +1003,8 @@ function _M.achiveRpc(agent, data) | ||
| 1000 | achievement_type = cfg.type, -- 成就类型,具体枚举表中成就类型枚举表 | 1003 | achievement_type = cfg.type, -- 成就类型,具体枚举表中成就类型枚举表 |
| 1001 | achievement_reward = award, -- 达成成就奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} | 1004 | achievement_reward = award, -- 达成成就奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} |
| 1002 | }) | 1005 | }) |
| 1006 | + | ||
| 1007 | + role:mylog("role_action", {desc="finishAchieve", int1=cfg.id}) | ||
| 1003 | end | 1008 | end |
| 1004 | end | 1009 | end |
| 1005 | end | 1010 | end |
| @@ -1034,6 +1039,7 @@ function _M.achiveRpc(agent, data) | @@ -1034,6 +1039,7 @@ function _M.achiveRpc(agent, data) | ||
| 1034 | achievement_type = achiveTask.type, -- 成就类型,具体枚举表中成就类型枚举表 | 1039 | achievement_type = achiveTask.type, -- 成就类型,具体枚举表中成就类型枚举表 |
| 1035 | achievement_reward = reward, -- 达成成就奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} | 1040 | achievement_reward = reward, -- 达成成就奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} |
| 1036 | }) | 1041 | }) |
| 1042 | + role:mylog("role_action", {desc="finishAchieve", int1=taskId}) | ||
| 1037 | 1043 | ||
| 1038 | SendPacket(actionCodes.Role_achiveRpc, MsgPack.pack(role:packReward(reward, change))) | 1044 | SendPacket(actionCodes.Role_achiveRpc, MsgPack.pack(role:packReward(reward, change))) |
| 1039 | end | 1045 | end |
| @@ -1057,6 +1063,7 @@ function _M.achiveRpc(agent, data) | @@ -1057,6 +1063,7 @@ function _M.achiveRpc(agent, data) | ||
| 1057 | if preMaxCount < pData.request and overCount >= pData.request then | 1063 | if preMaxCount < pData.request and overCount >= pData.request then |
| 1058 | role:sendMail(101, skynet.timex(), pData.reward, {pData.level}) | 1064 | role:sendMail(101, skynet.timex(), pData.reward, {pData.level}) |
| 1059 | flag = true | 1065 | flag = true |
| 1066 | + role:mylog("role_action", {desc="fux", int1=pdata.level}) | ||
| 1060 | end | 1067 | end |
| 1061 | end | 1068 | end |
| 1062 | if flag then | 1069 | if flag then |
src/actions/SeaportAction.lua
| @@ -237,6 +237,8 @@ function _M.taskRpc(agent, data) | @@ -237,6 +237,8 @@ function _M.taskRpc(agent, data) | ||
| 237 | reward, change = role:award(itemReward, {log = {desc = "seaportTask", int1 = taskId, int2 = level}}) | 237 | reward, change = role:award(itemReward, {log = {desc = "seaportTask", int1 = taskId, int2 = level}}) |
| 238 | 238 | ||
| 239 | seaport.collect[taskId] = nil | 239 | seaport.collect[taskId] = nil |
| 240 | + | ||
| 241 | + role:mylog("role_action", {desc="seaportTask", int1=taskId, int2=level, short1=bigSuccess and 1 or 0}) | ||
| 240 | else | 242 | else |
| 241 | return 0 | 243 | return 0 |
| 242 | end | 244 | end |
src/adv/Adv.lua
| @@ -922,7 +922,7 @@ function Adv:over(success, rewardRatio, overType) | @@ -922,7 +922,7 @@ function Adv:over(success, rewardRatio, overType) | ||
| 922 | end | 922 | end |
| 923 | self:clearAdvUnlockCache() | 923 | self:clearAdvUnlockCache() |
| 924 | 924 | ||
| 925 | - self:mylog({desc = "over", short1 = success and 1 or 0, int1 = overType}) | 925 | + self:mylog({desc = "over", short1 = success and 1 or 0, int1 = overType, int2 = self.chapterId, long1 = self.level}) |
| 926 | 926 | ||
| 927 | 927 | ||
| 928 | local team = self.owner:getProperty("advTeam") | 928 | local team = self.owner:getProperty("advTeam") |
src/models/HeroPlugin.lua
src/models/RoleBattle.lua
| @@ -197,6 +197,7 @@ function Role:checkBattle(battleType, params) | @@ -197,6 +197,7 @@ function Role:checkBattle(battleType, params) | ||
| 197 | 197 | ||
| 198 | local fixData = { | 198 | local fixData = { |
| 199 | hang = function() | 199 | hang = function() |
| 200 | + dump(self:getProperty("hangTS")) | ||
| 200 | for slot, hero in pairs(self:getProperty("hangTS").heros) do | 201 | for slot, hero in pairs(self:getProperty("hangTS").heros) do |
| 201 | selflist[slot] = hero.type | 202 | selflist[slot] = hero.type |
| 202 | end | 203 | end |
src/models/RolePlugin.lua
| @@ -252,7 +252,8 @@ function RolePlugin.bind(Role) | @@ -252,7 +252,8 @@ function RolePlugin.bind(Role) | ||
| 252 | local headData = csvdb["player_iconCsv"][itemId] | 252 | local headData = csvdb["player_iconCsv"][itemId] |
| 253 | -- pvp 跨服竞技场奖励 | 253 | -- pvp 跨服竞技场奖励 |
| 254 | if headData and headData.path == 2 then | 254 | if headData and headData.path == 2 then |
| 255 | - mysqlproxy:insertEmail({roleId = self:getProperty("id"), emailId = 19}) | 255 | + --mysqlproxy:insertEmail({roleId = self:getProperty("id"), emailId = 19}) |
| 256 | + self:sendMail(19) | ||
| 256 | end | 257 | end |
| 257 | end | 258 | end |
| 258 | end | 259 | end |
| @@ -1372,11 +1373,12 @@ function RolePlugin.bind(Role) | @@ -1372,11 +1373,12 @@ function RolePlugin.bind(Role) | ||
| 1372 | end | 1373 | end |
| 1373 | if done then | 1374 | if done then |
| 1374 | update = true | 1375 | update = true |
| 1375 | - redisproxy:insertEmail({ | ||
| 1376 | - roleId = self:getProperty("id"), | ||
| 1377 | - emailId = idx == 1 and 361 or 362, | ||
| 1378 | - attachments = set[1].phase_award, | ||
| 1379 | - }) | 1376 | + --redisproxy:insertEmail({ |
| 1377 | + -- roleId = self:getProperty("id"), | ||
| 1378 | + -- emailId = idx == 1 and 361 or 362, | ||
| 1379 | + -- attachments = set[1].phase_award, | ||
| 1380 | + --}) | ||
| 1381 | + self:sendMail(idx == 1 and 361 or 362, nil, set[1].phase_award) | ||
| 1380 | -- self:award(set[1].phase_award, {log = {desc = "seaportReward", int1 = set[1].phase, int2 = set[1].id}}) | 1382 | -- self:award(set[1].phase_award, {log = {desc = "seaportReward", int1 = set[1].phase, int2 = set[1].id}}) |
| 1381 | donate[idx] = 1 | 1383 | donate[idx] = 1 |
| 1382 | end | 1384 | end |
| @@ -1469,11 +1471,12 @@ function RolePlugin.bind(Role) | @@ -1469,11 +1471,12 @@ function RolePlugin.bind(Role) | ||
| 1469 | end | 1471 | end |
| 1470 | rewardStr = rewardStr .. string.format("%s=%s",itemId,value) | 1472 | rewardStr = rewardStr .. string.format("%s=%s",itemId,value) |
| 1471 | end | 1473 | end |
| 1472 | - redisproxy:insertEmail({ | ||
| 1473 | - roleId = self:getProperty("id"), | ||
| 1474 | - emailId = 363, | ||
| 1475 | - attachments = rewardStr, | ||
| 1476 | - }) | 1474 | + --redisproxy:insertEmail({ |
| 1475 | + -- roleId = self:getProperty("id"), | ||
| 1476 | + -- emailId = 363, | ||
| 1477 | + -- attachments = rewardStr, | ||
| 1478 | + --}) | ||
| 1479 | + self:sendMail(363, nil, rewardStr) | ||
| 1477 | end | 1480 | end |
| 1478 | end | 1481 | end |
| 1479 | seaport.collect = {} | 1482 | seaport.collect = {} |
| @@ -1695,6 +1698,7 @@ function RolePlugin.bind(Role) | @@ -1695,6 +1698,7 @@ function RolePlugin.bind(Role) | ||
| 1695 | 1698 | ||
| 1696 | if level > advL[1] then | 1699 | if level > advL[1] then |
| 1697 | self:checkTaskEnter("AdvLevel", {level = level}) | 1700 | self:checkTaskEnter("AdvLevel", {level = level}) |
| 1701 | + self:mylog("adv_action", {desc = "adv_level", int1 = level}) | ||
| 1698 | end | 1702 | end |
| 1699 | advL[1] = level | 1703 | advL[1] = level |
| 1700 | advL[2] = newExp | 1704 | advL[2] = newExp |
| @@ -2341,6 +2345,8 @@ function RolePlugin.bind(Role) | @@ -2341,6 +2345,8 @@ function RolePlugin.bind(Role) | ||
| 2341 | gift = gift .. k.."="..v.." " | 2345 | gift = gift .. k.."="..v.." " |
| 2342 | end | 2346 | end |
| 2343 | mysqlproxy:insertEmail({roleId = self:getProperty("id"), emailId = mailId, createtime = createTime, attachments = gift, contentPms = contentPms}) | 2347 | mysqlproxy:insertEmail({roleId = self:getProperty("id"), emailId = mailId, createtime = createTime, attachments = gift, contentPms = contentPms}) |
| 2348 | + | ||
| 2349 | + self:mylog("role_action", {desc="sendMail", int1 = mailId}) | ||
| 2344 | self.sendMailFlag = true | 2350 | self.sendMailFlag = true |
| 2345 | end | 2351 | end |
| 2346 | 2352 |
src/models/Store.lua
| @@ -301,7 +301,9 @@ function Store:onBuyCard(type, duration, id, actid) | @@ -301,7 +301,9 @@ function Store:onBuyCard(type, duration, id, actid) | ||
| 301 | actData["unlock"] = 1 | 301 | actData["unlock"] = 1 |
| 302 | if actCfg.condition ~= 0 then | 302 | if actCfg.condition ~= 0 then |
| 303 | actData["lvl"] = (actData["lvl"] or 0) + actCfg.condition | 303 | actData["lvl"] = (actData["lvl"] or 0) + actCfg.condition |
| 304 | + role:mylog("act_action", {desc="buyBcLvl", int1=actCfg.condition, int2=actData["lvl"]}) | ||
| 304 | end | 305 | end |
| 306 | + self.owner:mylog("act_action", {desc="buyBc", int1=id, int2=actData["lvl"] or 0}) | ||
| 305 | self.owner.activity:updateActData("BattleCommand", actData) | 307 | self.owner.activity:updateActData("BattleCommand", actData) |
| 306 | end | 308 | end |
| 307 | end | 309 | end |