From 6d5e17f1a6e8c8c4cb2e05a23b98417bb51f6b52 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 2 Nov 2020 16:05:24 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=8A=A8=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E4=B8=8D=E4=B8=80=E8=87=B4=E7=9A=84=E6=88=98?= =?UTF-8?q?=E6=96=97=E6=95=B0=E6=8D=AE=E7=9A=84=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Battle/BattleRecordManager.lua | 17 ++++++++++++++- .../~Lua/Modules/Battle/View/BattlePanel.lua | 21 +++++++++++++++---- 2 files changed, 33 insertions(+), 5 deletions(-) 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