Update - 1.7.0.92
EN: 1.7.0.92 CN: 1.7.0.94 JP: 1.7.0.95 KR: 1.7.0.98
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
local JointDrillLevelData_2 = class("JointDrillLevelData_2")
|
||||
local FP = CS.TrueSync.FP
|
||||
local PB = require("pb")
|
||||
local AdventureModuleHelper = CS.AdventureModuleHelper
|
||||
local TimerManager = require("GameCore.Timer.TimerManager")
|
||||
local LocalData = require("GameCore.Data.LocalData")
|
||||
local ModuleManager = require("GameCore.Module.ModuleManager")
|
||||
local mapEventConfig = {
|
||||
LoadLevelRefresh = "OnEvent_LoadLevelRefresh",
|
||||
AdventureModuleEnter = "OnEvent_AdventureModuleEnter",
|
||||
@@ -197,27 +195,30 @@ end
|
||||
function JointDrillLevelData_2:CheckJointDrillGameOver()
|
||||
local nChallengeCount = self.parent:GetJointDrillBattleCount()
|
||||
local nAllChallengeCount = self.parent:GetMaxChallengeCount(self.nLevelId)
|
||||
if nChallengeCount >= nAllChallengeCount then
|
||||
local callback = function(netMsg)
|
||||
self:JointDrillFail(AllEnum.JointDrillResultType.ChallengeEnd, netMsg, self.nCurLevel)
|
||||
end
|
||||
self.parent:JointDrillGameOver(callback)
|
||||
else
|
||||
function self.recordCallback(sRecord)
|
||||
function self.recordCallback(sRecord)
|
||||
if nChallengeCount >= nAllChallengeCount then
|
||||
local syncCallback = function()
|
||||
local callback = function(netMsg)
|
||||
self:JointDrillFail(AllEnum.JointDrillResultType.ChallengeEnd, netMsg, self.nCurLevel)
|
||||
end
|
||||
self.parent:JointDrillGameOver(callback)
|
||||
end
|
||||
self.parent:JointDrillSync(self.nCurLevel, self.nGameTime, self.nDamageValue, "", syncCallback)
|
||||
else
|
||||
local callback = function(netMsg)
|
||||
self:JointDrillFail(AllEnum.JointDrillResultType.BattleEnd, netMsg, self.nCurLevel)
|
||||
end
|
||||
self.parent:JointDrillGiveUp(self.nCurLevel, self.nGameTime, self.nDamageValue, sRecord, callback)
|
||||
end
|
||||
NovaAPI.DispatchEventWithData("JointDrill_CacheTempData_Start", nil, {
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
0,
|
||||
0
|
||||
})
|
||||
end
|
||||
NovaAPI.DispatchEventWithData("JointDrill_CacheTempData_Start", nil, {
|
||||
false,
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
0,
|
||||
0
|
||||
})
|
||||
end
|
||||
function JointDrillLevelData_2:JointDrillFail(nResultType, netMsg, nLevel)
|
||||
local bossInfo = {}
|
||||
@@ -376,6 +377,11 @@ function JointDrillLevelData_2:OnEvent_BattleLvsToggle()
|
||||
EventManager.Hit("ResetBossHUD")
|
||||
end
|
||||
function JointDrillLevelData_2:OnEvent_UnloadComplete()
|
||||
if self.bInErrorResult then
|
||||
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
|
||||
self.bInErrorResult = false
|
||||
return
|
||||
end
|
||||
if self.bInResult == true then
|
||||
return
|
||||
end
|
||||
@@ -452,7 +458,11 @@ function JointDrillLevelData_2:OnEvent_JointDrillChallengeFinishError()
|
||||
if self.parent:CheckJointDrillInBattle() then
|
||||
self.parent:JointDrillGameOver(nil, true)
|
||||
else
|
||||
self:JointDrillFail(AllEnum.JointDrillResultType.ChallengeEnd, nil, self.nCurLevel)
|
||||
local bInAdventure = ModuleManager.GetIsAdventure()
|
||||
if bInAdventure then
|
||||
self.bInErrorResult = true
|
||||
AdventureModuleHelper.LevelStateChanged(true, 0, true)
|
||||
end
|
||||
local wait = function()
|
||||
coroutine.yield(CS.UnityEngine.WaitForEndOfFrame())
|
||||
self.parent:SetResetLevelSelect(true)
|
||||
|
||||
Reference in New Issue
Block a user