Files
StellaSora_DataLua/lua/game/ui/questnewbie/teamformation/questnewbieteamctrl.lua
T
SL1900 35c8d87e86 Update - 1.4.0.73
EN: 1.4.0.73
CN: 1.4.0.74
JP: 1.4.0.77
KR: 1.4.0.80
2025-12-25 19:00:00 +09:00

41 lines
1.4 KiB
Lua

local QuestNewbieTeamCtrl = class("QuestNewbieTeamCtrl", BaseCtrl)
QuestNewbieTeamCtrl._mapNodeConfig = {
goLock = {},
txtLock = {sComponentName = "TMP_Text"},
imgChar = {nCount = 3, sComponentName = "Image"},
goElement = {
sCtrlName = "Game.UI.TemplateEx.TemplateElementCtrl"
},
txtTeamDesc = {sComponentName = "TMP_Text"}
}
QuestNewbieTeamCtrl._mapEventConfig = {}
QuestNewbieTeamCtrl._mapRedDotConfig = {}
function QuestNewbieTeamCtrl:Init(mapData)
if mapData == nil then
return
end
self._mapNode.goElement:Refresh(mapData.EET)
for i = 1, 3 do
local nChar = mapData["Char" .. i]
if nChar ~= nil and 0 < nChar then
local sIconPath = "Icon/Head/head_" .. nChar .. "01" .. AllEnum.CharHeadIconSurfix.XL
self:SetPngSprite(self._mapNode.imgChar[i], sIconPath)
end
end
NovaAPI.SetTMPText(self._mapNode.txtTeamDesc, mapData.Desc)
local bFinished = PlayerData.Quest:CheckTeamFormationAttributeCompleted(mapData.Id)
local bUnlocked = PlayerData.Quest:CheckTeamFormationAttributeUnlocked(mapData.Id)
self.bLocked = bFinished or not bUnlocked
self._mapNode.goLock:SetActive(self.bLocked)
local sTip = ""
if bFinished then
sTip = ConfigTable.GetUIText("Quest_Complete")
else
sTip = ConfigTable.GetUIText("StarTower_Book_Lock")
end
NovaAPI.SetTMPText(self._mapNode.txtLock, sTip)
end
function QuestNewbieTeamCtrl:OnEnable()
end
return QuestNewbieTeamCtrl