Update - 1.7.0.88

EN: 1.7.0.88
CN: 1.7.0.90
JP: 1.7.0.91
KR: 1.7.0.94
This commit is contained in:
SL1900
2026-02-24 22:00:00 +09:00
parent d0c0a3870c
commit 86d82306fe
666 changed files with 920582 additions and 7496 deletions
@@ -33,6 +33,10 @@ ThrowGiftLevelSelectCtrl._mapNodeConfig = {
sComponentName = "UIButton",
callback = "OnBtnClick_ItemDic"
},
btnTarget = {
sComponentName = "UIButton",
callback = "OnBtnClick_Target"
},
btnLevelCtrl = {
sNodeName = "btnLevel",
nCount = 4,
@@ -54,10 +58,13 @@ ThrowGiftLevelSelectCtrl._mapNodeConfig = {
sComponentName = "UIButton",
callback = "OnBtnClick_Next"
},
imgGroupLockIcon = {},
TopBar = {
sNodeName = "TopBarPanel",
sCtrlName = "Game.UI.TopBarEx.TopBarCtrl"
}
},
goRedDotTarget = {},
rtBottom = {sComponentName = "Transform"}
}
ThrowGiftLevelSelectCtrl._mapEventConfig = {}
ThrowGiftLevelSelectCtrl._mapRedDotConfig = {}
@@ -69,8 +76,10 @@ end
function ThrowGiftLevelSelectCtrl:FadeOut()
end
function ThrowGiftLevelSelectCtrl:OnEnable()
self.redDotBottom = self._mapNode.rtBottom:Find("imgNew")
self._mapNode.rtPenguin.speed = 1
self._mapNode.DecoRoot.speed = 1
EventManager.Hit(EventId.SetTransition)
local param = self:GetPanelParam()
if type(param) == "table" then
self.nActivityId = param[1]
@@ -81,10 +90,12 @@ function ThrowGiftLevelSelectCtrl:OnEnable()
self.actData = PlayerData.Activity:GetActivityDataById(self.nActivityId)
self.mapRecordLevelData = {}
self.mapRecordItemData = {}
self.nOpenTime = 0
if self.actData ~= nil then
local mapCachedData = self.actData:GetActivityData()
self.mapRecordLevelData = mapCachedData.tbLevels
self.mapRecordItemData = mapCachedData.tbItems
self.mapRecordLevelData = mapCachedData.mapLevels
self.mapRecordItemData = mapCachedData.mapItems
self.nOpenTime = self.actData:GetActOpenTime() or 0
end
local foreachLevel = function(mapData)
if mapData.ActivityId == self.nActivityId then
@@ -106,7 +117,7 @@ function ThrowGiftLevelSelectCtrl:OnEnable()
local nCurIdx = 1
for i = 1, 4 do
local enumDifficulty = mapDifficultyBtn[i]
local bUnlock = table.indexof(self.tbUnlockedGroup, enumDifficulty) > 0
local bUnlock = 0 < table.indexof(self.tbUnlockedGroup, enumDifficulty)
local bClear = 0 < table.indexof(self.tbClearedGroup, enumDifficulty)
self._mapNode.btnLevelCtrl[i]:SetBtnState(bUnlock, bClear)
self._mapNode.btnLevelCtrl[i]:SetBtnCurState(enumDifficulty == self.curGroup)
@@ -117,6 +128,27 @@ function ThrowGiftLevelSelectCtrl:OnEnable()
end
self._mapNode.imgBgAnim:Play("ThrowGiftsBgSwitch_in" .. nCurIdx)
NovaAPI.SetImageFillAmount(self._mapNode.imgLineTop, tbProgress[nCurIdx])
local mapActivityData = ConfigTable.GetData("Activity", self.nActivityId)
if mapActivityData ~= nil then
local nGroupId = mapActivityData.MidGroupId
local mapGroupData = PlayerData.Activity:GetActivityGroupDataById(nGroupId)
if mapGroupData ~= nil then
local actData = mapGroupData:GetActivityDataByIndex(AllEnum.ActivityThemeFuncIndex.Task)
if actData ~= nil then
RedDotManager.RegisterNode(RedDotDefine.Activity_Group_Task_Group, {
nGroupId,
actData.ActivityId,
mapActivityData.MiniGameRedDot
}, self._mapNode.goRedDotTarget)
else
self._mapNode.goRedDotTarget:SetActive(false)
end
else
self._mapNode.goRedDotTarget:SetActive(false)
end
else
self._mapNode.goRedDotTarget:SetActive(false)
end
end
function ThrowGiftLevelSelectCtrl:OnDisable()
end
@@ -130,8 +162,8 @@ function ThrowGiftLevelSelectCtrl:RefreshLevelInfo()
self.mapRecordItemData = {}
if self.actData ~= nil then
local mapCachedData = self.actData:GetActivityData()
self.mapRecordLevelData = mapCachedData.tbLevels
self.mapRecordItemData = mapCachedData.tbItems
self.mapRecordLevelData = mapCachedData.mapLevels
self.mapRecordItemData = mapCachedData.mapItems
end
self.tbUnlockedGroup = {}
self.tbClearedGroup = {}
@@ -161,14 +193,76 @@ function ThrowGiftLevelSelectCtrl:RefreshLevelInfo()
end
function ThrowGiftLevelSelectCtrl:RefreshLevelInfoGrid()
local tbCurGroup = self.mapLevelGroup[self.curGroup]
local bShowBottomNew = false
local tbNewLevel = {}
if self.actData ~= nil then
tbNewLevel = self.actData:GetNewLevels()
end
for _, nLevelId in ipairs(tbNewLevel) do
if nLevelId > tbCurGroup[2].Id then
bShowBottomNew = true
break
end
end
self.redDotBottom.gameObject:SetActive(bShowBottomNew)
for i = 1, 2 do
local nLevelId = tbCurGroup[i].Id
local bUnlock = tbCurGroup[i].PreLevelId > 0 and self.mapRecordLevelData[tbCurGroup[i].PreLevelId] ~= nil and self.mapRecordLevelData[tbCurGroup[i].PreLevelId].FirstComplete or true
local bUnlock = self:GetLevelUnlock(nLevelId)
local nMaxScore = self.mapRecordLevelData[nLevelId] == nil and 0 or self.mapRecordLevelData[nLevelId].MaxScore
local bPass = self.mapRecordLevelData[nLevelId] ~= nil and self.mapRecordLevelData[nLevelId].FirstComplete or false
self._mapNode.rtLevelInfo[i]:Refresh(nLevelId, bUnlock, nMaxScore, bPass)
local bShowRedDot = false
if self.actData ~= nil then
self.actData:GetLevelNewState(nLevelId)
if bShowRedDot then
self.actData:SetLevelNew(nLevelId)
end
end
self._mapNode.rtLevelInfo[i]:Refresh(nLevelId, bUnlock, nMaxScore, bPass, bShowRedDot, self.nOpenTime)
end
NovaAPI.SetTMPText(self._mapNode.TMPGroupName, ConfigTable.GetUIText("ThrowGift_Difficulty" .. self.curGroup) or "")
local bUnlock = 1 <= table.indexof(self.tbUnlockedGroup, self.curGroup)
self._mapNode.imgGroupLockIcon:SetActive(not bUnlock)
if bUnlock then
NovaAPI.SetTMPText(self._mapNode.TMPGroupName, ConfigTable.GetUIText("ThrowGift_Difficulty" .. self.curGroup) or "")
else
local nCond = 0
local nTime
for _, mapLevelCfgData in ipairs(tbCurGroup) do
local bUnlock, nLevelCond, nTimeLevel = self:GetLevelUnlock(mapLevelCfgData.Id)
if not bUnlock then
nCond = math.max(nCond, nLevelCond)
end
if nTimeLevel ~= nil then
nTime = nTime == nil and nTimeLevel or math.min(nTimeLevel, nTime)
end
end
if nCond == 2 then
NovaAPI.SetTMPText(self._mapNode.TMPGroupName, ConfigTable.GetUIText("ThrowGift_GroupLockHint") or "")
elseif nCond == 1 then
NovaAPI.SetTMPText(self._mapNode.TMPGroupName, self:GetRemainTimeStr(nTime))
else
NovaAPI.SetTMPText(self._mapNode.TMPGroupName, "")
end
end
end
function ThrowGiftLevelSelectCtrl:GetRemainTimeStr(nRemainTime)
if nRemainTime == nil then
return ""
end
local timeStr = ""
local day = math.floor(nRemainTime / 86400)
local hour = math.floor(nRemainTime / 3600)
local min = math.floor((nRemainTime - hour * 3600) / 60)
local sec = nRemainTime - hour * 3600 - min * 60
if 0 < day then
timeStr = orderedFormat(ConfigTable.GetUIText("ActivityLevels_Lock_Day_Color"), day)
elseif 0 < hour then
timeStr = orderedFormat(ConfigTable.GetUIText("ActivityLevels_Lock_Hour_Color"), hour)
elseif 0 < min then
timeStr = orderedFormat(ConfigTable.GetUIText("ActivityLevels_Lock_Min_Color"), min)
elseif 0 < sec then
timeStr = orderedFormat(ConfigTable.GetUIText("ActivityLevels_Lock_Sec_Color"), sec)
end
return timeStr, 0 < nRemainTime
end
function ThrowGiftLevelSelectCtrl:GetLevelPass(nLevelId)
if self.mapRecordLevelData[nLevelId] ~= nil and self.mapRecordLevelData[nLevelId].FirstComplete then
@@ -179,10 +273,22 @@ end
function ThrowGiftLevelSelectCtrl:GetLevelUnlock(nLevelId)
local mapLevelCfgData = ConfigTable.GetData("ThrowGiftLevel", nLevelId)
if mapLevelCfgData == nil then
return false
return false, 0
end
if mapLevelCfgData.DayOpen ~= 0 and mapLevelCfgData.DayOpen ~= nil and self.nOpenTime ~= 0 then
local curTime = CS.ClientManager.Instance.serverTimeStamp
local openTime = CS.ClientManager.Instance:GetNextRefreshTime(self.nOpenTime) - 86400
local remainTime = openTime + mapLevelCfgData.DayOpen * 86400 - curTime
if 0 < remainTime then
return false, 1, remainTime
end
end
if mapLevelCfgData.PreLevelId ~= 0 then
return self.mapRecordLevelData[mapLevelCfgData.PreLevelId] ~= nil and self.mapRecordLevelData[mapLevelCfgData.PreLevelId].FirstComplete
if self.mapRecordLevelData[mapLevelCfgData.PreLevelId] ~= nil and self.mapRecordLevelData[mapLevelCfgData.PreLevelId].FirstComplete then
return true
else
return false, 2
end
else
return true
end
@@ -192,22 +298,23 @@ function ThrowGiftLevelSelectCtrl:OnBtnClick_GroupBtn(btn, nIdx)
if self.curGroup == enumDifficulty then
return
end
if table.indexof(self.tbUnlockedGroup, enumDifficulty) < 1 then
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("ThrowGift_GroupLockHint") or "")
return
end
self.curGroup = enumDifficulty
self:RefreshLevelInfoGrid()
local nCurIdx = 1
local nMaxIdx = 1
for i = 1, 4 do
local enumDifficulty = mapDifficultyBtn[i]
local bUnlock = 1 <= table.indexof(self.tbUnlockedGroup, enumDifficulty)
self._mapNode.btnLevelCtrl[i]:SetBtnCurState(enumDifficulty == self.curGroup)
self._mapNode.btnLevelCtrl[i]:SetBtnSelectState(enumDifficulty <= self.curGroup)
self._mapNode.btnLevelCtrl[i]:SetBtnSelectState(enumDifficulty <= self.curGroup and bUnlock)
if enumDifficulty == self.curGroup then
nCurIdx = i
end
if bUnlock then
nMaxIdx = math.max(nMaxIdx, i)
end
end
NovaAPI.SetImageFillAmount(self._mapNode.imgLineTop, tbProgress[nCurIdx])
NovaAPI.SetImageFillAmount(self._mapNode.imgLineTop, tbProgress[math.min(nCurIdx, nMaxIdx)])
self._mapNode.imgBgAnim:Play("ThrowGiftsBgSwitch_in" .. nCurIdx)
self.rootAnim:Play("ThrowGiftsLevelSelectPanel_switch")
local wait = function()
@@ -236,22 +343,23 @@ function ThrowGiftLevelSelectCtrl:OnBtnClick_Next()
nCurIdx = nCurIdx + 1
end
local enumDifficulty = mapDifficultyBtn[nCurIdx]
if 1 > table.indexof(self.tbUnlockedGroup, enumDifficulty) then
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("ThrowGift_GroupLockHint") or "")
return
end
self.curGroup = enumDifficulty
self:RefreshLevelInfoGrid()
local nCurIdx = 1
local nMaxIdx = 1
for i = 1, 4 do
local enumDifficulty = mapDifficultyBtn[i]
local bUnlock = 1 <= table.indexof(self.tbUnlockedGroup, enumDifficulty)
self._mapNode.btnLevelCtrl[i]:SetBtnCurState(enumDifficulty == self.curGroup)
self._mapNode.btnLevelCtrl[i]:SetBtnSelectState(enumDifficulty <= self.curGroup)
self._mapNode.btnLevelCtrl[i]:SetBtnSelectState(enumDifficulty <= self.curGroup and bUnlock)
if enumDifficulty == self.curGroup then
nCurIdx = i
end
if bUnlock then
nMaxIdx = math.max(nMaxIdx, i)
end
end
NovaAPI.SetImageFillAmount(self._mapNode.imgLineTop, tbProgress[nCurIdx])
NovaAPI.SetImageFillAmount(self._mapNode.imgLineTop, tbProgress[math.min(nCurIdx, nMaxIdx)])
self._mapNode.imgBgAnim:Play("ThrowGiftsBgSwitch_in" .. nCurIdx)
self.rootAnim:Play("ThrowGiftsLevelSelectPanel_switch")
local wait = function()
@@ -280,22 +388,23 @@ function ThrowGiftLevelSelectCtrl:OnBtnClick_Prev()
nCurIdx = nCurIdx - 1
end
local enumDifficulty = mapDifficultyBtn[nCurIdx]
if 1 > table.indexof(self.tbUnlockedGroup, enumDifficulty) then
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("ThrowGift_GroupLockHint") or "")
return
end
self.curGroup = enumDifficulty
self:RefreshLevelInfoGrid()
local nCurIdx = 1
local nMaxIdx = 1
for i = 1, 4 do
local enumDifficulty = mapDifficultyBtn[i]
local bUnlock = 1 <= table.indexof(self.tbUnlockedGroup, enumDifficulty)
self._mapNode.btnLevelCtrl[i]:SetBtnCurState(enumDifficulty == self.curGroup)
self._mapNode.btnLevelCtrl[i]:SetBtnSelectState(enumDifficulty <= self.curGroup)
self._mapNode.btnLevelCtrl[i]:SetBtnSelectState(enumDifficulty <= self.curGroup and bUnlock)
if enumDifficulty == self.curGroup then
nCurIdx = i
end
if bUnlock then
nMaxIdx = math.max(nMaxIdx, i)
end
end
NovaAPI.SetImageFillAmount(self._mapNode.imgLineTop, tbProgress[nCurIdx])
NovaAPI.SetImageFillAmount(self._mapNode.imgLineTop, tbProgress[math.min(nCurIdx, nMaxIdx)])
self._mapNode.imgBgAnim:Play("ThrowGiftsBgSwitch_in" .. nCurIdx)
self.rootAnim:Play("ThrowGiftsLevelSelectPanel_switch")
local wait = function()
@@ -314,4 +423,17 @@ end
function ThrowGiftLevelSelectCtrl:OnBtnClick_ItemDic()
self._mapNode.rtItemInfo:OpenPanel()
end
function ThrowGiftLevelSelectCtrl:OnBtnClick_Target()
local mapActivityData = ConfigTable.GetData("Activity", self.nActivityId)
if mapActivityData ~= nil then
local nGroupId = mapActivityData.MidGroupId
local mapGroupData = PlayerData.Activity:GetActivityGroupDataById(nGroupId)
if mapGroupData ~= nil then
local actData = mapGroupData:GetActivityDataByIndex(AllEnum.ActivityThemeFuncIndex.Task)
if actData ~= nil then
EventManager.Hit(EventId.OpenPanel, PanelId.Task_10105, actData.ActivityId, 4)
end
end
end
end
return ThrowGiftLevelSelectCtrl