Commit 9be3f3ead6ad488c99deca62082b48d81e939374
1 parent
d9c023b8
日志需求
Showing
5 changed files
with
40 additions
and
24 deletions
Show diff stats
src/actions/DinerAction.lua
... | ... | @@ -598,6 +598,7 @@ function _M.updateTaskRpc( agent, data ) |
598 | 598 | restaurant_order_status = cmd, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 |
599 | 599 | restaurant_order_rwd = reward or {}, -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} |
600 | 600 | restaurant_order_lv = taskData.rarity, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 |
601 | + restaurant_order_type = 1, -- 订单任务类型,0:特殊顾客,1:特别订单 | |
601 | 602 | }) |
602 | 603 | |
603 | 604 | role.dinerData:updateProperty({field = "order", value = json.encode(orders)}) |
... | ... | @@ -896,6 +897,14 @@ function _M.entrustRpc(agent , data) |
896 | 897 | |
897 | 898 | reward, change = role:award(curData.reward, {log = {desc = "dinerEntrus", int1 = entrustId}}) |
898 | 899 | table.remove(entrust, 1) |
900 | + | |
901 | + role:log("restaurant_order", { | |
902 | + restaurant_order_id = entrustId, -- 订单任务ID | |
903 | + restaurant_order_status = 2, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 | |
904 | + restaurant_order_rwd = reward or {}, -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} | |
905 | + restaurant_order_lv = curData.type, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 | |
906 | + restaurant_order_type = 0, -- 订单任务类型,0:特殊顾客,1:特别订单 | |
907 | + }) | |
899 | 908 | elseif ctype == 2 then -- 放弃 |
900 | 909 | table.remove(entrust, 1) |
901 | 910 | else | ... | ... |
src/actions/HeroAction.lua
... | ... | @@ -174,13 +174,13 @@ function _M.talentRpc(agent, data) |
174 | 174 | |
175 | 175 | hero:updateProperty({field = "talent", value = talent}) |
176 | 176 | |
177 | - role:log("hero_talent", { | |
178 | - hero_id = hero:getProperty("type"), --英雄ID | |
179 | - hero_talent_id = curStage, --天赋ID | |
180 | - hero_talent_cost = cost, -- 英雄天赋升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | |
181 | - hero_talent_levelbef = oldSkillLv, -- 英雄技能升级前等级 | |
182 | - hero_talent_level = hero:getSkillLevel(1), -- 英雄技能升级后等级 | |
183 | - }) | |
177 | + -- role:log("hero_talent", { | |
178 | + -- hero_id = hero:getProperty("type"), --英雄ID | |
179 | + -- hero_talent_id = curStage, --天赋ID | |
180 | + -- hero_talent_cost = cost, -- 英雄天赋升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | |
181 | + -- hero_talent_levelbef = oldSkillLv, -- 英雄技能升级前等级 | |
182 | + -- hero_talent_level = hero:getSkillLevel(1), -- 英雄技能升级后等级 | |
183 | + -- }) | |
184 | 184 | hero:mylog({desc = "talent", int1 = talent:getv(0, 1), int2 = talent:getv(1, 1)}) |
185 | 185 | |
186 | 186 | SendPacket(actionCodes.Hero_talentRpc, '') |
... | ... | @@ -447,7 +447,6 @@ function _M.referEquipsRpc(agent, data) |
447 | 447 | end |
448 | 448 | end |
449 | 449 | |
450 | - local oldAttr = hero:getTotalAttrs() | |
451 | 450 | local oldBattleV = hero:getProperty("battleV") |
452 | 451 | local wear = {} |
453 | 452 | |
... | ... | @@ -477,16 +476,14 @@ function _M.referEquipsRpc(agent, data) |
477 | 476 | -- 更新角色 |
478 | 477 | hero:updateProperty({field = "equip", value = curEquip}) |
479 | 478 | |
480 | - local curAttr = hero:getTotalAttrs() | |
481 | - local attrChange = getChangeAttrJson(oldAttr, curAttr) | |
482 | 479 | for typ, data in pairs(wear) do |
483 | 480 | role:log("equip_wear", { |
484 | 481 | hero_id = hero:getProperty("type"), --英雄ID |
485 | 482 | equip_id = data.id, --装备ID |
486 | 483 | equip_wear_action = data.act, --装备操作类型:装备:0,卸载:1 |
487 | 484 | equip_wear_part = typ, --装备部位,记录部位ID |
488 | - equip_wear_result = curAttr, --装备操作后结果,记录属性变化,json格式记录,{“aa”:1234,"bb":4567} | |
489 | - equip_wear_change = attrChange, --装备操作变化值,记录属性变化,记录正负值,json格式记录,{“aa”:1234,"bb":-45} | |
485 | + equip_wear_scorebef = oldBattleV, --装备前英雄评分 | |
486 | + equip_wear_score = hero:getProperty("battleV"), --装备后英雄评分 | |
490 | 487 | equip_wear_mode = isAuto and 0 or 1, --用以区分自动装备还是手动装备,自动记录为0,手动记录为1 |
491 | 488 | }) |
492 | 489 | end |
... | ... | @@ -945,7 +942,7 @@ function _M.drawHeroRpc(agent, data) |
945 | 942 | gacha_up = 0, -- 卡池UP角色 |
946 | 943 | gacha_times = drawCount[drawType], -- 抽卡次数 |
947 | 944 | gacha_reward = logReward, -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
948 | - currency = cost, -- 购买道具消耗的货币 | |
945 | + gacha_cost = cost, -- 购买道具消耗的货币 | |
949 | 946 | gacha_cnt = floorHeroCount, |
950 | 947 | }) |
951 | 948 | SendPacket(actionCodes.Hero_drawHeroRpc, MsgPack.pack({reward = reward})) -- 这个 reward 是数组 | ... | ... |
src/actions/RoleAction.lua
... | ... | @@ -807,6 +807,12 @@ function _M.taskActiveRpc(agent, data) |
807 | 807 | { type = roleField[taskType], field = {"at", taskId}, value = -1 } |
808 | 808 | }) |
809 | 809 | |
810 | + role:log("task_reward", { | |
811 | + task_reward_id = taskId * 100 + taskType, --任务奖励ID | |
812 | + task_reward_type = 3, --任务奖励类型,见 任务奖励类型枚举表 | |
813 | + task_reward_detail = reward, --任务奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} | |
814 | + }) | |
815 | + | |
810 | 816 | SendPacket(actionCodes.Role_taskActiveRpc, MsgPack.pack(role:packReward(reward, change))) |
811 | 817 | return true |
812 | 818 | end | ... | ... |
src/models/RoleLog.lua
... | ... | @@ -252,13 +252,6 @@ local MethodType = { |
252 | 252 | hero_break_result = "json", -- 英雄突破效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} |
253 | 253 | hero_break_level = true, -- 英雄突破后等级上限 |
254 | 254 | }, |
255 | - hero_talent = { --英雄天赋升级 | |
256 | - hero_id = true, -- 英雄ID | |
257 | - hero_talent_cost = "json", -- 英雄天赋升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | |
258 | - hero_talent_levelbef = true, -- 英雄技能升级前等级 | |
259 | - hero_talent_level = true, -- 英雄技能升级后等级 | |
260 | - hero_talent_id = true, -- 天赋id | |
261 | - }, | |
262 | 255 | hero_jewel = { --英雄铭文 |
263 | 256 | hero_id = true, -- 英雄ID |
264 | 257 | hero_jewel_sequence = "ucode", -- 铭文装备编号,用以关联一次装备时产生的多条日志 |
... | ... | @@ -288,7 +281,7 @@ local MethodType = { |
288 | 281 | gacha_up = true, -- 卡池UP角色 |
289 | 282 | gacha_times = true, -- 抽卡次数 |
290 | 283 | gacha_reward = "json", -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} |
291 | - currency = "json", -- 消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | |
284 | + gacha_cost = "json", -- 消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} | |
292 | 285 | gacha_cnt = true, -- 保底计数 |
293 | 286 | }, |
294 | 287 | equip_wear = { --装备穿戴与卸载 |
... | ... | @@ -296,8 +289,8 @@ local MethodType = { |
296 | 289 | equip_id = true, --装备ID |
297 | 290 | equip_wear_action = true, --装备操作类型:装备:0,卸载:1 |
298 | 291 | equip_wear_part = true, --装备部位,记录部位ID |
299 | - equip_wear_result = "json", --装备操作后结果,记录属性变化,json格式记录,{“aa”:1234,"bb":4567} | |
300 | - equip_wear_change = "json", --装备操作变化值,记录属性变化,记录正负值,json格式记录,{“aa”:1234,"bb":-45} | |
292 | + equip_wear_scorebef = true, --装备前英雄评分 | |
293 | + equip_wear_score = true, --装备后英雄评分 | |
301 | 294 | equip_wear_mode = true, --用以区分自动装备还是手动装备,自动记录为0,手动记录为1 |
302 | 295 | equip_wear_seqid = "ucode", --自动穿戴时记录的系列ID,用以关联一次性装备时候产生的多条记录 |
303 | 296 | }, |
... | ... | @@ -414,6 +407,7 @@ local MethodType = { |
414 | 407 | restaurant_order_status = true, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 |
415 | 408 | restaurant_order_rwd = "json", -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} |
416 | 409 | restaurant_order_lv = true, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 |
410 | + restaurant_order_type = true, -- 订单任务类型,0:特殊顾客,1:特别订单 | |
417 | 411 | }, |
418 | 412 | restaurant_collect = { --餐厅顾客图谱 |
419 | 413 | restaurant_collect_id = true, -- 图谱收集ID |
... | ... | @@ -508,7 +502,7 @@ local MethodType = { |
508 | 502 | function_open = { -- 功能开启日志 |
509 | 503 | function_id = true, --功能ID |
510 | 504 | }, |
511 | - punitive_action = { -- punitive_action | |
505 | + punitive_action = { -- 讨伐行动 --TODO | |
512 | 506 | mission_id = true, --关卡ID |
513 | 507 | mission_herolist = true, -- 英雄ID,排序以玩家出战设置为准,示例:[111, 222, 333, 444, 555] |
514 | 508 | mission_success_rate = true, -- 大成功几率 |
... | ... | @@ -516,6 +510,15 @@ local MethodType = { |
516 | 510 | mission_result = true, -- 战斗结果(0-无效,1-胜利,2-失败) |
517 | 511 | mission_roundtime = true, -- 完成耗时(秒) |
518 | 512 | }, |
513 | + hero_talent = { --英雄精进(原英雄天赋升级) TODO | |
514 | + hero_id = true, --英雄ID | |
515 | + hero_talent_stagebef = true, --英雄精进升级前停留阶段 | |
516 | + hero_talent_stage = true, --英雄精进升级后停留阶段 | |
517 | + hero_talent_cost = "json", --英雄精进升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,….} | |
518 | + hero_talent_subid = true, --升级属性ID,生命、攻击、防御、命中、闪避分别对应(0,1,2,3,4) | |
519 | + hero_talent_sublevel = true, --升级属性等级,如生命升级从1到2,则记录2 | |
520 | + }, | |
521 | + | |
519 | 522 | |
520 | 523 | } |
521 | 524 | ... | ... |
src/models/RolePlugin.lua
... | ... | @@ -1014,6 +1014,7 @@ function RolePlugin.bind(Role) |
1014 | 1014 | |
1015 | 1015 | if csvdb["itemCsv"][func] and csvdb["itemCsv"][func].type == ItemType.FuncOpen then |
1016 | 1016 | local unlockData = csvdb["unlockCsv"][func] |
1017 | + self:log("function_open", {function_id = func}) | |
1017 | 1018 | if unlockData.type == 4 then -- 解锁神器 |
1018 | 1019 | if self:getProperty("advAFOpen")[unlockData.value1] ~= 1 then |
1019 | 1020 | self:changeUpdates({{type = "advAFOpen", field = unlockData.value1, value = 1}}) | ... | ... |