【战斗】上报日志结构修改,添加结果书v就

dev_chengFeng
gaoxin 2021-01-22 12:20:53 +08:00
parent 0899be29ba
commit 43965a452f
2 changed files with 12 additions and 5 deletions

View File

@ -184,14 +184,21 @@ function this.SubmitBattleRecord()
end end
-- 上报战斗日志 -- 上报战斗日志
function this.SubmitCheckFight() function this.SubmitCheckFight(fr, br)
if not this.isSubmit then if not this.isSubmit then
PopupTipPanel.ShowTip(Language[12295]) PopupTipPanel.ShowTip(Language[12295])
return return
end end
local _, rcd = this.isHaveRecord() local _, rcd = this.isHaveRecord()
if rcd then if rcd then
local gmStr = "//check_fight|".. (rcd.fightId or "") .."|".. PlayerManager.uid .."|"..rcd.seed.."|"..rcd.fightMaxRound.."|"..BattleManager.PrintBattleTable(rcd.fightData) local gmStr = "//check_fight"
.."|fightId = ".. (rcd.fightId or "")
.."|uid = ".. PlayerManager.uid
.."|seed = "..rcd.seed
.."|maxRound = "..rcd.fightMaxRound
.."|client_result = "..(fr or "")
.."|server_result = "..(br or "")
.."|fightdata = "..BattleManager.PrintBattleTable(rcd.fightData)
LogWarn("submit record: \n"..gmStr) LogWarn("submit record: \n"..gmStr)
NetManager.GMEvent(gmStr) NetManager.GMEvent(gmStr)
end end

View File

@ -361,7 +361,7 @@ function this.BattleEnd(result)
NetManager.MapFightResultRequest(10000, "", levelId, fightType, function (msg) NetManager.MapFightResultRequest(10000, "", levelId, fightType, function (msg)
-- 结果检测 -- 结果检测
if msg.result ~= this.lastBattleResult.result then if msg.result ~= this.lastBattleResult.result then
BattleRecordManager.SubmitCheckFight() BattleRecordManager.SubmitCheckFight(this.lastBattleResult.result, msg.result)
end end
for i=1, #msg.remainHpList do for i=1, #msg.remainHpList do
@ -389,7 +389,7 @@ function this.BattleEnd(result)
--ExpeditionManager.UpdateHeroHpValue(msg.heroInfo) --ExpeditionManager.UpdateHeroHpValue(msg.heroInfo)
--ExpeditionManager.UpdateNodeValue(msg) --nodeInfo --ExpeditionManager.UpdateNodeValue(msg) --nodeInfo
if msg.result ~= this.lastBattleResult.result then if msg.result ~= this.lastBattleResult.result then
BattleRecordManager.SubmitCheckFight() BattleRecordManager.SubmitCheckFight(this.lastBattleResult.result, msg.result)
end end
this.lastBattleResult.result = msg.result this.lastBattleResult.result = msg.result
this.lastBattleResult.drop = msg.drop this.lastBattleResult.drop = msg.drop
@ -416,7 +416,7 @@ function this.BattleEnd(result)
-- 判断是否需要进行结果检测 -- 判断是否需要进行结果检测
if this.fightResult then if this.fightResult then
if result ~= this.fightResult then if result ~= this.fightResult then
BattleRecordManager.SubmitCheckFight() BattleRecordManager.SubmitCheckFight(this.fightResult, result)
end end
end end
-- 直接显示结果 -- 直接显示结果