挑战副本脚本修改

dev_chengFeng
yuanshuai 2022-04-19 15:52:50 +08:00
parent c5b0d30f9c
commit 24bf6c63e4
3 changed files with 14 additions and 4 deletions

View File

@ -594,8 +594,13 @@ function this.ShowBattleResult(result, msg)
this.ShowBattleResultByTaSuiLingXiao()
elseif fightType == BATTLE_TYPE.LINGMAIMIJING then
this:ClosePanel()
elseif fightType == BATTLE_TYPE.CHALLENG_COPY_1 or fightType == BATTLE_TYPE.CHALLENG_COPY_2 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 --失败
local haveRecord = BattleRecordManager.isHaveRecord()
UIManager.OpenPanel(UIName.BattleFailPopup, this, haveRecord,nil,fightType)
else
this:ClosePanel()
end
else
LogRed("result:"..tostring(result))
if result == 0 then -- 失败

View File

@ -1090,6 +1090,9 @@ function this.CheckChallengeCopyId(type,id)
end
---更新挑战层数
function this.UpdateChallengeCopyFloor(_type)
if _type==2 and this.challengeCopyDataTable[_type].currentFloor==0 then
this.challengeCopyDataTable[_type].currentFloor=1000
end
this.challengeCopyDataTable[_type].currentFloor=this.challengeCopyDataTable[_type].currentFloor+1
end
--检测副本是否开启

View File

@ -66,14 +66,16 @@ function this.StartFight()
else
battleType=BATTLE_TYPE.CHALLENG_COPY_2
end
UIManager.OpenPanel(UIName.BattlePanel, fightData, battleType , function()
local battlePanel= UIManager.OpenPanel(UIName.BattlePanel, fightData, battleType , function()
LogGreen("222222战斗结果"..msg.result)
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1)
this.root:ClosePanel()
end)
battlePanel:SetResult(msg.result)
if msg.result==1 then
CarbonManager.UpdateChallengeCopyFloor(this.data.Chapter)
end
this.root:ClosePanel()
end)
end