Update - 1.15.0.134
EN: 1.15.0.134 CN: 1.15.0.133 JP: 1.15.0.137 KR: 1.15.0.139
This commit is contained in:
@@ -71,15 +71,22 @@ StarTowerBuildBriefItem._mapNodeConfig = {
|
||||
txtCharUsed = {
|
||||
sComponentName = "TMP_Text",
|
||||
sLanguageId = "JointDrill_Build_Char_Used"
|
||||
},
|
||||
imgLabel2 = {},
|
||||
txtReTrial = {
|
||||
sComponentName = "TMP_Text",
|
||||
sLanguageId = "Reengagement_BDTrialPreview_BDLabel"
|
||||
}
|
||||
}
|
||||
StarTowerBuildBriefItem._mapEventConfig = {}
|
||||
function StarTowerBuildBriefItem:RefreshGrid(mapData, nPanelState, bSelectDelete, bCheckOut, bCheckIn, nType)
|
||||
function StarTowerBuildBriefItem:RefreshGrid(mapData, nPanelState, bSelectDelete, bCheckOut, bCheckIn, nType, bTrial)
|
||||
self._mapData = mapData
|
||||
self._nType = nType
|
||||
self._bTrial = bTrial
|
||||
self:RefreshInfo()
|
||||
self:RefreshChar()
|
||||
self:RefreshDisc()
|
||||
self._mapNode.imgLabel2:SetActive(bTrial == true)
|
||||
if nPanelState == PanelState.Delete then
|
||||
self._mapNode.img_SelectDelete:SetActive(bSelectDelete)
|
||||
self._mapNode.img_SelectPreference:SetActive(false)
|
||||
|
||||
@@ -147,9 +147,10 @@ function DepotPotentialCtrl:OnSwitchPotentialRecommendChange()
|
||||
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
|
||||
if self.nSelectId then
|
||||
self:OnSetPotentialRecommend(self.nSelectId)
|
||||
else
|
||||
self._mapNode.PotentialCard:SetRecommend(false)
|
||||
end
|
||||
end
|
||||
function DepotPotentialCtrl:SwitchPotentialAll()
|
||||
@@ -309,11 +310,15 @@ function DepotPotentialCtrl:OnEvent_SelectDepotPotential(nPotentialId)
|
||||
end
|
||||
function DepotPotentialCtrl:OnSetPotentialRecommend(nPotentialId)
|
||||
local nLevel = self:GetRecommendPotentialLevel(nPotentialId)
|
||||
local status = false
|
||||
local bEnable = false
|
||||
if self.bPotentialRecommend and -1 < nLevel then
|
||||
status = true
|
||||
bEnable = true
|
||||
end
|
||||
self._mapNode.PotentialCard:OnSetPotentialRecommend(status, nLevel)
|
||||
local nCurLevel = 0
|
||||
if self.mapPotential[nPotentialId] ~= nil then
|
||||
nCurLevel = self.mapPotential[nPotentialId].nLevel or 0
|
||||
end
|
||||
self._mapNode.PotentialCard:SetRecommend(bEnable, bEnable and nLevel or nil, nCurLevel)
|
||||
end
|
||||
function DepotPotentialCtrl:GetRecommendPotentialLevel(nId)
|
||||
if not self.recommendList then
|
||||
|
||||
@@ -36,7 +36,9 @@ DepotPotentialItemCtrl._mapEventConfig = {
|
||||
DepotPotentialItemCtrl._mapRedDotConfig = {}
|
||||
local level_txt_color = {
|
||||
[1] = "#264278",
|
||||
[2] = "#2c5fd5"
|
||||
[2] = "#2c5fd5",
|
||||
[3] = "#8cac59",
|
||||
[4] = "#e74470"
|
||||
}
|
||||
function DepotPotentialItemCtrl:InitItem(nPotentialId, nLevel, nPotentialAdd, bShowAdd, bHideChoose, recommendLv)
|
||||
self.nPotentialId = nPotentialId
|
||||
@@ -58,17 +60,17 @@ function DepotPotentialItemCtrl:InitItem(nPotentialId, nLevel, nPotentialAdd, bS
|
||||
self.bSpecial = bSpecial
|
||||
self._mapNode.goNormal.gameObject:SetActive(not bSpecial)
|
||||
self._mapNode.goSpecial.gameObject:SetActive(bSpecial)
|
||||
if not bSpecial then
|
||||
self:SetNormalPotential(itemCfg, potentialCfg, bShowAdd)
|
||||
else
|
||||
self:SetSpecialPotential(itemCfg, potentialCfg)
|
||||
end
|
||||
if recommendLv == nil then
|
||||
recommendLv = -1
|
||||
end
|
||||
if not bSpecial then
|
||||
self:SetNormalPotential(itemCfg, potentialCfg, bShowAdd, recommendLv)
|
||||
else
|
||||
self:SetSpecialPotential(itemCfg, potentialCfg)
|
||||
end
|
||||
self:RefreshRecommend(recommendLv)
|
||||
end
|
||||
function DepotPotentialItemCtrl:SetNormalPotential(itemCfg, potentialCfg, bShowAdd)
|
||||
function DepotPotentialItemCtrl:SetNormalPotential(itemCfg, potentialCfg, bShowAdd, recommendLv)
|
||||
local sFrame = AllEnum.FrameType_New.PotentialS .. AllEnum.FrameColor_New[itemCfg.Rarity]
|
||||
self:SetAtlasSprite(self._mapNode.imgRare, "12_rare", sFrame)
|
||||
self._mapNode.goIcon:SetIcon(potentialCfg.Id)
|
||||
@@ -78,8 +80,16 @@ function DepotPotentialItemCtrl:SetNormalPotential(itemCfg, potentialCfg, bShowA
|
||||
nPotentialAdd = 0
|
||||
end
|
||||
local sColor = nPotentialAdd == 0 and level_txt_color[1] or level_txt_color[2]
|
||||
if 0 < recommendLv then
|
||||
if recommendLv > self.nLevel then
|
||||
sColor = level_txt_color[4]
|
||||
elseif recommendLv <= self.nLevel then
|
||||
sColor = level_txt_color[3]
|
||||
end
|
||||
end
|
||||
local _, color = ColorUtility.TryParseHtmlString(sColor)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtLevelValue, self.nLevel + nPotentialAdd)
|
||||
local nCurLevel = self.nLevel + nPotentialAdd
|
||||
NovaAPI.SetTMPText(self._mapNode.txtLevelValue, nCurLevel)
|
||||
NovaAPI.SetTMPColor(self._mapNode.txtLevelValue, color)
|
||||
end
|
||||
function DepotPotentialItemCtrl:SetSpecialPotential(itemCfg, potentialCfg)
|
||||
@@ -100,10 +110,20 @@ function DepotPotentialItemCtrl:RefreshRecommend(recommendLv)
|
||||
self._mapNode.recomContainer.gameObject:SetActive(-1 < recommendLv)
|
||||
if -1 < recommendLv then
|
||||
if self.bSpecial then
|
||||
self._mapNode.txtReCount.text = ""
|
||||
NovaAPI.SetTMPText(self._mapNode.txtReCount, "")
|
||||
else
|
||||
self._mapNode.txtReCount.text = recommendLv
|
||||
NovaAPI.SetTMPText(self._mapNode.txtReCount, recommendLv)
|
||||
if recommendLv > self.nLevel then
|
||||
sColor = level_txt_color[4]
|
||||
elseif recommendLv <= self.nLevel then
|
||||
sColor = level_txt_color[3]
|
||||
end
|
||||
local _, color = ColorUtility.TryParseHtmlString(sColor)
|
||||
NovaAPI.SetTMPColor(self._mapNode.txtLevelValue, color)
|
||||
end
|
||||
elseif not self.bSpecial then
|
||||
local _, color = ColorUtility.TryParseHtmlString(level_txt_color[1])
|
||||
NovaAPI.SetTMPColor(self._mapNode.txtLevelValue, color)
|
||||
end
|
||||
if -1 < recommendLv then
|
||||
local wait = function()
|
||||
|
||||
@@ -54,6 +54,8 @@ PotentialCardItemCtrl._mapNodeConfig = {
|
||||
sNodeName = "imgPreselection"
|
||||
},
|
||||
txtPreselection = {sComponentName = "TMP_Text"},
|
||||
txtPreRecLv = {sComponentName = "TMP_Text"},
|
||||
imgLevelDB = {},
|
||||
imgFlag = {},
|
||||
N = {},
|
||||
SR = {},
|
||||
@@ -193,6 +195,8 @@ function PotentialCardItemCtrl:Awake()
|
||||
self.shieldPreselectionAnimator = true
|
||||
end
|
||||
self._mapNode.imgPreselectionAnmator.enabled = self.shieldPreselectionAnimator
|
||||
self._mapNode.imgPreselection:SetActive(false)
|
||||
self._mapNode.imgLevelDB:SetActive(false)
|
||||
end
|
||||
function PotentialCardItemCtrl:OnEnable()
|
||||
end
|
||||
@@ -233,21 +237,19 @@ function PotentialCardItemCtrl:ChangeWordRaycast(bEnable)
|
||||
NovaAPI.SetTMPRaycastTarget(self._mapNode.txtDesc, bEnable)
|
||||
NovaAPI.SetTMPRaycastTarget(self._mapNode.txtSpDesc, bEnable)
|
||||
end
|
||||
function PotentialCardItemCtrl:SetRecommend(bEnable, nLevel)
|
||||
function PotentialCardItemCtrl:SetRecommend(bEnable, nLevel, nCurLevel)
|
||||
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)
|
||||
self:DoSetRecommend(bShow, nLevel, nCurLevel)
|
||||
end
|
||||
function PotentialCardItemCtrl:DoSetRecommend(bShow, nLevel)
|
||||
function PotentialCardItemCtrl:DoSetRecommend(bShow, nLevel, nCurLevel)
|
||||
self._mapNode.imgPreselection:SetActive(bShow)
|
||||
if not bShow then
|
||||
return
|
||||
end
|
||||
if nLevel ~= nil then
|
||||
if self.bSpecial then
|
||||
self._mapNode.imgLevelDB:SetActive(false)
|
||||
if self.shieldSpecialPontential then
|
||||
self._mapNode.imgFlag.gameObject:SetActive(false)
|
||||
else
|
||||
@@ -256,7 +258,21 @@ function PotentialCardItemCtrl:DoSetRecommend(bShow, nLevel)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtPreselection, ConfigTable.GetUIText("Potential_Preselection_Recommend"))
|
||||
else
|
||||
self._mapNode.imgFlag.gameObject:SetActive(true)
|
||||
self._mapNode.imgLevelDB:SetActive(true)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtPreselection, orderedFormat(ConfigTable.GetUIText("Potential_Preselection_Recommend_Level"), nLevel))
|
||||
if nCurLevel == nil then
|
||||
nCurLevel = 0
|
||||
if self.nNextLevel ~= nil and self.nNextLevel ~= self.nLevel then
|
||||
nCurLevel = self.nLevel
|
||||
end
|
||||
end
|
||||
local sCurLevel
|
||||
if nLevel > nCurLevel then
|
||||
sCurLevel = "<color=#e74470>" .. nCurLevel .. "</color>"
|
||||
else
|
||||
sCurLevel = "<color=#8cac59>" .. nCurLevel .. "</color>"
|
||||
end
|
||||
NovaAPI.SetTMPText(self._mapNode.txtPreRecLv, sCurLevel .. "/" .. nLevel)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user