【战斗】前端添加自动上传结果不一致的战斗数据的功能。
parent
df8f8d6dd0
commit
acaece5483
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue