Update - 1.9.0.107

EN: 1.9.0.107
CN: 1.9.0.108
JP: 1.9.0.112
KR: 1.9.0.112
This commit is contained in:
SL1900
2026-05-14 16:00:00 +09:00
parent 4b880806ef
commit eafd8f4088
1034 changed files with 809589 additions and 23067 deletions
@@ -59,7 +59,7 @@ function BattleDamageCtrl:RefreshDamageList()
local nCharSkinId = mapDamage.nSkinId or PlayerData.Char:GetCharSkinId(mapDamage.nCharId)
local mapCharSkin = ConfigTable.GetData_CharacterSkin(nCharSkinId)
local mapCharCfg = ConfigTable.GetData_Character(mapDamage.nCharId)
if mapCharSkin ~= nil and mapCharSkin ~= nil then
if mapCharSkin ~= nil and mapCharCfg ~= nil then
local sFrame = AllEnum.FrameType_New.BoardFrame .. AllEnum.BoardFrameColor[mapCharCfg.Grade]
self:SetPngSprite(imgItemIcon, mapCharSkin.Icon .. AllEnum.CharHeadIconSurfix.XXL)
self:SetAtlasSprite(imgItemRare, "12_rare", sFrame)
@@ -71,8 +71,8 @@ function BattleDamageCtrl:RefreshDamageList()
local nWidth = rtBarBg.sizeDelta.x
local nHeight = rtBarBg.sizeDelta.y
local v2Target = Vector2(nWidth * nPercent, nHeight)
local tweener = rtBar:DOSizeDelta(v2Target, 0.5):SetUpdate(true)
local twTxt = DOTween.To(function()
self.barTweener = rtBar:DOSizeDelta(v2Target, 0.5):SetUpdate(true)
self.txtTweener = DOTween.To(function()
return 0
end, function(value)
NovaAPI.SetTMPText(txtDamagePercent, string.format("%.1f%%", value))
@@ -114,12 +114,16 @@ function BattleDamageCtrl:OnEnable()
EventManager.Hit(EventId.TemporaryBlockInput, 0.3)
end
function BattleDamageCtrl:OnDisable()
if self.barTweener then
self.barTweener:Kill()
end
if self.txtTweener then
self.txtTweener:Kill()
end
end
function BattleDamageCtrl:OnDestroy()
end
function BattleDamageCtrl:OnBtnClick_Close()
self:PlayCloseAnim()
end
function BattleDamageCtrl:OnEvent_AAA()
end
return BattleDamageCtrl
+32 -25
View File
@@ -1,6 +1,5 @@
local BattleResultCtrl = class("BattleResultCtrl", BaseCtrl)
local WwiseManger = CS.WwiseAudioManager.Instance
local GamepadUIManager = require("GameCore.Module.GamepadUIManager")
BattleResultCtrl._mapNodeConfig = {
imgBlurredBg = {},
goComplete = {sComponentName = "GameObject"},
@@ -70,6 +69,11 @@ BattleResultCtrl._mapNodeConfig = {
}
}
BattleResultCtrl._mapEventConfig = {}
local resultType = {
None = 0,
Victory = 1,
Defeat = 2
}
function BattleResultCtrl:Awake()
EventManager.Hit(EventId.AvgBubbleShutDown)
NovaAPI.SetComponentEnableByName(self.gameObject, "Canvas", false)
@@ -78,13 +82,11 @@ function BattleResultCtrl:Awake()
end
function BattleResultCtrl:OnEnable()
local tbParam = self:GetPanelParam()
local nResultState = 0
if #tbParam == 2 and tbParam[1] == false then
nResultState = 3
elseif tbParam[1] then
nResultState = 1
elseif #tbParam == 3 and tbParam[1] == false then
nResultState = 2
local nResultState = resultType.None
if tbParam[1] then
nResultState = resultType.Victory
else
nResultState = resultType.Defeat
end
local nStar = tbParam[2]
local GenerRewardItems = tbParam[3]
@@ -129,9 +131,9 @@ function BattleResultCtrl:OnEnable()
if PlayerData.nCurGameType == AllEnum.WorldMapNodeType.Mainline then
nCurTeam = PlayerData.Mainline.nCurTeamIndex
end
local tbTeamMemberId, nCaptain
local tbTeamMemberId
if tbChar == nil then
nCaptain, tbTeamMemberId = PlayerData.Team:GetTeamData(nCurTeam)
_, tbTeamMemberId = PlayerData.Team:GetTeamData(nCurTeam)
else
tbTeamMemberId = tbChar
end
@@ -144,17 +146,13 @@ function BattleResultCtrl:OnEnable()
if #tbRoleId == 0 then
table.insert(tbRoleId, 112)
end
if bPureAvg then
self._mapNode.trActor2D_PNG.gameObject:SetActive(false)
else
end
WwiseManger:PostEvent("ui_loading_combatSFX_mute", nil, false)
WwiseManger:PostEvent("char_common_all_pause")
WwiseManger:PostEvent("mon_common_all_pause")
WwiseManger:SetState("level", "None")
WwiseManger:SetState("combat", "None")
local nAnimTime
if nResultState == 1 then
if nResultState == resultType.Victory then
WwiseManger:PlaySound("ui_roguelike_victory")
WwiseManger:SetState("system", "victory")
self._mapNode.goRoot.gameObject:SetActive(true)
@@ -187,11 +185,17 @@ function BattleResultCtrl:OnEnable()
nAnimTime = nAnimTime + 1.5
self:AddTimer(1, nAnimTime, "PlayAnim", true, true, true)
EventManager.Hit(EventId.TemporaryBlockInput, nAnimTime)
PlayerData.Voice:PlayBattleResultVoice(tbRoleId, nResultState == 1)
PlayerData.Voice:PlayBattleResultVoice(tbRoleId, nResultState == resultType.Victory)
self.bProcessingClose = false
end
function BattleResultCtrl:OnDisable()
PlayerData.Voice:StopCharVoice()
if self.closeSequence then
self.closeSequence:Kill()
end
if self.bAddLevelEndEvent then
EventManager.Remove("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, self.levelEndCallback)
end
end
function BattleResultCtrl:PlayAnim()
PlayerData.SideBanner:TryOpenSideBanner()
@@ -262,23 +266,26 @@ function BattleResultCtrl:ClosePanel()
NovaAPI.SetCanvasGroupAlpha(self._mapNode.Mask, 0)
self._mapNode.Mask.gameObject:SetActive(true)
EventManager.Hit(EventId.TemporaryBlockInput, 0.5)
local sequence = DOTween.Sequence()
sequence:Append(self._mapNode.Mask:DOFade(1, 0.5):SetUpdate(true))
sequence:AppendCallback(function()
self.closeSequence = DOTween.Sequence()
self.closeSequence:Append(self._mapNode.Mask:DOFade(1, 0.5):SetUpdate(true))
self.closeSequence:AppendCallback(function()
if self.bSuccess then
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
self._mapNode.imgBlurredBg:SetActive(false)
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
else
local function levelEndCallback()
EventManager.Remove("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, levelEndCallback)
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
function self.levelEndCallback()
self.bAddLevelEndEvent = false
EventManager.Remove("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, self.levelEndCallback)
self._mapNode.imgBlurredBg:SetActive(false)
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
end
EventManager.Add("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, levelEndCallback)
self.bAddLevelEndEvent = true
EventManager.Add("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, self.levelEndCallback)
CS.AdventureModuleHelper.LevelStateChanged(true, 0, true)
end
self.closeSequence = nil
end)
sequence:SetUpdate(true)
self.closeSequence:SetUpdate(true)
end
end
function BattleResultCtrl:OnBtnClick_Close(btn)
@@ -18,8 +18,11 @@ function BattleResultMaskCtrl:OnDestroy()
end
function BattleResultMaskCtrl:OnEvent_LoadFinish()
self._mapNode.animRoot:Play("BattleResultMaskPanel_victory_out")
local nAnimTime = NovaAPI.GetAnimClipLength(self._mapNode.animRoot, {
"BattleResultMaskPanel_victory_out"
})
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForSeconds(0.5))
coroutine.yield(CS.UnityEngine.WaitForSeconds(nAnimTime))
EventManager.Hit(EventId.ClosePanel, PanelId.BattleResultMask)
EventManager.Hit("OpenBattleResultPanel")
end
@@ -1,6 +1,5 @@
local DailyInstanceResultCtrl = class("DailyInstanceResultCtrl", BaseCtrl)
local WwiseManger = CS.WwiseAudioManager.Instance
local GamepadUIManager = require("GameCore.Module.GamepadUIManager")
DailyInstanceResultCtrl._mapNodeConfig = {
imgBlurredBg = {},
goComplete = {sComponentName = "GameObject"},
@@ -76,6 +75,11 @@ DailyInstanceResultCtrl._mapNodeConfig = {
}
}
DailyInstanceResultCtrl._mapEventConfig = {}
local resultType = {
None = 0,
Victory = 1,
Defeat = 2
}
local starGachaCfg = {
[1] = {
iconPath = "icon_roguegacha_03%s",
@@ -98,13 +102,11 @@ function DailyInstanceResultCtrl:Awake()
end
function DailyInstanceResultCtrl:OnEnable()
local tbParam = self:GetPanelParam()
local nResultState = 0
if #tbParam == 2 and tbParam[1] == false then
nResultState = 3
elseif tbParam[1] then
nResultState = 1
elseif #tbParam == 3 and tbParam[1] == false then
nResultState = 2
local nResultState = resultType.None
if tbParam[1] then
nResultState = resultType.Victory
else
nResultState = resultType.Defeat
end
local tbStar = tbParam[2]
local GenerRewardItems = tbParam[3]
@@ -122,9 +124,13 @@ function DailyInstanceResultCtrl:OnEnable()
self._mapNode.btnDamageResult[i].gameObject:SetActive(self.tbCharDamage ~= nil and 0 < #self.tbCharDamage)
end
self.mapDailyInstance = ConfigTable.GetData("DailyInstance", nDailyInstanceId)
local sDailyInstanceName = ""
if self.mapDailyInstance ~= nil then
sDailyInstanceName = self.mapDailyInstance.Name
local sDailyInstanceName = self.mapDailyInstance.Name
for _, v in ipairs(self._mapNode.txtMainlineName) do
local sName = orderedFormat(ConfigTable.GetUIText("Dungeon_Difficulty") or "", sDailyInstanceName, ConfigTable.GetUIText("Diffculty_" .. self.mapDailyInstance.Difficulty) or "")
NovaAPI.SetTMPText(v, sName)
end
self:RefreshTarget(tbStar)
end
local nStar = 0
for i = 0, 2 do
@@ -146,19 +152,14 @@ function DailyInstanceResultCtrl:OnEnable()
v.rewardType = AllEnum.RewardType.Three
table.insert(self.mapReward, v)
end
for _, v in ipairs(self._mapNode.txtMainlineName) do
local sName = orderedFormat(ConfigTable.GetUIText("Dungeon_Difficulty") or "", sDailyInstanceName, ConfigTable.GetUIText("Diffculty_" .. self.mapDailyInstance.Difficulty) or "")
NovaAPI.SetTMPText(v, sName)
end
self:RefreshWorldClass(nExp)
self:RefreshTarget(tbStar)
local nCurTeam = 5
if PlayerData.nCurGameType == AllEnum.WorldMapNodeType.Mainline then
nCurTeam = PlayerData.Mainline.nCurTeamIndex
end
local tbTeamMemberId, nCaptain
local tbTeamMemberId
if tbChar == nil then
nCaptain, tbTeamMemberId = PlayerData.Team:GetTeamData(nCurTeam)
_, tbTeamMemberId = PlayerData.Team:GetTeamData(nCurTeam)
else
tbTeamMemberId = tbChar
end
@@ -171,22 +172,18 @@ function DailyInstanceResultCtrl:OnEnable()
if #tbRoleId == 0 then
table.insert(tbRoleId, 112)
end
if bPureAvg then
self._mapNode.trActor2D_PNG.gameObject:SetActive(false)
else
end
WwiseManger:PostEvent("ui_loading_combatSFX_mute", nil, false)
WwiseManger:PostEvent("char_common_all_pause")
WwiseManger:PostEvent("mon_common_all_pause")
WwiseManger:SetState("level", "None")
WwiseManger:SetState("combat", "None")
local nAnimTime
if nResultState == 1 then
if nResultState == resultType.Victory then
self._mapNode.goRoot.gameObject:SetActive(true)
self._mapNode.goFailed:SetActive(false)
self._mapNode.imgBlurredBg.gameObject:SetActive(false)
self._mapNode.goComplete:SetActive(true)
CS.WwiseAudioManager.Instance:PlaySound("ui_roguelike_victory")
WwiseManger:PlaySound("ui_roguelike_victory")
WwiseManger:SetState("system", "victory")
nAnimTime = 4
else
@@ -217,11 +214,17 @@ function DailyInstanceResultCtrl:OnEnable()
nAnimTime = nAnimTime + 1.5
EventManager.Hit(EventId.TemporaryBlockInput, nAnimTime)
self:AddTimer(1, nAnimTime, "PlayAnim", true, true, true)
PlayerData.Voice:PlayBattleResultVoice(tbRoleId, nResultState == 1)
PlayerData.Voice:PlayBattleResultVoice(tbRoleId, nResultState == resultType.Victory)
end
function DailyInstanceResultCtrl:OnDisable()
PlayerData.DailyInstance:SetSettlementState(false)
PlayerData.Voice:StopCharVoice()
if self.closeSequence then
self.closeSequence:Kill()
end
if self.bAddLevelEndEvent then
EventManager.Remove("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, self.levelEndCallback)
end
end
function DailyInstanceResultCtrl:PlayAnim()
PlayerData.SideBanner:TryOpenSideBanner()
@@ -300,23 +303,26 @@ function DailyInstanceResultCtrl:ClosePanel()
NovaAPI.SetCanvasGroupAlpha(self._mapNode.Mask, 0)
self._mapNode.Mask.gameObject:SetActive(true)
EventManager.Hit(EventId.TemporaryBlockInput, 0.5)
local sequence = DOTween.Sequence()
sequence:Append(self._mapNode.Mask:DOFade(1, 0.5):SetUpdate(true))
sequence:AppendCallback(function()
self.closeSequence = DOTween.Sequence()
self.closeSequence:Append(self._mapNode.Mask:DOFade(1, 0.5):SetUpdate(true))
self.closeSequence:AppendCallback(function()
if self.bSuccess then
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
self._mapNode.imgBlurredBg:SetActive(false)
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
else
local function levelEndCallback()
EventManager.Remove("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, levelEndCallback)
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
function self.levelEndCallback()
self.bAddLevelEndEvent = false
EventManager.Remove("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, self.levelEndCallback)
self._mapNode.imgBlurredBg:SetActive(false)
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
end
EventManager.Add("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, levelEndCallback)
self.bAddLevelEndEvent = true
EventManager.Add("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, self.levelEndCallback)
CS.AdventureModuleHelper.LevelStateChanged(true, 0, true)
end
self.closeSequence = nil
end)
sequence:SetUpdate(true)
self.closeSequence:SetUpdate(true)
end
end
function DailyInstanceResultCtrl:RefreshGacha()
@@ -1,6 +1,5 @@
local EquipmentInstanceResultCtrl = class("EquipmentInstanceResultCtrl", BaseCtrl)
local WwiseManger = CS.WwiseAudioManager.Instance
local GamepadUIManager = require("GameCore.Module.GamepadUIManager")
EquipmentInstanceResultCtrl._mapNodeConfig = {
imgBlurredBg = {},
goComplete = {sComponentName = "GameObject"},
@@ -91,6 +90,11 @@ local starGachaCfg = {
animName = "BattleResultgoGacha_ssr"
}
}
local resultType = {
None = 0,
Victory = 1,
Defeat = 2
}
function EquipmentInstanceResultCtrl:Awake()
self.canvas = self.gameObject:GetComponent("Canvas")
EventManager.Hit(EventId.AvgBubbleShutDown)
@@ -99,13 +103,11 @@ function EquipmentInstanceResultCtrl:Awake()
end
function EquipmentInstanceResultCtrl:OnEnable()
local tbParam = self:GetPanelParam()
local nResultState = 0
if #tbParam == 2 and tbParam[1] == false then
nResultState = 3
elseif tbParam[1] then
nResultState = 1
elseif #tbParam == 3 and tbParam[1] == false then
nResultState = 2
local nResultState = resultType.None
if tbParam[1] then
nResultState = resultType.Victory
else
nResultState = resultType.Defeat
end
local tbStar = tbParam[2]
local GenerRewardItems = tbParam[3]
@@ -124,9 +126,13 @@ function EquipmentInstanceResultCtrl:OnEnable()
self._mapNode.btnDamageResult[i].gameObject:SetActive(self.tbCharDamage ~= nil and 0 < #self.tbCharDamage)
end
self.mapEquipmentInstance = ConfigTable.GetData("CharGemInstance", nEquipmentInstanceId)
local sEquipmentInstanceName = ""
if self.mapEquipmentInstance ~= nil then
sEquipmentInstanceName = self.mapEquipmentInstance.Name
local sEquipmentInstanceName = self.mapEquipmentInstance.Name
for _, v in ipairs(self._mapNode.txtMainlineName) do
local sName = orderedFormat(ConfigTable.GetUIText("Dungeon_Difficulty") or "", sEquipmentInstanceName, ConfigTable.GetUIText("Diffculty_" .. self.mapEquipmentInstance.Difficulty) or "")
NovaAPI.SetTMPText(v, sName)
end
self:RefreshTarget(tbStar)
end
local nStar = 0
for i = 0, 2 do
@@ -152,19 +158,14 @@ function EquipmentInstanceResultCtrl:OnEnable()
v.rewardType = AllEnum.RewardType.Extra
table.insert(self.mapReward, v)
end
for _, v in ipairs(self._mapNode.txtMainlineName) do
local sName = orderedFormat(ConfigTable.GetUIText("Dungeon_Difficulty") or "", sEquipmentInstanceName, ConfigTable.GetUIText("Diffculty_" .. self.mapEquipmentInstance.Difficulty) or "")
NovaAPI.SetTMPText(v, sName)
end
self:RefreshWorldClass(nExp)
self:RefreshTarget(tbStar)
local nCurTeam = 5
if PlayerData.nCurGameType == AllEnum.WorldMapNodeType.Mainline then
nCurTeam = PlayerData.Mainline.nCurTeamIndex
end
local tbTeamMemberId, nCaptain
local tbTeamMemberId
if tbChar == nil then
nCaptain, tbTeamMemberId = PlayerData.Team:GetTeamData(nCurTeam)
_, tbTeamMemberId = PlayerData.Team:GetTeamData(nCurTeam)
else
tbTeamMemberId = tbChar
end
@@ -177,17 +178,13 @@ function EquipmentInstanceResultCtrl:OnEnable()
if #tbRoleId == 0 then
table.insert(tbRoleId, 112)
end
if bPureAvg then
self._mapNode.trActor2D_PNG.gameObject:SetActive(false)
else
end
WwiseManger:PostEvent("ui_loading_combatSFX_mute", nil, false)
WwiseManger:PostEvent("char_common_all_pause")
WwiseManger:PostEvent("mon_common_all_pause")
WwiseManger:SetState("level", "None")
WwiseManger:SetState("combat", "None")
local nAnimTime
if nResultState == 1 then
local nAnimTime = 0
if nResultState == resultType.Victory then
self._mapNode.goRoot.gameObject:SetActive(true)
self._mapNode.goFailed:SetActive(false)
self._mapNode.imgBlurredBg.gameObject:SetActive(false)
@@ -223,12 +220,18 @@ function EquipmentInstanceResultCtrl:OnEnable()
nAnimTime = nAnimTime + 1.5
EventManager.Hit(EventId.TemporaryBlockInput, nAnimTime)
self:AddTimer(1, nAnimTime, "PlayAnim", true, true, true)
PlayerData.Voice:PlayBattleResultVoice(tbRoleId, nResultState == 1)
PlayerData.Voice:PlayBattleResultVoice(tbRoleId, nResultState == resultType.Victory)
self.bProcessingClose = false
end
function EquipmentInstanceResultCtrl:OnDisable()
PlayerData.EquipmentInstance:SetSettlementState(false)
PlayerData.Voice:StopCharVoice()
if self.closeSequence then
self.closeSequence:Kill()
end
if self.bAddLevelEndEvent then
EventManager.Remove("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, self.levelEndCallback)
end
end
function EquipmentInstanceResultCtrl:PlayAnim()
PlayerData.SideBanner:TryOpenSideBanner()
@@ -276,15 +279,15 @@ function EquipmentInstanceResultCtrl:RefreshWorldClass(nExp)
end
end
function EquipmentInstanceResultCtrl:RefreshTarget(tbStar)
local tbCond = {}
table.insert(tbCond, decodeJson(self.mapEquipmentInstance.OneStarCondition))
table.insert(tbCond, decodeJson(self.mapEquipmentInstance.TwoStarCondition))
table.insert(tbCond, decodeJson(self.mapEquipmentInstance.ThreeStarCondition))
for i = 1, 3 do
local tr = self._mapNode.getStar[i]
local star = tr:Find("star"):GetComponent("Transform")
local starPass = star:Find("starPass")
local txtCondition = tr:Find("texCondition"):GetComponent("TMP_Text")
local tbCond = {}
table.insert(tbCond, decodeJson(self.mapEquipmentInstance.OneStarCondition))
table.insert(tbCond, decodeJson(self.mapEquipmentInstance.TwoStarCondition))
table.insert(tbCond, decodeJson(self.mapEquipmentInstance.ThreeStarCondition))
local cond = tbCond[i]
if cond ~= nil then
local _floorData = ConfigTable.GetData("CharGemInstanceFloor", self.mapEquipmentInstance.FloorId)
@@ -314,23 +317,26 @@ function EquipmentInstanceResultCtrl:ClosePanel()
NovaAPI.SetCanvasGroupAlpha(self._mapNode.Mask, 0)
self._mapNode.Mask.gameObject:SetActive(true)
EventManager.Hit(EventId.TemporaryBlockInput, 0.5)
local sequence = DOTween.Sequence()
sequence:Append(self._mapNode.Mask:DOFade(1, 0.5):SetUpdate(true))
sequence:AppendCallback(function()
self.closeSequence = DOTween.Sequence()
self.closeSequence:Append(self._mapNode.Mask:DOFade(1, 0.5):SetUpdate(true))
self.closeSequence:AppendCallback(function()
if self.bSuccess then
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
self._mapNode.imgBlurredBg:SetActive(false)
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
else
local function levelEndCallback()
EventManager.Remove("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, levelEndCallback)
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
function self.levelEndCallback()
self.bAddLevelEndEvent = false
EventManager.Remove("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, self.levelEndCallback)
self._mapNode.imgBlurredBg:SetActive(false)
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
end
EventManager.Add("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, levelEndCallback)
self.bAddLevelEndEvent = true
EventManager.Add("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, self.levelEndCallback)
CS.AdventureModuleHelper.LevelStateChanged(true, 0, true)
end
self.closeSequence = nil
end)
sequence:SetUpdate(true)
self.closeSequence:SetUpdate(true)
end
end
function EquipmentInstanceResultCtrl:RefreshGacha()
@@ -1,6 +1,5 @@
local SkillInstanceResultCtrl = class("SkillInstanceResultCtrl", BaseCtrl)
local WwiseManger = CS.WwiseAudioManager.Instance
local GamepadUIManager = require("GameCore.Module.GamepadUIManager")
SkillInstanceResultCtrl._mapNodeConfig = {
imgBlurredBg = {},
goComplete = {sComponentName = "GameObject"},
@@ -91,6 +90,11 @@ local starGachaCfg = {
animName = "BattleResultgoGacha_ssr"
}
}
local resultType = {
None = 0,
Victory = 1,
Defeat = 2
}
function SkillInstanceResultCtrl:Awake()
self.canvas = self.gameObject:GetComponent("Canvas")
EventManager.Hit(EventId.AvgBubbleShutDown)
@@ -99,13 +103,11 @@ function SkillInstanceResultCtrl:Awake()
end
function SkillInstanceResultCtrl:OnEnable()
local tbParam = self:GetPanelParam()
local nResultState = 0
if #tbParam == 2 and tbParam[1] == false then
nResultState = 3
elseif tbParam[1] then
nResultState = 1
elseif #tbParam == 3 and tbParam[1] == false then
nResultState = 2
local nResultState = resultType.None
if tbParam[1] then
nResultState = resultType.Victory
else
nResultState = resultType.Defeat
end
local tbStar = tbParam[2]
local GenerRewardItems = tbParam[3]
@@ -124,9 +126,13 @@ function SkillInstanceResultCtrl:OnEnable()
self._mapNode.btnDamageResult[i].gameObject:SetActive(self.tbCharDamage ~= nil and 0 < #self.tbCharDamage)
end
self.mapSkillInstance = ConfigTable.GetData("SkillInstance", nSkillInstanceId)
local sSkillInstanceName = ""
if self.mapSkillInstance ~= nil then
sSkillInstanceName = self.mapSkillInstance.Name
local sSkillInstanceName = self.mapSkillInstance.Name
for _, v in ipairs(self._mapNode.txtMainlineName) do
local sName = orderedFormat(ConfigTable.GetUIText("Dungeon_Difficulty") or "", sSkillInstanceName, ConfigTable.GetUIText("Diffculty_" .. self.mapSkillInstance.Difficulty) or "")
NovaAPI.SetTMPText(v, sName)
end
self:RefreshTarget(tbStar)
end
local nStar = 0
for i = 0, 2 do
@@ -152,19 +158,14 @@ function SkillInstanceResultCtrl:OnEnable()
v.rewardType = AllEnum.RewardType.Extra
table.insert(self.mapReward, v)
end
for _, v in ipairs(self._mapNode.txtMainlineName) do
local sName = orderedFormat(ConfigTable.GetUIText("Dungeon_Difficulty") or "", sSkillInstanceName, ConfigTable.GetUIText("Diffculty_" .. self.mapSkillInstance.Difficulty) or "")
NovaAPI.SetTMPText(v, sName)
end
self:RefreshWorldClass(nExp)
self:RefreshTarget(tbStar)
local nCurTeam = 5
if PlayerData.nCurGameType == AllEnum.WorldMapNodeType.Mainline then
nCurTeam = PlayerData.Mainline.nCurTeamIndex
end
local tbTeamMemberId, nCaptain
local tbTeamMemberId
if tbChar == nil then
nCaptain, tbTeamMemberId = PlayerData.Team:GetTeamData(nCurTeam)
_, tbTeamMemberId = PlayerData.Team:GetTeamData(nCurTeam)
else
tbTeamMemberId = tbChar
end
@@ -177,17 +178,13 @@ function SkillInstanceResultCtrl:OnEnable()
if #tbRoleId == 0 then
table.insert(tbRoleId, 112)
end
if bPureAvg then
self._mapNode.trActor2D_PNG.gameObject:SetActive(false)
else
end
WwiseManger:PostEvent("ui_loading_combatSFX_mute", nil, false)
WwiseManger:PostEvent("char_common_all_pause")
WwiseManger:PostEvent("mon_common_all_pause")
WwiseManger:SetState("level", "None")
WwiseManger:SetState("combat", "None")
local nAnimTime
if nResultState == 1 then
if nResultState == resultType.Victory then
self._mapNode.goRoot.gameObject:SetActive(true)
self._mapNode.goFailed:SetActive(false)
self._mapNode.imgBlurredBg.gameObject:SetActive(false)
@@ -223,12 +220,18 @@ function SkillInstanceResultCtrl:OnEnable()
nAnimTime = nAnimTime + 1.5
EventManager.Hit(EventId.TemporaryBlockInput, nAnimTime)
self:AddTimer(1, nAnimTime, "PlayAnim", true, true, true)
PlayerData.Voice:PlayBattleResultVoice(tbRoleId, nResultState == 1)
PlayerData.Voice:PlayBattleResultVoice(tbRoleId, nResultState == resultType.Victory)
self.bProcessingClose = false
end
function SkillInstanceResultCtrl:OnDisable()
PlayerData.SkillInstance:SetSettlementState(false)
PlayerData.Voice:StopCharVoice()
if self.closeSequence then
self.closeSequence:Kill()
end
if self.bAddLevelEndEvent then
EventManager.Remove("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, self.levelEndCallback)
end
end
function SkillInstanceResultCtrl:PlayAnim()
PlayerData.SideBanner:TryOpenSideBanner()
@@ -276,15 +279,15 @@ function SkillInstanceResultCtrl:RefreshWorldClass(nExp)
end
end
function SkillInstanceResultCtrl:RefreshTarget(tbStar)
local tbCond = {}
table.insert(tbCond, decodeJson(self.mapSkillInstance.OneStarCondition))
table.insert(tbCond, decodeJson(self.mapSkillInstance.TwoStarCondition))
table.insert(tbCond, decodeJson(self.mapSkillInstance.ThreeStarCondition))
for i = 1, 3 do
local tr = self._mapNode.getStar[i]
local star = tr:Find("star"):GetComponent("Transform")
local starPass = star:Find("starPass")
local txtCondition = tr:Find("texCondition"):GetComponent("TMP_Text")
local tbCond = {}
table.insert(tbCond, decodeJson(self.mapSkillInstance.OneStarCondition))
table.insert(tbCond, decodeJson(self.mapSkillInstance.TwoStarCondition))
table.insert(tbCond, decodeJson(self.mapSkillInstance.ThreeStarCondition))
local cond = tbCond[i]
if cond ~= nil then
local _floorData = ConfigTable.GetData("SkillInstanceFloor", self.mapSkillInstance.FloorId)
@@ -314,23 +317,26 @@ function SkillInstanceResultCtrl:ClosePanel()
NovaAPI.SetCanvasGroupAlpha(self._mapNode.Mask, 0)
self._mapNode.Mask.gameObject:SetActive(true)
EventManager.Hit(EventId.TemporaryBlockInput, 0.5)
local sequence = DOTween.Sequence()
sequence:Append(self._mapNode.Mask:DOFade(1, 0.5):SetUpdate(true))
sequence:AppendCallback(function()
self.closeSequence = DOTween.Sequence()
self.closeSequence:Append(self._mapNode.Mask:DOFade(1, 0.5):SetUpdate(true))
self.closeSequence:AppendCallback(function()
if self.bSuccess then
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
self._mapNode.imgBlurredBg:SetActive(false)
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
else
local function levelEndCallback()
EventManager.Remove("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, levelEndCallback)
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
function self.levelEndCallback()
self.bAddLevelEndEvent = false
EventManager.Remove("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, self.levelEndCallback)
self._mapNode.imgBlurredBg:SetActive(false)
NovaAPI.EnterModule("MainMenuModuleScene", true, 17)
end
EventManager.Add("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, levelEndCallback)
self.bAddLevelEndEvent = true
EventManager.Add("ADVENTURE_LEVEL_UNLOAD_COMPLETE", self, self.levelEndCallback)
CS.AdventureModuleHelper.LevelStateChanged(true, 0, true)
end
self.closeSequence = nil
end)
sequence:SetUpdate(true)
self.closeSequence:SetUpdate(true)
end
end
function SkillInstanceResultCtrl:RefreshGacha()