Commit 39e60fd11751e83b451d8b04a2d4c3aa0d0ca044

Authored by zhouhaihai
1 parent 8fc7d1bc

支持上传 oss

config/develop.lua
@@ -2,7 +2,7 @@ include("basic.lua") @@ -2,7 +2,7 @@ include("basic.lua")
2 2
3 logd = 0 -- 是否开启日志 3 logd = 0 -- 是否开启日志
4 thread = 4 4 thread = 4
5 -codeurl = "106.13.60.20:9090" 5 +codeurl = "192.168.8.223:9090"
6 servId = 1 6 servId = 1
7 7
8 max_client = 64 8 max_client = 64
src/actions/AdvAction.lua
@@ -187,23 +187,23 @@ function _M.startHangRpc(agent, data) @@ -187,23 +187,23 @@ function _M.startHangRpc(agent, data)
187 local format = msg.format --编队 187 local format = msg.format --编队
188 188
189 local chapterData = csvdb["adv_chapterCsv"][chapterId] 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 local advHang = role:getProperty("advHang") 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 local advRelay = role:getProperty("advRelay") 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 local player = {} 208 local player = {}
209 local attrs = role:getTeamBattleInfo(format).heros 209 local attrs = role:getTeamBattleInfo(format).heros
@@ -220,7 +220,7 @@ function _M.startHangRpc(agent, data) @@ -220,7 +220,7 @@ function _M.startHangRpc(agent, data)
220 + 0.226 * player["hit"] 220 + 0.226 * player["hit"]
221 + 0.26 * player["miss"] 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 local info = {} 225 local info = {}
226 info.format = {} 226 info.format = {}
src/actions/PvpAction.lua
@@ -349,10 +349,11 @@ function _M.endBattleRpc(agent, data) @@ -349,10 +349,11 @@ function _M.endBattleRpc(agent, data)
349 ["time"] = now, 349 ["time"] = now,
350 } 350 }
351 local status, body = httpc.get(remoteUrl, "/applyvideo?" .. httpGetFormatData(params), {}, {}) 351 local status, body = httpc.get(remoteUrl, "/applyvideo?" .. httpGetFormatData(params), {}, {})
352 - local video = nil 352 + local video, headers = nil, nil
353 if tonumber(status) == 200 then 353 if tonumber(status) == 200 then
354 local result = json.decode(body) 354 local result = json.decode(body)
355 video = result.name 355 video = result.name
  356 + headers = result.headers
356 else 357 else
357 skynet.error("applyvideo", "error", status, body, content) 358 skynet.error("applyvideo", "error", status, body, content)
358 end 359 end
@@ -401,6 +402,7 @@ function _M.endBattleRpc(agent, data) @@ -401,6 +402,7 @@ function _M.endBattleRpc(agent, data)
401 myRank = myRank, 402 myRank = myRank,
402 oldMyRank = oldMyRank, 403 oldMyRank = oldMyRank,
403 video = video, 404 video = video,
  405 + headers = headers,
404 })) 406 }))
405 return true 407 return true
406 end 408 end
@@ -565,10 +567,11 @@ function _M.endBattleHRpc(agent, data) @@ -565,10 +567,11 @@ function _M.endBattleHRpc(agent, data)
565 ["time"] = now, 567 ["time"] = now,
566 } 568 }
567 local status, body = httpc.get(remoteUrl, "/applyvideo?" .. httpGetFormatData(params), {}, {}) 569 local status, body = httpc.get(remoteUrl, "/applyvideo?" .. httpGetFormatData(params), {}, {})
568 - local video = nil 570 + local video, headers = nil, nil
569 if tonumber(status) == 200 then 571 if tonumber(status) == 200 then
570 local result = json.decode(body) 572 local result = json.decode(body)
571 video = result.name 573 video = result.name
  574 + headers = result.headers
572 else 575 else
573 skynet.error("applyvideo", "error", status, body, content) 576 skynet.error("applyvideo", "error", status, body, content)
574 end 577 end
@@ -611,6 +614,7 @@ function _M.endBattleHRpc(agent, data) @@ -611,6 +614,7 @@ function _M.endBattleHRpc(agent, data)
611 key = key, --战斗校验 key 614 key = key, --战斗校验 key
612 round = round, -- 战斗场数索引 615 round = round, -- 战斗场数索引
613 video = video, -- 返回让客户端上传录像 616 video = video, -- 返回让客户端上传录像
  617 + headers = headers,
614 })) 618 }))
615 return true 619 return true
616 end 620 end