diff --git a/src/actions/DinerAction.lua b/src/actions/DinerAction.lua index 040d856..d386a88 100644 --- a/src/actions/DinerAction.lua +++ b/src/actions/DinerAction.lua @@ -598,6 +598,7 @@ function _M.updateTaskRpc( agent, data ) restaurant_order_status = cmd, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 restaurant_order_rwd = reward or {}, -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} restaurant_order_lv = taskData.rarity, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 + restaurant_order_type = 1, -- 订单任务类型,0:特殊顾客,1:特别订单 }) role.dinerData:updateProperty({field = "order", value = json.encode(orders)}) @@ -896,6 +897,14 @@ function _M.entrustRpc(agent , data) reward, change = role:award(curData.reward, {log = {desc = "dinerEntrus", int1 = entrustId}}) table.remove(entrust, 1) + + role:log("restaurant_order", { + restaurant_order_id = entrustId, -- 订单任务ID + restaurant_order_status = 2, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 + restaurant_order_rwd = reward or {}, -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} + restaurant_order_lv = curData.type, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 + restaurant_order_type = 0, -- 订单任务类型,0:特殊顾客,1:特别订单 + }) elseif ctype == 2 then -- 放弃 table.remove(entrust, 1) else diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index 3918e60..ba8a5e6 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -174,13 +174,13 @@ function _M.talentRpc(agent, data) hero:updateProperty({field = "talent", value = talent}) - role:log("hero_talent", { - hero_id = hero:getProperty("type"), --英雄ID - hero_talent_id = curStage, --天赋ID - hero_talent_cost = cost, -- 英雄天赋升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} - hero_talent_levelbef = oldSkillLv, -- 英雄技能升级前等级 - hero_talent_level = hero:getSkillLevel(1), -- 英雄技能升级后等级 - }) + -- role:log("hero_talent", { + -- hero_id = hero:getProperty("type"), --英雄ID + -- hero_talent_id = curStage, --天赋ID + -- hero_talent_cost = cost, -- 英雄天赋升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} + -- hero_talent_levelbef = oldSkillLv, -- 英雄技能升级前等级 + -- hero_talent_level = hero:getSkillLevel(1), -- 英雄技能升级后等级 + -- }) hero:mylog({desc = "talent", int1 = talent:getv(0, 1), int2 = talent:getv(1, 1)}) SendPacket(actionCodes.Hero_talentRpc, '') @@ -447,7 +447,6 @@ function _M.referEquipsRpc(agent, data) end end - local oldAttr = hero:getTotalAttrs() local oldBattleV = hero:getProperty("battleV") local wear = {} @@ -477,16 +476,14 @@ function _M.referEquipsRpc(agent, data) -- 更新角色 hero:updateProperty({field = "equip", value = curEquip}) - local curAttr = hero:getTotalAttrs() - local attrChange = getChangeAttrJson(oldAttr, curAttr) for typ, data in pairs(wear) do role:log("equip_wear", { hero_id = hero:getProperty("type"), --英雄ID equip_id = data.id, --装备ID equip_wear_action = data.act, --装备操作类型:装备:0,卸载:1 equip_wear_part = typ, --装备部位,记录部位ID - equip_wear_result = curAttr, --装备操作后结果,记录属性变化,json格式记录,{“aa”:1234,"bb":4567} - equip_wear_change = attrChange, --装备操作变化值,记录属性变化,记录正负值,json格式记录,{“aa”:1234,"bb":-45} + equip_wear_scorebef = oldBattleV, --装备前英雄评分 + equip_wear_score = hero:getProperty("battleV"), --装备后英雄评分 equip_wear_mode = isAuto and 0 or 1, --用以区分自动装备还是手动装备,自动记录为0,手动记录为1 }) end @@ -945,7 +942,7 @@ function _M.drawHeroRpc(agent, data) gacha_up = 0, -- 卡池UP角色 gacha_times = drawCount[drawType], -- 抽卡次数 gacha_reward = logReward, -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} - currency = cost, -- 购买道具消耗的货币 + gacha_cost = cost, -- 购买道具消耗的货币 gacha_cnt = floorHeroCount, }) SendPacket(actionCodes.Hero_drawHeroRpc, MsgPack.pack({reward = reward})) -- 这个 reward 是数组 diff --git a/src/actions/RoleAction.lua b/src/actions/RoleAction.lua index 57c58e3..7936cfe 100644 --- a/src/actions/RoleAction.lua +++ b/src/actions/RoleAction.lua @@ -807,6 +807,12 @@ function _M.taskActiveRpc(agent, data) { type = roleField[taskType], field = {"at", taskId}, value = -1 } }) + role:log("task_reward", { + task_reward_id = taskId * 100 + taskType, --任务奖励ID + task_reward_type = 3, --任务奖励类型,见 任务奖励类型枚举表 + task_reward_detail = reward, --任务奖励,json格式记录,{'itemid1':123,'itemid2':456,………...} + }) + SendPacket(actionCodes.Role_taskActiveRpc, MsgPack.pack(role:packReward(reward, change))) return true end diff --git a/src/models/RoleLog.lua b/src/models/RoleLog.lua index 7709226..23ff502 100644 --- a/src/models/RoleLog.lua +++ b/src/models/RoleLog.lua @@ -252,13 +252,6 @@ local MethodType = { hero_break_result = "json", -- 英雄突破效果,可记录效果ID,或json格式记录提升效果,{攻击:20,闪避:20,……..} hero_break_level = true, -- 英雄突破后等级上限 }, - hero_talent = { --英雄天赋升级 - hero_id = true, -- 英雄ID - hero_talent_cost = "json", -- 英雄天赋升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} - hero_talent_levelbef = true, -- 英雄技能升级前等级 - hero_talent_level = true, -- 英雄技能升级后等级 - hero_talent_id = true, -- 天赋id - }, hero_jewel = { --英雄铭文 hero_id = true, -- 英雄ID hero_jewel_sequence = "ucode", -- 铭文装备编号,用以关联一次装备时产生的多条日志 @@ -288,7 +281,7 @@ local MethodType = { gacha_up = true, -- 卡池UP角色 gacha_times = true, -- 抽卡次数 gacha_reward = "json", -- 抽卡结果,建议使用json格式记录。示例:{ "XX": "1", "XXX": "3"} - currency = "json", -- 消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} + gacha_cost = "json", -- 消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,………...} gacha_cnt = true, -- 保底计数 }, equip_wear = { --装备穿戴与卸载 @@ -296,8 +289,8 @@ local MethodType = { equip_id = true, --装备ID equip_wear_action = true, --装备操作类型:装备:0,卸载:1 equip_wear_part = true, --装备部位,记录部位ID - equip_wear_result = "json", --装备操作后结果,记录属性变化,json格式记录,{“aa”:1234,"bb":4567} - equip_wear_change = "json", --装备操作变化值,记录属性变化,记录正负值,json格式记录,{“aa”:1234,"bb":-45} + equip_wear_scorebef = true, --装备前英雄评分 + equip_wear_score = true, --装备后英雄评分 equip_wear_mode = true, --用以区分自动装备还是手动装备,自动记录为0,手动记录为1 equip_wear_seqid = "ucode", --自动穿戴时记录的系列ID,用以关联一次性装备时候产生的多条记录 }, @@ -414,6 +407,7 @@ local MethodType = { restaurant_order_status = true, -- 订单任务状态,接受:0, 拒绝:1, 完成:2 restaurant_order_rwd = "json", -- 订单完成奖励,json格式记录,{"itemid1":123,"itemid2":12,……….} restaurant_order_lv = true, -- 订单品质等级,普通:0, 稀有:1, 顶级:2, 豪华:3 + restaurant_order_type = true, -- 订单任务类型,0:特殊顾客,1:特别订单 }, restaurant_collect = { --餐厅顾客图谱 restaurant_collect_id = true, -- 图谱收集ID @@ -508,7 +502,7 @@ local MethodType = { function_open = { -- 功能开启日志 function_id = true, --功能ID }, - punitive_action = { -- punitive_action + punitive_action = { -- 讨伐行动 --TODO mission_id = true, --关卡ID mission_herolist = true, -- 英雄ID,排序以玩家出战设置为准,示例:[111, 222, 333, 444, 555] mission_success_rate = true, -- 大成功几率 @@ -516,6 +510,15 @@ local MethodType = { mission_result = true, -- 战斗结果(0-无效,1-胜利,2-失败) mission_roundtime = true, -- 完成耗时(秒) }, + hero_talent = { --英雄精进(原英雄天赋升级) TODO + hero_id = true, --英雄ID + hero_talent_stagebef = true, --英雄精进升级前停留阶段 + hero_talent_stage = true, --英雄精进升级后停留阶段 + hero_talent_cost = "json", --英雄精进升级消耗,json格式记录,{道具ID1:消耗数量1,道具ID2:消耗数量2,….} + hero_talent_subid = true, --升级属性ID,生命、攻击、防御、命中、闪避分别对应(0,1,2,3,4) + hero_talent_sublevel = true, --升级属性等级,如生命升级从1到2,则记录2 + }, + } diff --git a/src/models/RolePlugin.lua b/src/models/RolePlugin.lua index e1612f9..6b1a4bc 100644 --- a/src/models/RolePlugin.lua +++ b/src/models/RolePlugin.lua @@ -1014,6 +1014,7 @@ function RolePlugin.bind(Role) if csvdb["itemCsv"][func] and csvdb["itemCsv"][func].type == ItemType.FuncOpen then local unlockData = csvdb["unlockCsv"][func] + self:log("function_open", {function_id = func}) if unlockData.type == 4 then -- 解锁神器 if self:getProperty("advAFOpen")[unlockData.value1] ~= 1 then self:changeUpdates({{type = "advAFOpen", field = unlockData.value1, value = 1}}) -- libgit2 0.21.2