Update - 1.16.0.138

EN: 1.16.0.138
CN: 1.16.0.137
JP: 1.16.0.141
KR: 1.16.0.143
This commit is contained in:
SL1900
2026-09-29 12:00:00 +09:00
parent 1d209ec368
commit 1aa6ba19a4
767 changed files with 1389523 additions and 2758 deletions
@@ -63,7 +63,6 @@ LongestDayCtrl._mapNodeConfig = {
txtTaskProgress_End = {},
imgTaskActivityUnlockTime = {},
txtTaskActivityUnlockTime = {sComponentName = "TMP_Text"},
dbTaskEnd = {},
txtTaskProgressEnd = {sComponentName = "TMP_Text"},
dbTask = {},
dbTaskEnd = {},
@@ -162,11 +161,11 @@ function LongestDayCtrl:Awake()
end
function LongestDayCtrl:OnEnable()
self:RefreshPanel()
for i = 1, 6 do
for i = 1, 5 do
local actData = self.ActData:GetActivityDataByIndex(i)
local nActId = actData ~= nil and actData.ActivityId or 0
local state = self.tbActState[nActId]
if nActId ~= nil and 0 < nActId and state ~= nil then
if 0 < nActId and state ~= nil then
if i == AllEnum.ActivityThemeFuncIndex.Task then
if state == ActivityState.Closed then
self._mapNode.redDotEntrance2:SetActive(false)
@@ -181,31 +180,14 @@ function LongestDayCtrl:OnEnable()
self.nActId,
nActId
}, self._mapNode.reddotLevel)
elseif i == AllEnum.ActivityThemeFuncIndex.FateCard then
RedDotManager.RegisterNode(RedDotDefine.Activity_Group_PenguinCard_Level, {
self.nActId
}, self._mapNode.reddotFatecard)
elseif i == AllEnum.ActivityThemeFuncIndex.MiniGame then
local bOld = LocalData.GetPlayerLocalData("Activity_MiniGame_10112_New") or state ~= ActivityState.Open
RedDotManager.SetValid(RedDotDefine.Activity_GroupNew_MiniGame, {
self.nActId
}, not bOld)
RedDotManager.RegisterNode(RedDotDefine.Activity_GroupNew_MiniGame, {
RedDotManager.RegisterNode(RedDotDefine.Activity_GoldenSpy, {
self.nActId
}, self._mapNode.miniGameRedDot)
end
end
end
local sAnimName = "LongestDayPanel_Full"
local sAudioName = "Mode_10112_activity"
if self.animRoot ~= nil then
self.animRoot = self.gameObject:GetComponent("Animator")
sAnimName = "LongestDayPanel_Pullback"
sAudioName = "Mode_10112_activity_01"
end
self.animRoot = self.gameObject:GetComponent("Animator")
self.animRoot:Play(sAnimName, 0, 0)
WwiseAudioMgr:PostEvent(sAudioName)
self:SetEnterState()
end
function LongestDayCtrl:OnDisable()
if nil ~= self.minigameRemainTimer then
@@ -232,6 +214,43 @@ function LongestDayCtrl:OnDisable()
TimerManager.Remove(self.taskRemainTimer)
self.taskRemainTimer = nil
end
self:RedDotUnRegister()
end
function LongestDayCtrl:RedDotUnRegister()
for i = 1, 5 do
local actData = self.ActData:GetActivityDataByIndex(i)
local nActId = actData ~= nil and actData.ActivityId or 0
local state = self.tbActState[nActId]
if 0 < nActId and state ~= nil then
if i == AllEnum.ActivityThemeFuncIndex.Task then
RedDotManager.UnRegisterNode(RedDotDefine.Activity_Group_Task, {
self.nActId,
nActId
}, self._mapNode.redDotEntrance2)
elseif i == AllEnum.ActivityThemeFuncIndex.Level then
RedDotManager.UnRegisterNode(RedDotDefine.ActivityLevel, {
self.nActId,
nActId
}, self._mapNode.reddotLevel)
elseif i == AllEnum.ActivityThemeFuncIndex.MiniGame then
RedDotManager.UnRegisterNode(RedDotDefine.Activity_GroupNew_MiniGame, {
self.nActId
}, self._mapNode.miniGameRedDot)
end
end
end
end
function LongestDayCtrl:SetEnterState()
local sAnimName = "LongestDayPanel_Full"
local sAudioName = "Mode_10112_activity"
if self.bFirstEnter then
sAnimName = "LongestDayPanel_Pullback"
sAudioName = "Mode_10112_activity_01"
end
self.bFirstEnter = true
self.animRoot = self.gameObject:GetComponent("Animator")
self.animRoot:Play(sAnimName, 0, 0)
WwiseAudioMgr:PostEvent(sAudioName)
end
function LongestDayCtrl:RefreshPanel()
if self.ActData == nil or self.ActivityGroupCfg == nil then
@@ -333,7 +352,7 @@ function LongestDayCtrl:RefreshButtonState()
self:RefreshStoryButtonState()
end
function LongestDayCtrl:RefreshButtonTimer(actData, timer, txtTrans, imgTrans, refreshFunc)
local countDowmTimer
local countDownTimer
local activityId = actData.ActivityId
local state, bShowCountDown, openTime, endTime = self.ActData:GetActivityEntranceTimerData(activityId)
if state == ActivityState.NotOpen then
@@ -349,30 +368,30 @@ function LongestDayCtrl:RefreshButtonTimer(actData, timer, txtTrans, imgTrans, r
end
else
imgTrans:SetActive(false)
TimerManager.Remove(countDowmTimer)
countDowmTimer = nil
TimerManager.Remove(countDownTimer)
countDownTimer = nil
self.tbActState[activityId] = ActivityState.Open
refreshFunc(actData)
self:RefreshActivityData()
end
end
fcTimer()
countDowmTimer = self:AddTimer(0, 1, fcTimer, true, true, false)
countDownTimer = self:AddTimer(0, 1, fcTimer, true, true, false)
end
elseif state == ActivityState.Open and endTime ~= nil and timer == nil and bShowCountDown then
self:RefreshRemainTime(endTime, txtTrans)
local fcTimer = function()
local remainTime = self:RefreshRemainTime(endTime, txtTrans)
if remainTime <= 0 then
TimerManager.Remove(countDowmTimer)
countDowmTimer = nil
TimerManager.Remove(countDownTimer)
countDownTimer = nil
refreshFunc(actData)
end
end
fcTimer()
countDowmTimer = self:AddTimer(0, 1, fcTimer, true, true, false)
countDownTimer = self:AddTimer(0, 1, fcTimer, true, true, false)
end
return state, bShowCountDown, countDowmTimer
return state, bShowCountDown, countDownTimer
end
function LongestDayCtrl:RefreshMiniGameButtonState(actData)
local activityId = actData.ActivityId
@@ -381,9 +400,9 @@ function LongestDayCtrl:RefreshMiniGameButtonState(actData)
local refreshFunc = function(actData)
self:RefreshMiniGameButtonState(actData)
end
local state, bShowCountDown, countDowmTimer = self:RefreshButtonTimer(actData, self.minigameRemainTimer, self._mapNode.txtMiniGameActivityTime, self._mapNode.imgMiniGameActivityUnlockTime, refreshFunc)
local state, bShowCountDown, countDownTimer = self:RefreshButtonTimer(actData, self.minigameRemainTimer, self._mapNode.txtMiniGameActivityTime, self._mapNode.imgMiniGameActivityUnlockTime, refreshFunc)
if self.minigameRemainTimer == nil then
self.minigameRemainTimer = countDowmTimer
self.minigameRemainTimer = countDownTimer
end
self._mapNode.imgMiniGameActivityUnlockTime:SetActive(state == ActivityState.NotOpen)
self._mapNode.imgMiniGameActivityTime.gameObject:SetActive(state == ActivityState.Open and bShowCountDown)
@@ -393,8 +412,6 @@ function LongestDayCtrl:RefreshMiniGameButtonState(actData)
self._mapNode.goMiniGameEnd.gameObject:SetActive(state == ActivityState.Closed)
self._mapNode.dbMiniGame.gameObject:SetActive(state ~= ActivityState.Closed)
self._mapNode.dbMiniGameEnd.gameObject:SetActive(state == ActivityState.Closed)
if state ~= ActivityState.Open then
end
self.tbActState[activityId] = state
end
end
@@ -409,9 +426,9 @@ function LongestDayCtrl:RefreshTaskButtonState(actData)
end
self:RefreshTaskButtonState(actData)
end
local state, bShowCountDown, countDowmTimer = self:RefreshButtonTimer(actData, self.taskRemainTimer, self._mapNode.txtTaskActivityTime, self._mapNode.imgTaskActivityUnlockTime, refreshFunc)
local state, bShowCountDown, countDownTimer = self:RefreshButtonTimer(actData, self.taskRemainTimer, self._mapNode.txtTaskActivityTime, self._mapNode.imgTaskActivityUnlockTime, refreshFunc)
if self.taskRemainTimer == nil then
self.taskRemainTimer = countDowmTimer
self.taskRemainTimer = countDownTimer
end
if state == ActivityState.Closed and actInsData ~= nil then
actInsData:RefreshTaskRedDot()
@@ -425,10 +442,9 @@ function LongestDayCtrl:RefreshTaskButtonState(actData)
self._mapNode.dbTaskEnd.gameObject:SetActive(state == ActivityState.Closed)
self._mapNode.txtTaskProgressEnd.gameObject:SetActive(state == ActivityState.Closed)
self.tbActState[activityId] = state
local ActivityTaskData = PlayerData.Activity:GetActivityDataById(activityId)
local nDone, nTotal = 0, 0
if ActivityTaskData ~= nil then
nDone, nTotal = ActivityTaskData:CalcTotalProgress()
if actInsData ~= nil then
nDone, nTotal = actInsData:CalcTotalProgress()
end
local progress = string.format("%d/%d", nDone, nTotal)
NovaAPI.SetTMPText(self._mapNode.txtTaskProgress, progress)
@@ -446,9 +462,9 @@ function LongestDayCtrl:RefreshLevelButtonState(actData)
end
self:RefreshLevelButtonState(actData)
end
local state, bShowCountDown, countDowmTimer = self:RefreshButtonTimer(actData, self.levelRemainTimer, self._mapNode.txtLevelActivityTime, self._mapNode.imgLevelActivityUnlockTime, refreshFunc)
local state, bShowCountDown, countDownTimer = self:RefreshButtonTimer(actData, self.levelRemainTimer, self._mapNode.txtLevelActivityTime, self._mapNode.imgLevelActivityUnlockTime, refreshFunc)
if self.levelRemainTimer == nil then
self.levelRemainTimer = countDowmTimer
self.levelRemainTimer = countDownTimer
end
if state == ActivityState.Closed then
local activityLevelsData = PlayerData.Activity:GetActivityDataById(activityId)
@@ -474,9 +490,9 @@ function LongestDayCtrl:RefreshShopButtonState(actData)
local refreshFunc = function(actData)
self:RefreshShopButtonState(actData)
end
local state, bShowCountDown, countDowmTimer = self:RefreshButtonTimer(actData, self.shopRemainTimer, self._mapNode.txtShopActivityTime, self._mapNode.imgShopActivityUnlockTime, refreshFunc)
local state, bShowCountDown, countDownTimer = self:RefreshButtonTimer(actData, self.shopRemainTimer, self._mapNode.txtShopActivityTime, self._mapNode.imgShopActivityUnlockTime, refreshFunc)
if self.shopRemainTimer == nil then
self.shopRemainTimer = countDowmTimer
self.shopRemainTimer = countDownTimer
end
self._mapNode.imgShopActivityTime:SetActive(state == ActivityState.Open and bShowCountDown)
self._mapNode.imgShopActivityUnlockTime:SetActive(state == ActivityState.NotOpen)
@@ -499,7 +515,7 @@ function LongestDayCtrl:RefreshStoryButtonState()
self._mapNode.dbStory.gameObject:SetActive(true)
self._mapNode.dbStoryEnd.gameObject:SetActive(false)
end
function LongestDayCtrl:RequireActiviyData()
function LongestDayCtrl:RequireActivityData()
if self.bRequiredActData then
return
end
@@ -517,7 +533,9 @@ function LongestDayCtrl:RefreshActivityData()
if self.bRequiredActData then
return
end
self:AddTimer(1, 3, self.RequireActiviyData, true, true, true)
self:AddTimer(1, 3, function()
self:RequireActivityData()
end, true, true, true)
end
function LongestDayCtrl:OnBtn_ClickActivityEntrance(btn, nIndex)
if nIndex == AllEnum.ActivityThemeFuncIndex.Story then
@@ -526,7 +544,21 @@ function LongestDayCtrl:OnBtn_ClickActivityEntrance(btn, nIndex)
if isUnlock then
EventManager.Hit(EventId.OpenPanel, PanelId.MainlineEx, chapterId)
else
EventManager.Hit(EventId.OpenPanel, PanelId.StoryChapter)
local sLockReadTipsKey = "Mainline_Preview_Lock_Read_" .. chapterId
if LocalData.GetPlayerLocalData(sLockReadTipsKey) then
EventManager.Hit(EventId.OpenPanel, PanelId.MainlineEx, chapterId)
return
end
local sTip = ConfigTable.GetUIText("Mainline_Preview_Lock_Read")
local msg = {
nType = AllEnum.MessageBox.Confirm,
sContent = sTip,
callbackConfirm = function()
LocalData.SetPlayerLocalData(sLockReadTipsKey, true)
EventManager.Hit(EventId.OpenPanel, PanelId.MainlineEx, chapterId)
end
}
EventManager.Hit(EventId.OpenMessageBox, msg)
end
return
end
@@ -537,7 +569,7 @@ function LongestDayCtrl:OnBtn_ClickActivityEntrance(btn, nIndex)
local bOpen, _state, _sTips, bNeedRefreshData = self.ActData:CheckActivityEntranceOpen(actData.ActivityId, actData.PanelId, true, self.bRequiredActData)
if not bOpen then
if bNeedRefreshData then
self:RequireActiviyData()
self:RequireActivityData()
end
return
end