diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/BattleRecordManager.lua b/Assets/ManagedResources/~Lua/Modules/Battle/BattleRecordManager.lua index 9bf3ff9a97..112698a9bc 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/BattleRecordManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/BattleRecordManager.lua @@ -182,10 +182,25 @@ function this.SubmitBattleRecord() end local _, rcd = this.isHaveRecord() if rcd then - NetManager.GMEvent("//"..rcd.seed.."|"..rcd.fightMaxRound.."|"..BattleManager.PrintBattleTable(rcd.fightData)) + NetManager.GMEvent("//".. PlayerManager.uid .."|"..rcd.seed.."|"..rcd.fightMaxRound.."|"..BattleManager.PrintBattleTable(rcd.fightData)) end this.isSubmit = false PopupTipPanel.ShowTip(Language[12296]) end +-- 上报战斗日志 +function this.SubmitCheckFight() + if not this.isSubmit then + PopupTipPanel.ShowTip(Language[12295]) + return + end + local _, rcd = this.isHaveRecord() + if rcd then + NetManager.GMEvent("//check_fight|".. PlayerManager.uid .."|"..rcd.seed.."|"..rcd.fightMaxRound.."|"..BattleManager.PrintBattleTable(rcd.fightData)) + end + this.isSubmit = false + PopupTipPanel.ShowTip(Language[12296]) +end + + return this \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua index 97da5b8390..c2387605ef 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/BattlePanel.lua @@ -331,12 +331,15 @@ function this.BattleEnd(result) or fightType == BATTLE_TYPE.GUILD_BOSS then local levelId = FightPointPassManager.GetCurFightId() NetManager.MapFightResultRequest(10000, "", levelId, fightType, function (msg) - LogPurple("结束的时候确认了?") + -- 结果检测 + if msg.result ~= this.lastBattleResult.result then + BattleRecordManager.SubmitCheckFight() + end + for i=1, #msg.remainHpList do Log(Language[10262]..msg.remainHpList[i]) this.lastBattleResult.hpList[i] = msg.remainHpList[i] end - this.lastBattleResult.drop = msg.enventDrop this.lastBattleResult.missionDrop = msg.missionDrop this.lastBattleResult.result = msg.result @@ -354,17 +357,27 @@ function this.BattleEnd(result) if ExpeditionManager.ExpeditionState == 1 then local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo NetManager.EndExpeditionBattleRequest(GetCurNodeInfo.sortId, "", function (msg) - this.lastBattleResult.result = msg.result - this.lastBattleResult.drop = msg.drop --ExpeditionManager.UpdateHeroHpValue(msg.heroInfo) --ExpeditionManager.UpdateNodeValue(msg) --nodeInfo + if msg.result ~= this.lastBattleResult.result then + BattleRecordManager.SubmitCheckFight() + end + this.lastBattleResult.result = msg.result + this.lastBattleResult.drop = msg.drop this.ShowBattleResult(msg.result, msg) end) else + -- this:ClosePanel() ExpeditionManager.RefreshPanelShowByState() end else + -- 判断是否需要进行结果检测 + if this.fightResult then + if result ~= this.fightResult then + BattleRecordManager.SubmitCheckFight() + end + end -- 直接显示结果 this.ShowBattleResult(result) end