Commit 39e60fd11751e83b451d8b04a2d4c3aa0d0ca044
1 parent
8fc7d1bc
支持上传 oss
Showing
3 changed files
with
16 additions
and
12 deletions
Show diff stats
config/develop.lua
src/actions/AdvAction.lua
... | ... | @@ -187,23 +187,23 @@ function _M.startHangRpc(agent, data) |
187 | 187 | local format = msg.format --编队 |
188 | 188 | |
189 | 189 | local chapterData = csvdb["adv_chapterCsv"][chapterId] |
190 | - if not chapterData then return end | |
191 | - if chapterData.idleReward == "" then return end --没有奖励 没有挂机 | |
190 | + if not chapterData then return 1 end | |
191 | + if chapterData.idleReward == "" then return 2 end --没有奖励 没有挂机 | |
192 | 192 | |
193 | 193 | local advHang = role:getProperty("advHang") |
194 | - if advHang[chapterId] then return end --正在挂机 | |
194 | + if advHang[chapterId] then return 3 end --正在挂机 | |
195 | 195 | |
196 | - if role:getAdvData():isRunning() and role:getAdvData().chapterId == chapterId then return end | |
196 | + if role:getAdvData():isRunning() and role:getAdvData().chapterId == chapterId then return 4 end | |
197 | 197 | |
198 | - if AdvCommon.isEndless(chapterId) then return end -- 无尽没有代理 | |
198 | + if AdvCommon.isEndless(chapterId) then return 5 end -- 无尽没有代理 | |
199 | 199 | |
200 | 200 | local advRelay = role:getProperty("advRelay") |
201 | - if not next(advRelay[chapterId] or {}) then return end -- 没有开放 | |
201 | + if not next(advRelay[chapterId] or {}) then return 6 end -- 没有开放 | |
202 | 202 | |
203 | 203 | |
204 | - if not role:checkAdvCount(chapterData.limitlevel) then return end -- 是否有体力 | |
204 | + if not role:checkAdvCount(chapterData.limitlevel) then return 7 end -- 是否有体力 | |
205 | 205 | |
206 | - if not checkFormat(role, format, role:getAdvData():isRunning()) then return end --编队是否正确 | |
206 | + if not checkFormat(role, format, role:getAdvData():isRunning()) then return 8 end --编队是否正确 | |
207 | 207 | |
208 | 208 | local player = {} |
209 | 209 | local attrs = role:getTeamBattleInfo(format).heros |
... | ... | @@ -220,7 +220,7 @@ function _M.startHangRpc(agent, data) |
220 | 220 | + 0.226 * player["hit"] |
221 | 221 | + 0.26 * player["miss"] |
222 | 222 | |
223 | - if battleV < chapterData.idleValue then return end -- 战斗力是否满足 | |
223 | + if battleV < chapterData.idleValue then return 9 end -- 战斗力是否满足 | |
224 | 224 | |
225 | 225 | local info = {} |
226 | 226 | info.format = {} | ... | ... |
src/actions/PvpAction.lua
... | ... | @@ -349,10 +349,11 @@ function _M.endBattleRpc(agent, data) |
349 | 349 | ["time"] = now, |
350 | 350 | } |
351 | 351 | local status, body = httpc.get(remoteUrl, "/applyvideo?" .. httpGetFormatData(params), {}, {}) |
352 | - local video = nil | |
352 | + local video, headers = nil, nil | |
353 | 353 | if tonumber(status) == 200 then |
354 | 354 | local result = json.decode(body) |
355 | 355 | video = result.name |
356 | + headers = result.headers | |
356 | 357 | else |
357 | 358 | skynet.error("applyvideo", "error", status, body, content) |
358 | 359 | end |
... | ... | @@ -401,6 +402,7 @@ function _M.endBattleRpc(agent, data) |
401 | 402 | myRank = myRank, |
402 | 403 | oldMyRank = oldMyRank, |
403 | 404 | video = video, |
405 | + headers = headers, | |
404 | 406 | })) |
405 | 407 | return true |
406 | 408 | end |
... | ... | @@ -565,10 +567,11 @@ function _M.endBattleHRpc(agent, data) |
565 | 567 | ["time"] = now, |
566 | 568 | } |
567 | 569 | local status, body = httpc.get(remoteUrl, "/applyvideo?" .. httpGetFormatData(params), {}, {}) |
568 | - local video = nil | |
570 | + local video, headers = nil, nil | |
569 | 571 | if tonumber(status) == 200 then |
570 | 572 | local result = json.decode(body) |
571 | 573 | video = result.name |
574 | + headers = result.headers | |
572 | 575 | else |
573 | 576 | skynet.error("applyvideo", "error", status, body, content) |
574 | 577 | end |
... | ... | @@ -611,6 +614,7 @@ function _M.endBattleHRpc(agent, data) |
611 | 614 | key = key, --战斗校验 key |
612 | 615 | round = round, -- 战斗场数索引 |
613 | 616 | video = video, -- 返回让客户端上传录像 |
617 | + headers = headers, | |
614 | 618 | })) |
615 | 619 | return true |
616 | 620 | end | ... | ... |