Commit 5b4db3a3ef36f0e9e136237089eb5cbca0fefb3f
1 parent
57e52b3d
增加电台任务日志完成类型
Showing
2 changed files
with
23 additions
and
3 deletions
Show diff stats
src/actions/RadioAction.lua
... | ... | @@ -101,7 +101,26 @@ function _M.startQuestRpc(agent, data) |
101 | 101 | radioTask[id] = taskData |
102 | 102 | role:updateProperty({field="radioTask", value=radioTask, notNotify=true}) |
103 | 103 | |
104 | - SendPacket(actionCodes.Radio_startQuestRpc, MsgPack.pack({id=id, task=taskData})) | |
104 | + SendPacket(actionCodes.Radio_startQuestRpc, MsgPack.pack({id=id, task=taskData})) | |
105 | + | |
106 | + local herolist = {} | |
107 | + for _, heroId in ipairs(heros) do | |
108 | + local hero = role.heros[heroId] | |
109 | + if hero then | |
110 | + table.insert(herolist, hero:getProperty("type")) | |
111 | + end | |
112 | + end | |
113 | + | |
114 | + -- 讨伐行动 | |
115 | + role:log("punitive_action", { | |
116 | + mission_id = id, --关卡ID | |
117 | + mission_herolist = herolist, -- 英雄ID,排序以玩家出战设置为准,示例:[111, 222, 333, 444, 555] | |
118 | + mission_success_rate = 0, -- 大成功几率 | |
119 | + mission_reward = {}, -- 获得奖励,建议使用json格式记录。示例:{ itemid1: 1, itemid2: 3, itemid3: 5} | |
120 | + mission_result = 0, -- 战斗结果(0-无效,1-胜利,2-失败) | |
121 | + mission_roundtime = 0, -- 完成耗时(秒) | |
122 | + mission_cleartype = 1, -- 1-开始; 2-完成(领取奖励时) | |
123 | + }) | |
105 | 124 | return true |
106 | 125 | end |
107 | 126 | |
... | ... | @@ -176,7 +195,8 @@ function _M.finishQuestRpc(agent, data) |
176 | 195 | mission_success_rate = totalCoef, -- 大成功几率 |
177 | 196 | mission_reward = r, -- 获得奖励,建议使用json格式记录。示例:{ itemid1: 1, itemid2: 3, itemid3: 5} |
178 | 197 | mission_result = 1, -- 战斗结果(0-无效,1-胜利,2-失败) |
179 | - mission_roundtime = config.time, -- 完成耗时(秒) | |
198 | + mission_roundtime = config.time, -- 完成耗时(秒) | |
199 | + mission_cleartype = 2, -- 1-开始; 2-完成(领取奖励时) | |
180 | 200 | }) |
181 | 201 | |
182 | 202 | return true | ... | ... |
src/models/RoleLog.lua
... | ... | @@ -506,7 +506,7 @@ local MethodType = { |
506 | 506 | }, |
507 | 507 | punitive_action = { -- 讨伐行动 --TODO |
508 | 508 | mission_id = true, --关卡ID |
509 | - mission_herolist = true, -- 英雄ID,排序以玩家出战设置为准,示例:[111, 222, 333, 444, 555] | |
509 | + mission_herolist = "json", -- 英雄ID,排序以玩家出战设置为准,示例:[111, 222, 333, 444, 555] | |
510 | 510 | mission_success_rate = true, -- 大成功几率 |
511 | 511 | mission_reward = "json", -- 获得奖励,建议使用json格式记录。示例:{ itemid1: 1, itemid2: 3, itemid3: 5} |
512 | 512 | mission_result = true, -- 战斗结果(0-无效,1-胜利,2-失败) | ... | ... |