Update - 1.12.0.120

EN: 1.12.0.120
CN: 1.12.0.120
JP: 1.12.0.124
KR: 1.12.0.124
This commit is contained in:
SL1900
2026-06-30 14:30:00 +09:00
parent 061d344bf2
commit 80af235e05
826 changed files with 625145 additions and 81163 deletions
+35 -26
View File
@@ -147,7 +147,8 @@ function BattlePassCtrl:OnEnable()
end
self.mapBattlePassInfo = mapData
self._mapNode.panelRoot.gameObject:SetActive(true)
local bHasComplete, nQuestIdx = self:Refresh()
local bHasComplete, nQuestIdx, bQuestAllComplete, bFullLevel = self:Refresh()
local bHasRewardReceive = self._mapNode.rt_RewardList.bAllReceive
EventManager.Hit(EventId.SetTransition)
self._mapNode.rtMainContent:Play("BattlePassPanel_in")
self._mapNode.rt_RewardList:PlayInAnim()
@@ -167,7 +168,14 @@ function BattlePassCtrl:OnEnable()
if nQuestIdx ~= 0 then
self._mapNode.rt_QuestList:SetToggle(nQuestIdx)
end
if bHasComplete or self._panel.tog == 2 then
if not (not bHasRewardReceive or bHasComplete) or bFullLevel or self._panel.tog == 1 then
self.curTog = 1
self._mapNode.rtToggleTop:SetState(false)
NovaAPI.SetCanvasGroupAlpha(self._mapNode.CGReward, 1)
NovaAPI.SetCanvasGroupBlocksRaycasts(self._mapNode.CGReward, true)
NovaAPI.SetCanvasGroupAlpha(self._mapNode.CGQuest, 0)
NovaAPI.SetCanvasGroupBlocksRaycasts(self._mapNode.CGQuest, false)
else
self.curTog = 2
self._panel.tog = 2
self._mapNode.rtToggleTop:SetState(true)
@@ -175,13 +183,6 @@ function BattlePassCtrl:OnEnable()
NovaAPI.SetCanvasGroupBlocksRaycasts(self._mapNode.CGReward, false)
NovaAPI.SetCanvasGroupAlpha(self._mapNode.CGQuest, 1)
NovaAPI.SetCanvasGroupBlocksRaycasts(self._mapNode.CGQuest, true)
else
self.curTog = 1
self._mapNode.rtToggleTop:SetState(false)
NovaAPI.SetCanvasGroupAlpha(self._mapNode.CGReward, 1)
NovaAPI.SetCanvasGroupBlocksRaycasts(self._mapNode.CGReward, true)
NovaAPI.SetCanvasGroupAlpha(self._mapNode.CGQuest, 0)
NovaAPI.SetCanvasGroupBlocksRaycasts(self._mapNode.CGQuest, false)
end
self._mapNode.rt_RewardList:SetLevelPos()
if self._panel.bOpenPremium then
@@ -231,14 +232,16 @@ function BattlePassCtrl:Refresh()
end
NovaAPI.SetTMPText(self._mapNode.TMPLevel, self.mapBattlePassInfo.nLevel)
local bFullLevel = false
if ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1) == nil then
if ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false) == nil then
bFullLevel = true
self._mapNode.TMPProgress.gameObject:SetActive(false)
NovaAPI.SetTMPText(self._mapNode.TMPProgress, string.format("%d/%d", self.mapBattlePassInfo.nExp, self.mapBattlePassInfo.nExp))
self._mapNode.imgProgressBarFillMask.sizeDelta = Vector2(nExpBarLength, nExpBarHeight)
self._mapNode.btnLevelDetail.gameObject:SetActive(false)
self._mapNode.TMPLevelMax.gameObject:SetActive(true)
else
local nExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1).Exp
self._mapNode.TMPProgress.gameObject:SetActive(true)
local nExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false).Exp
NovaAPI.SetTMPText(self._mapNode.TMPProgress, string.format("%d/%d", self.mapBattlePassInfo.nExp, nExp))
self._mapNode.imgProgressBarFillMask.sizeDelta = Vector2(nExpBarLength * self.mapBattlePassInfo.nExp / nExp, nExpBarHeight)
self._mapNode.btnLevelDetail.gameObject:SetActive(true)
@@ -254,9 +257,9 @@ function BattlePassCtrl:Refresh()
else
self._mapNode.rtCoverRoot.localScale = Vector3.zero
end
local bHasComplete, nQuestIdx = self._mapNode.rt_QuestList:Refresh(self.mapBattlePassInfo.nExpThisWeek, self.mapBattlePassInfo.nLevel, true)
local bHasComplete, nQuestIdx, bQuestAllComplete = self._mapNode.rt_QuestList:Refresh(self.mapBattlePassInfo.nExpThisWeek, self.mapBattlePassInfo.nLevel, true)
self._mapNode.rt_RewardList:Refresh(self.mapBattlePassInfo.tbReward, 0 < self.mapBattlePassInfo.nCurMode, self.mapBattlePassInfo.nLevel)
return bHasComplete and not bFullLevel, nQuestIdx
return bHasComplete and not bFullLevel, nQuestIdx, bQuestAllComplete, bFullLevel
end
function BattlePassCtrl:SwitchShowDiscAnim()
if self.tbDisc ~= nil and #self.tbDisc > 0 then
@@ -387,8 +390,8 @@ function BattlePassCtrl:OnEvent_BattlePassQuestReceive()
nMaxLevel = -1,
nMaxExp = 1
}
if ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1) ~= nil then
mapBefore.nMaxExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1).Exp
if ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false) ~= nil then
mapBefore.nMaxExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false).Exp
end
local callback = function(mapData)
self.mapBattlePassInfo = mapData
@@ -400,12 +403,12 @@ function BattlePassCtrl:OnEvent_BattlePassQuestReceive()
nMaxLevel = -1,
nMaxExp = 0
}
if ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1) == nil then
if ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false) == nil then
mapAfter.nExp = 1
mapAfter.nMaxExp = 1
mapAfter.nMaxLevel = afterLevel
else
mapAfter.nMaxExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1).Exp
mapAfter.nMaxExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false).Exp
end
local animCallback = function()
if beforeLevel ~= afterLevel then
@@ -421,13 +424,15 @@ function BattlePassCtrl:OnEvent_BattlePassQuestReceive()
EventManager.Hit(EventId.OpenPanel, PanelId.BattlePassUpgrade, callabck, mapLevelData)
end
NovaAPI.SetTMPText(self._mapNode.TMPLevel, self.mapBattlePassInfo.nLevel)
if ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1) == nil then
if ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false) == nil then
self._mapNode.TMPProgress.gameObject:SetActive(false)
NovaAPI.SetTMPText(self._mapNode.TMPProgress, string.format("%d/%d", self.mapBattlePassInfo.nExp, self.mapBattlePassInfo.nExp))
self._mapNode.imgProgressBarFillMask.sizeDelta = Vector2(nExpBarLength, nExpBarHeight)
self._mapNode.btnLevelDetail.gameObject:SetActive(false)
self._mapNode.TMPLevelMax.gameObject:SetActive(true)
else
local nExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1).Exp
self._mapNode.TMPProgress.gameObject:SetActive(true)
local nExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false).Exp
NovaAPI.SetTMPText(self._mapNode.TMPProgress, string.format("%d/%d", self.mapBattlePassInfo.nExp, nExp))
self._mapNode.imgProgressBarFillMask.sizeDelta = Vector2(nExpBarLength * self.mapBattlePassInfo.nExp / nExp, nExpBarHeight)
self._mapNode.btnLevelDetail.gameObject:SetActive(true)
@@ -566,9 +571,9 @@ function BattlePassCtrl:OnEvent_BattlePassBuyLevel()
nMaxLevel = -1,
nMaxExp = 1
}
if ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1) ~= nil then
mapAfter.nMaxExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1).Exp
mapBefore.nMaxExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1).Exp
if ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false) ~= nil then
mapAfter.nMaxExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false).Exp
mapBefore.nMaxExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false).Exp
else
mapAfter.nExp = 1
mapAfter.nMaxExp = 1
@@ -577,13 +582,15 @@ function BattlePassCtrl:OnEvent_BattlePassBuyLevel()
local animCallback = function()
self.mapBattlePassInfo = mapData
NovaAPI.SetTMPText(self._mapNode.TMPLevel, self.mapBattlePassInfo.nLevel)
if ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1) == nil then
if ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false) == nil then
self._mapNode.TMPProgress.gameObject:SetActive(false)
NovaAPI.SetTMPText(self._mapNode.TMPProgress, string.format("%d/%d", self.mapBattlePassInfo.nExp, self.mapBattlePassInfo.nExp))
self._mapNode.imgProgressBarFillMask.sizeDelta = Vector2(nExpBarLength, nExpBarHeight)
self._mapNode.btnLevelDetail.gameObject:SetActive(false)
self._mapNode.TMPLevelMax.gameObject:SetActive(true)
else
local nExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1).Exp
self._mapNode.TMPProgress.gameObject:SetActive(true)
local nExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false).Exp
NovaAPI.SetTMPText(self._mapNode.TMPProgress, string.format("%d/%d", self.mapBattlePassInfo.nExp, nExp))
self._mapNode.imgProgressBarFillMask.sizeDelta = Vector2(nExpBarLength * self.mapBattlePassInfo.nExp / nExp, nExpBarHeight)
self._mapNode.btnLevelDetail.gameObject:SetActive(true)
@@ -609,13 +616,15 @@ function BattlePassCtrl:OnEvent_BattlePassPremiumSuccess()
local callback = function(mapData)
self.mapBattlePassInfo = mapData
NovaAPI.SetTMPText(self._mapNode.TMPLevel, self.mapBattlePassInfo.nLevel)
if ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1) == nil then
if ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false) == nil then
self._mapNode.TMPProgress.gameObject:SetActive(false)
NovaAPI.SetTMPText(self._mapNode.TMPProgress, string.format("%d/%d", self.mapBattlePassInfo.nExp, self.mapBattlePassInfo.nExp))
self._mapNode.imgProgressBarFillMask.sizeDelta = Vector2(nExpBarLength, nExpBarHeight)
self._mapNode.btnLevelDetail.gameObject:SetActive(false)
self._mapNode.TMPLevelMax.gameObject:SetActive(true)
else
local nExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1).Exp
self._mapNode.TMPProgress.gameObject:SetActive(true)
local nExp = ConfigTable.GetData("BattlePassLevel", self.mapBattlePassInfo.nLevel + 1, false).Exp
NovaAPI.SetTMPText(self._mapNode.TMPProgress, string.format("%d/%d", self.mapBattlePassInfo.nExp, nExp))
self._mapNode.imgProgressBarFillMask.sizeDelta = Vector2(nExpBarLength * self.mapBattlePassInfo.nExp / nExp, nExpBarHeight)
self._mapNode.btnLevelDetail.gameObject:SetActive(true)
+23 -18
View File
@@ -32,7 +32,9 @@ BattlePassQuestCtrl._mapNodeConfig = {
sLanguageId = "BattlePassReceiveAll"
},
redDotDailyQuest = {},
redDotWeekQuest = {}
redDotWeekQuest = {},
txt_DailyTime = {sComponentName = "TMP_Text", nCount = 2},
txt_WeeklyTime = {sComponentName = "TMP_Text", nCount = 2}
}
BattlePassQuestCtrl._mapEventConfig = {
BattlePassQuestReceive = "OnEvent_QuestReceive",
@@ -55,19 +57,6 @@ function BattlePassQuestCtrl:FadeOut()
end
function BattlePassQuestCtrl:OnEnable()
self._mapNode.togDaily:SetText(ConfigTable.GetUIText("BattlePassRewardDaily"))
if self._panel.questTab == 1 then
self.curTab = 1
self._mapNode.togDaily:SetDefault(true)
self._mapNode.togWeek:SetDefault(false)
self._mapNode.srQuestDaily.gameObject:SetActive(true)
self._mapNode.srQuestWeekly.gameObject:SetActive(false)
else
self.curTab = 2
self._mapNode.togDaily:SetDefault(false)
self._mapNode.togWeek:SetDefault(true)
self._mapNode.srQuestDaily.gameObject:SetActive(false)
self._mapNode.srQuestWeekly.gameObject:SetActive(true)
end
self.togRefreshTimer = nil
end
function BattlePassQuestCtrl:OnDisable()
@@ -104,12 +93,18 @@ function BattlePassQuestCtrl:Refresh(nExpThisWeek, nCurLevel)
return a.nTid < b.nTid
end
local bHasComplete = false
local bDailyAllComplete = true
local bQuestAllComplete = true
local nIdx = 0
for _, mapQuestData in pairs(mapDailyQuest) do
if mapQuestData.nStatus == 1 then
bHasComplete = true
nIdx = 1
end
if 2 > mapQuestData.nStatus then
bDailyAllComplete = false
bQuestAllComplete = false
end
table.insert(self.tbDaily, mapQuestData)
end
for _, mapQuestData in pairs(mapWeeklyQuest) do
@@ -119,8 +114,14 @@ function BattlePassQuestCtrl:Refresh(nExpThisWeek, nCurLevel)
nIdx = 2
end
end
if 2 > mapQuestData.nStatus then
bQuestAllComplete = false
end
table.insert(self.tbWeekly, mapQuestData)
end
if nIdx < 1 then
nIdx = not bDailyAllComplete and 1 or 2
end
self:SetWeeklyTogText()
table.sort(self.tbDaily, sort)
table.sort(self.tbWeekly, sort)
@@ -131,7 +132,7 @@ function BattlePassQuestCtrl:Refresh(nExpThisWeek, nCurLevel)
if self.togRefreshTimer == nil then
self.togRefreshTimer = self:AddTimer(0, 60, "SetWeeklyTogText", true, true, true, nil)
end
return bHasComplete, nIdx
return bHasComplete, nIdx, bQuestAllComplete
end
function BattlePassQuestCtrl:SetToggle(nIdx)
if nIdx == 1 then
@@ -281,12 +282,16 @@ function BattlePassQuestCtrl:SetWeeklyTogText()
local nDay = math.floor(sumTime / 86400)
local nHour = math.floor((sumTime - nDay * 86400) / 3600)
local nHourReal = (sumTime - nDay * 86400) / 3600
self._mapNode.togWeek:SetText(ConfigTable.GetUIText("BattlePassQuset"))
if 0 < nDay then
self._mapNode.togWeek:SetText(orderedFormat(ConfigTable.GetUIText("BattlePassQusetWeekly"), nDay, nHour))
NovaAPI.SetTMPText(self._mapNode.txt_WeeklyTime[1], orderedFormat(ConfigTable.GetUIText("BattlePassQusetWeekly"), nDay, nHour))
NovaAPI.SetTMPText(self._mapNode.txt_WeeklyTime[2], orderedFormat(ConfigTable.GetUIText("BattlePassQusetWeekly"), nDay, nHour))
elseif 1 < nHourReal then
self._mapNode.togWeek:SetText(orderedFormat(ConfigTable.GetUIText("BattlePassQusetWeeklyHour"), nHour))
NovaAPI.SetTMPText(self._mapNode.txt_WeeklyTime[1], orderedFormat(ConfigTable.GetUIText("BattlePassQusetWeeklyHour"), nHour))
NovaAPI.SetTMPText(self._mapNode.txt_WeeklyTime[2], orderedFormat(ConfigTable.GetUIText("BattlePassQusetWeeklyHour"), nHour))
else
self._mapNode.togWeek:SetText(ConfigTable.GetUIText("Depot_LeftTime_LessThenHour"))
NovaAPI.SetTMPText(self._mapNode.txt_WeeklyTime[1], ConfigTable.GetUIText("Depot_LeftTime_LessThenHour"))
NovaAPI.SetTMPText(self._mapNode.txt_WeeklyTime[2], ConfigTable.GetUIText("Depot_LeftTime_LessThenHour"))
end
else
self._mapNode.togWeek.gameObject:SetActive(false)
@@ -1,6 +1,6 @@
local BattlePassQuestGridCtrl = class("BattlePassQuestGridCtrl", BaseCtrl)
local LayoutRebuilder = CS.UnityEngine.UI.LayoutRebuilder
local totalLength = 755
local totalLength = 768
local totalHeight = 37
local JumpUtil = require("Game.Common.Utils.JumpUtil")
BattlePassQuestGridCtrl._mapNodeConfig = {
@@ -70,7 +70,7 @@ function BattlePassRewardCtrl:Refresh(tbReward, bPremium, nBattlePassLevel)
end
function BattlePassRewardCtrl:SetLevelPos()
if self.nBattlePassLevel ~= nil then
self._mapNode.svRewardList:SetScrollGridPos(self.nBattlePassLevel - 1)
self._mapNode.svRewardList:SetScrollGridPos(self.nBattlePassLevel - 2)
end
end
function BattlePassRewardCtrl:PlayUnlockAnim(tbShowRewardIdx)