【战斗】前端添加自动上传结果不一致的战斗数据的功能。
parent
df8f8d6dd0
commit
acaece5483
|
@ -182,10 +182,25 @@ function this.SubmitBattleRecord()
|
||||||
end
|
end
|
||||||
local _, rcd = this.isHaveRecord()
|
local _, rcd = this.isHaveRecord()
|
||||||
if rcd then
|
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
|
end
|
||||||
this.isSubmit = false
|
this.isSubmit = false
|
||||||
PopupTipPanel.ShowTip(Language[12296])
|
PopupTipPanel.ShowTip(Language[12296])
|
||||||
end
|
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
|
return this
|
|
@ -331,12 +331,15 @@ function this.BattleEnd(result)
|
||||||
or fightType == BATTLE_TYPE.GUILD_BOSS then
|
or fightType == BATTLE_TYPE.GUILD_BOSS then
|
||||||
local levelId = FightPointPassManager.GetCurFightId()
|
local levelId = FightPointPassManager.GetCurFightId()
|
||||||
NetManager.MapFightResultRequest(10000, "", levelId, fightType, function (msg)
|
NetManager.MapFightResultRequest(10000, "", levelId, fightType, function (msg)
|
||||||
LogPurple("结束的时候确认了?")
|
-- 结果检测
|
||||||
|
if msg.result ~= this.lastBattleResult.result then
|
||||||
|
BattleRecordManager.SubmitCheckFight()
|
||||||
|
end
|
||||||
|
|
||||||
for i=1, #msg.remainHpList do
|
for i=1, #msg.remainHpList do
|
||||||
Log(Language[10262]..msg.remainHpList[i])
|
Log(Language[10262]..msg.remainHpList[i])
|
||||||
this.lastBattleResult.hpList[i] = msg.remainHpList[i]
|
this.lastBattleResult.hpList[i] = msg.remainHpList[i]
|
||||||
end
|
end
|
||||||
|
|
||||||
this.lastBattleResult.drop = msg.enventDrop
|
this.lastBattleResult.drop = msg.enventDrop
|
||||||
this.lastBattleResult.missionDrop = msg.missionDrop
|
this.lastBattleResult.missionDrop = msg.missionDrop
|
||||||
this.lastBattleResult.result = msg.result
|
this.lastBattleResult.result = msg.result
|
||||||
|
@ -354,17 +357,27 @@ function this.BattleEnd(result)
|
||||||
if ExpeditionManager.ExpeditionState == 1 then
|
if ExpeditionManager.ExpeditionState == 1 then
|
||||||
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo
|
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo
|
||||||
NetManager.EndExpeditionBattleRequest(GetCurNodeInfo.sortId, "", function (msg)
|
NetManager.EndExpeditionBattleRequest(GetCurNodeInfo.sortId, "", function (msg)
|
||||||
this.lastBattleResult.result = msg.result
|
|
||||||
this.lastBattleResult.drop = msg.drop
|
|
||||||
--ExpeditionManager.UpdateHeroHpValue(msg.heroInfo)
|
--ExpeditionManager.UpdateHeroHpValue(msg.heroInfo)
|
||||||
--ExpeditionManager.UpdateNodeValue(msg) --nodeInfo
|
--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)
|
this.ShowBattleResult(msg.result, msg)
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
|
--
|
||||||
this:ClosePanel()
|
this:ClosePanel()
|
||||||
ExpeditionManager.RefreshPanelShowByState()
|
ExpeditionManager.RefreshPanelShowByState()
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
-- 判断是否需要进行结果检测
|
||||||
|
if this.fightResult then
|
||||||
|
if result ~= this.fightResult then
|
||||||
|
BattleRecordManager.SubmitCheckFight()
|
||||||
|
end
|
||||||
|
end
|
||||||
-- 直接显示结果
|
-- 直接显示结果
|
||||||
this.ShowBattleResult(result)
|
this.ShowBattleResult(result)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue