Update - 1.11.0.113

EN: 1.11.0.113
CN: 1.11.0.114
JP: 1.11.0.118
KR: 1.11.0.118
This commit is contained in:
SL1900
2026-06-02 16:00:00 +09:00
parent 343b24c91b
commit dcc2c4a2a9
621 changed files with 518699 additions and 4157 deletions
@@ -1,4 +1,5 @@
local CharPotentialListCtrl = class("CharPotentialListCtrl", BaseCtrl)
local LocalData = require("GameCore.Data.LocalData")
CharPotentialListCtrl._mapNodeConfig = {
txtCharName = {sComponentName = "TMP_Text"},
txtHas = {sComponentName = "TMP_Text"},
@@ -40,6 +41,7 @@ function CharPotentialListCtrl:RefreshPotential(nCharId, mapPotential, bShowAll,
NovaAPI.SetTMPText(self._mapNode.txtAll, string.format("/%s", nAllCount))
self.nHasCount = 0
local nPotentialCount = 1
self:RefreshRecommendPotential()
local createPotentialItem = function(tbPotential, rtContent)
if 0 < #tbPotential then
for k, v in ipairs(tbPotential) do
@@ -47,10 +49,10 @@ function CharPotentialListCtrl:RefreshPotential(nCharId, mapPotential, bShowAll,
local itemObj = instantiate(goPotentialItem, rtContent)
itemObj.gameObject:SetActive(true)
local itemCtrl = self:BindCtrlByNode(itemObj, "Game.UI.StarTower.Depot.DepotPotentialItemCtrl")
itemCtrl:InitItem(v.nId, v.nLevel, v.nPotentialAdd, true)
itemCtrl:InitItem(v.nId, v.nLevel, v.nPotentialAdd, true, nil, self:GetRecommendPotentialLevel(v.nId))
table.insert(self.tbPotentialItemCtrl, itemCtrl)
else
self.tbPotentialItemCtrl[nPotentialCount]:InitItem(v.nId, v.nLevel, v.nPotentialAdd, true)
self.tbPotentialItemCtrl[nPotentialCount]:InitItem(v.nId, v.nLevel, v.nPotentialAdd, true, nil, self:GetRecommendPotentialLevel(v.nId))
end
self.nHasCount = self.nHasCount + v.nUnlock
nPotentialCount = nPotentialCount + 1
@@ -64,6 +66,50 @@ function CharPotentialListCtrl:RefreshPotential(nCharId, mapPotential, bShowAll,
self:SwitchPotentialAll(bShowAll)
self:SetPotentialBuildName(nCharId, bMaster)
end
function CharPotentialListCtrl:OnSwitchPotentialRecommendChange(showRecomm)
for _, listItem in ipairs(self.tbPotentialItemCtrl) do
if showRecomm then
listItem:RefreshRecommend(self:GetRecommendPotentialLevel(listItem:GetPotentialID()))
else
listItem:RefreshRecommend(-1)
end
end
end
function CharPotentialListCtrl:GetRecommendPotentialLevel(nId)
if not self.recommendList then
self:RefreshRecommendPotential()
end
if not self.recommendList then
return -1
end
for _, tb in ipairs(self.recommendList) do
if tb.nId == nId then
return tb.nLevel
end
end
return -1
end
function CharPotentialListCtrl:GetPotenRecommendStatus()
return PlayerData.StarTower:GetPotenRecommendStatus(self._panel.nStarTowerId)
end
function CharPotentialListCtrl:RefreshRecommendPotential()
self.bPotentialRecommend, self.ispreSelect = self:GetPotenRecommendStatus()
if not self.ispreSelect then
self.recommendList = nil
return
end
if not self.bPotentialRecommend then
self.recommendList = nil
return
end
local potemtilalList = {}
for _, v in ipairs(self.mapPotential) do
for _, tb in ipairs(v) do
table.insert(potemtilalList, tb.nId)
end
end
self.recommendList = PlayerData.StarTower:GetRecommendList(self._panel.nStarTowerId, self._panel.tbTeam, potemtilalList)
end
function CharPotentialListCtrl:SwitchPotentialAll(bShowAll)
local nPotentialIndex = 1
for nStyle, tbSubMap in ipairs(self.mapPotential) do
@@ -50,6 +50,16 @@ DepotPotentialCtrl._mapNodeConfig = {
btnSwitch_off = {
sComponentName = "UIButton",
callback = "OnBtnClick_SetSimpleDes"
},
goRecomSwitchFull = {},
btnSwitchRecom = {
nCount = 2,
sComponentName = "UIButton",
callback = "OnBtnClick_SwitchRecom"
},
txtRecomm = {
sComponentName = "TMP_Text",
sLanguageId = "Potential_Recommend_Show"
}
}
DepotPotentialCtrl._mapEventConfig = {
@@ -129,6 +139,18 @@ function DepotPotentialCtrl:RefreshPotential(mapAllPotential, mapPotential)
end
cs_coroutine.start(wait)
self:InitSwitch()
self:OnRefreshPotenRecommend()
end
function DepotPotentialCtrl:OnSwitchPotentialRecommendChange()
self._mapNode.btnSwitchRecom[1].gameObject:SetActive(self.bPotentialRecommend)
self._mapNode.btnSwitchRecom[2].gameObject:SetActive(not self.bPotentialRecommend)
for k, v in ipairs(self._mapNode.PotentialList) do
v:OnSwitchPotentialRecommendChange(self.bPotentialRecommend)
end
self._mapNode.PotentialCard:OnSwitchPotentialRecommendChange(self.bPotentialRecommend)
if self.bPotentialRecommend and self.nSelectId then
self:OnSetPotentialRecommend(self.nSelectId)
end
end
function DepotPotentialCtrl:SwitchPotentialAll()
self._mapNode.btnSwitchFull[1].gameObject:SetActive(not self.bPotentialAll)
@@ -195,6 +217,23 @@ function DepotPotentialCtrl:Awake()
self._mapNode.PotentialDepotItem.gameObject:SetActive(false)
self._mapNode.PotentialCard.gameObject:SetActive(false)
end
function DepotPotentialCtrl:GetPotenRecommendStatus()
return PlayerData.StarTower:GetPotenRecommendStatus(self._panel.nStarTowerId)
end
function DepotPotentialCtrl:OnRefreshPotenRecommend()
self.bPotentialRecommend, self.ispreSelect = self:GetPotenRecommendStatus()
if not self.ispreSelect then
self._mapNode.goRecomSwitchFull.gameObject:SetActive(false)
return
end
self._mapNode.goRecomSwitchFull.gameObject:SetActive(true)
self._mapNode.btnSwitchRecom[1].gameObject:SetActive(self.bPotentialRecommend)
self._mapNode.btnSwitchRecom[2].gameObject:SetActive(not self.bPotentialRecommend)
self:RefreshRecommendPotentialList()
if self.nSelectId then
self:OnSetPotentialRecommend(self.nSelectId)
end
end
function DepotPotentialCtrl:OnEnable()
end
function DepotPotentialCtrl:OnDisable()
@@ -220,6 +259,36 @@ function DepotPotentialCtrl:OnBtnClick_SwitchFull()
LocalData.SetPlayerLocalData("PotentialAllSwitch", self.bPotentialAll)
self:SwitchPotentialAll()
end
function DepotPotentialCtrl:OnBtnClick_SwitchRecom()
self.bPotentialRecommend = not self.bPotentialRecommend
LocalData.SetPlayerLocalData("PotentialAllSwitchRecomm", self.bPotentialRecommend)
self:OnSwitchPotentialRecommendChange()
end
function DepotPotentialCtrl:RefreshRecommendPotentialList()
local nTowerId = self._panel.nStarTowerId
local ispreSelect = PlayerData.StarTower:IsPreselectionData(nTowerId)
if not ispreSelect then
return
end
local bPa = LocalData.GetPlayerLocalData("PotentialAllSwitchRecomm")
if bPa == false then
return
end
local potemtilalList = {}
for _, v in ipairs(self.mapAllPotential) do
local tbPotential = v.tbPotential
for _, tb in pairs(tbPotential) do
table.insert(potemtilalList, tb.nId)
end
end
self.recommendList = PlayerData.StarTower:GetRecommendList(nTowerId, self._panel.tbTeam, potemtilalList)
end
function DepotPotentialCtrl:ShieldPreselectionAnimator(state)
self._mapNode.PotentialCard:ShieldPreselectionAnimator(state)
end
function DepotPotentialCtrl:ShieldSpecialPontential(state)
self._mapNode.PotentialCard:ShieldSpecialPontential(state)
end
function DepotPotentialCtrl:OnEvent_SelectDepotPotential(nPotentialId)
self._mapNode.PotentialCard.gameObject:SetActive(true)
local nLevel = 0
@@ -235,6 +304,29 @@ function DepotPotentialCtrl:OnEvent_SelectDepotPotential(nPotentialId)
local bSimple = PlayerData.StarTower:GetPotentialDescSimple()
self._mapNode.PotentialCard:SetPotentialItem(nPotentialId, nLevel, nil, bSimple, nil, nPotentialAddLv, AllEnum.PotentialCardType.StarTower)
self._mapNode.PotentialCard:ChangeWordRaycast(true)
self:OnSetPotentialRecommend(nPotentialId)
end
end
function DepotPotentialCtrl:OnSetPotentialRecommend(nPotentialId)
local nLevel = self:GetRecommendPotentialLevel(nPotentialId)
local status = false
if self.bPotentialRecommend and -1 < nLevel then
status = true
end
self._mapNode.PotentialCard:OnSetPotentialRecommend(status, nLevel)
end
function DepotPotentialCtrl:GetRecommendPotentialLevel(nId)
if not self.recommendList then
self:RefreshRecommendPotentialList()
end
if not self.recommendList then
return -1
end
for _, tb in ipairs(self.recommendList) do
if tb.nId == nId then
return tb.nLevel
end
end
return -1
end
return DepotPotentialCtrl
@@ -1,4 +1,5 @@
local DepotPotentialItemCtrl = class("DepotPotentialItemCtrl", BaseCtrl)
local LayoutRebuilder = CS.UnityEngine.UI.LayoutRebuilder
DepotPotentialItemCtrl._mapNodeConfig = {
btnItem = {
sComponentName = "UIButton",
@@ -24,7 +25,10 @@ DepotPotentialItemCtrl._mapNodeConfig = {
sComponentName = "TMP_Text",
sLanguageId = "StarTower_Depot_Potential_Lock"
},
imgMask = {}
imgMask = {},
recomContainer = {},
imageRecomBg = {},
txtReCount = {sComponentName = "TMP_Text"}
}
DepotPotentialItemCtrl._mapEventConfig = {
SelectDepotPotential = "OnEvent_SelectDepotPotential"
@@ -34,11 +38,14 @@ local level_txt_color = {
[1] = "#264278",
[2] = "#2c5fd5"
}
function DepotPotentialItemCtrl:InitItem(nPotentialId, nLevel, nPotentialAdd, bShowAdd, bHideChoose)
function DepotPotentialItemCtrl:InitItem(nPotentialId, nLevel, nPotentialAdd, bShowAdd, bHideChoose, recommendLv)
self.nPotentialId = nPotentialId
self.nLevel = nLevel
self.nPotentialAdd = nPotentialAdd
self.bHideChoose = bHideChoose
function self.WaitLayoutTxtFunc()
self:WaitLayoutTxt()
end
local itemCfg = ConfigTable.GetData_Item(nPotentialId)
local potentialCfg = ConfigTable.GetData("Potential", nPotentialId)
if nil == potentialCfg or nil == itemCfg then
@@ -48,6 +55,7 @@ function DepotPotentialItemCtrl:InitItem(nPotentialId, nLevel, nPotentialAdd, bS
self._mapNode.imgMask.gameObject:SetActive(nLevel <= 0)
NovaAPI.SetCanvasGroupAlpha(self._mapNode.canvasGroup, 1)
local bSpecial = itemCfg.Stype == GameEnum.itemStype.SpecificPotential
self.bSpecial = bSpecial
self._mapNode.goNormal.gameObject:SetActive(not bSpecial)
self._mapNode.goSpecial.gameObject:SetActive(bSpecial)
if not bSpecial then
@@ -55,7 +63,10 @@ function DepotPotentialItemCtrl:InitItem(nPotentialId, nLevel, nPotentialAdd, bS
else
self:SetSpecialPotential(itemCfg, potentialCfg)
end
self._mapNode.imgChoose.gameObject:SetActive(false)
if recommendLv == nil then
recommendLv = -1
end
self:RefreshRecommend(recommendLv)
end
function DepotPotentialItemCtrl:SetNormalPotential(itemCfg, potentialCfg, bShowAdd)
local sFrame = AllEnum.FrameType_New.PotentialS .. AllEnum.FrameColor_New[itemCfg.Rarity]
@@ -81,6 +92,27 @@ function DepotPotentialItemCtrl:RefreshPreselectionLevel(nLevel)
self._mapNode.imgMask.gameObject:SetActive(nLevel <= 0)
NovaAPI.SetTMPText(self._mapNode.txtLevelValue, self.nLevel)
end
function DepotPotentialItemCtrl:GetPotentialID()
return self.nPotentialId
end
function DepotPotentialItemCtrl:RefreshRecommend(recommendLv)
self.recommendLv = recommendLv
self._mapNode.recomContainer.gameObject:SetActive(-1 < recommendLv)
if -1 < recommendLv then
if self.bSpecial then
self._mapNode.txtReCount.text = ""
else
self._mapNode.txtReCount.text = recommendLv
end
end
if -1 < recommendLv then
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForEndOfFrame())
CS.UnityEngine.UI.LayoutRebuilder.ForceRebuildLayoutImmediate(self._mapNode.imageRecomBg.gameObject:GetComponent("RectTransform"))
end
cs_coroutine.start(wait)
end
end
function DepotPotentialItemCtrl:OnBtnClick_Item()
EventManager.Hit("SelectDepotPotential", self.nPotentialId, self.nLevel, self.nPotentialAdd, self._mapNode.btnItem)
end
@@ -147,6 +147,8 @@ function StarTowerDepotCtrl:Awake()
self.tbCharPotential = {}
self._mapNode.goRoot:SetActive(false)
self.tbGamepadUINode = self:GetGamepadUINode()
self._mapNode.Potential:ShieldPreselectionAnimator(false)
self._mapNode.Potential:ShieldSpecialPontential(true)
end
function StarTowerDepotCtrl:FadeOut()
end
@@ -49,7 +49,12 @@ PotentialCardItemCtrl._mapNodeConfig = {
sLanguageId = "StarTower_Book_New_Text"
},
imgPreselection = {},
imgPreselectionAnmator = {
sComponentName = "Animator",
sNodeName = "imgPreselection"
},
txtPreselection = {sComponentName = "TMP_Text"},
imgFlag = {},
N = {},
SR = {},
SSR = {},
@@ -183,6 +188,12 @@ function PotentialCardItemCtrl:PlayAnim(sAnimName)
self._mapNode.animCtrl:Play(sAnimName)
self._mapNode.BgEffect:SetActive(self.bLucky and sAnimName == "tc_newperk_card_in")
end
function PotentialCardItemCtrl:Awake()
if self.shieldPreselectionAnimator == nil then
self.shieldPreselectionAnimator = true
end
self._mapNode.imgPreselectionAnmator.enabled = self.shieldPreselectionAnimator
end
function PotentialCardItemCtrl:OnEnable()
end
function PotentialCardItemCtrl:OnDisable()
@@ -223,18 +234,47 @@ function PotentialCardItemCtrl:ChangeWordRaycast(bEnable)
NovaAPI.SetTMPRaycastTarget(self._mapNode.txtSpDesc, bEnable)
end
function PotentialCardItemCtrl:SetRecommend(bEnable, nLevel)
self._mapNode.imgReommend:SetActive(bEnable and nLevel == nil)
local bShow = bEnable and nLevel ~= nil
if self.nNextLevel ~= self.nLevel or not true then
bShow = bShow and bShow
end
self._mapNode.imgReommend:SetActive(bEnable and nLevel == nil)
self:DoSetRecommend(bShow, nLevel)
end
function PotentialCardItemCtrl:DoSetRecommend(bShow, nLevel)
self._mapNode.imgPreselection:SetActive(bShow)
if not bShow then
return
end
if nLevel ~= nil then
if self.bSpecial then
if self.shieldSpecialPontential then
self._mapNode.imgFlag.gameObject:SetActive(false)
else
self._mapNode.imgFlag.gameObject:SetActive(true)
end
NovaAPI.SetTMPText(self._mapNode.txtPreselection, ConfigTable.GetUIText("Potential_Preselection_Recommend"))
else
self._mapNode.imgFlag.gameObject:SetActive(true)
NovaAPI.SetTMPText(self._mapNode.txtPreselection, orderedFormat(ConfigTable.GetUIText("Potential_Preselection_Recommend_Level"), nLevel))
end
end
end
function PotentialCardItemCtrl:ShieldPreselectionAnimator(state)
self.shieldPreselectionAnimator = state
if self._mapNode.imgPreselectionAnmator then
self._mapNode.imgPreselectionAnmator.enabled = state
end
end
function PotentialCardItemCtrl:ShieldSpecialPontential(state)
self.shieldSpecialPontential = state
end
function PotentialCardItemCtrl:OnSwitchPotentialRecommendChange(isshow)
self._mapNode.imgPreselection:SetActive(isshow)
self._mapNode.imgReommend:SetActive(false)
end
function PotentialCardItemCtrl:OnSetPotentialRecommend(isshow, nLevel)
self._mapNode.imgReommend:SetActive(false)
self:DoSetRecommend(isshow, nLevel)
end
return PotentialCardItemCtrl