挑战副本bug修改

dev_chengFeng
yuanshuai 2022-04-19 16:14:55 +08:00
parent 24bf6c63e4
commit 3c72cd688b
2 changed files with 8 additions and 2 deletions

View File

@ -299,6 +299,12 @@ function this:SetResult(result)
this.fightResult = result
end
-- 外部数据传递
function this:SetExternalData(externalData)
this.externalData = externalData
end
-- 外部调用
function this:ShowNameShow(result, str)
this.fightResult = result
@ -595,7 +601,7 @@ function this.ShowBattleResult(result, msg)
elseif fightType == BATTLE_TYPE.LINGMAIMIJING then
this:ClosePanel()
elseif BattleManager.GetLastBattleType() == BATTLE_TYPE.CHALLENG_COPY_1 or BattleManager.GetLastBattleType() == BATTLE_TYPE.CHALLENG_COPY_2 then
if this.fightResult==0 then --失败
if this.externalData==0 then --this.externalData后端传的战斗结果
local haveRecord = BattleRecordManager.isHaveRecord()
UIManager.OpenPanel(UIName.BattleFailPopup, this, haveRecord,nil,fightType)
else

View File

@ -71,7 +71,7 @@ function this.StartFight()
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1)
this.root:ClosePanel()
end)
battlePanel:SetResult(msg.result)
battlePanel:SetExternalData(msg.result)
if msg.result==1 then
CarbonManager.UpdateChallengeCopyFloor(this.data.Chapter)
end