Update - 1.12.0.120

EN: 1.12.0.120
CN: 1.12.0.120
JP: 1.12.0.124
KR: 1.12.0.124
This commit is contained in:
SL1900
2026-06-30 14:30:00 +09:00
parent 061d344bf2
commit a577200f35
826 changed files with 625145 additions and 81163 deletions
@@ -0,0 +1,180 @@
local DoubleDropActCtrl = class("DoubleDropActCtrl", BaseCtrl)
local ClientManager = CS.ClientManager.Instance
DoubleDropActCtrl._mapNodeConfig = {
btnActDetail = {
sComponentName = "UIButton",
callback = "OnBtnClick_Detail"
},
txtBtnActDetail = {
sComponentName = "TMP_Text",
sLanguageId = "Activity_Btn_Detail"
},
txtTime = {sComponentName = "TMP_Text"},
txtDoubleCount = {sComponentName = "TMP_Text"},
goInstanceItem = {
nCount = 4,
sCtrlName = "Game.UI.Activity.DoubleDrop.DoubleDropInsItemCtrl"
},
btnGoto = {
nCount = 4,
sComponentName = "UIButton",
callback = "OnBtnClick_Goto"
},
txtBtnGoto = {
nCount = 4,
sComponentName = "TMP_Text",
sLanguageId = "Double_Drops_Goto_Instance"
},
txtQuestTitle = {
sComponentName = "TMP_Text",
sLanguageId = "Double_Drops_Quest_Title"
},
txtQuestNum = {sComponentName = "TMP_Text"},
imgQuestFill = {
sComponentName = "RectTransform"
},
btnQuestDetail = {
sComponentName = "UIButton",
callback = "OnBtnClick_Quest"
},
redDotQuest = {}
}
DoubleDropActCtrl._mapEventConfig = {
ReceiveDoubleDropQuest = "OnEvent_RefreshQuest"
}
local nMaxWidth = 372
local nMinWidth = 36
function DoubleDropActCtrl:InitActData(actData)
self.actData = actData
self.nActId = actData:GetActId()
self.tbFuncType = self.actData:GetDoubleFuncType()
if self.tbFuncType == nil then
return
end
self:StartActTimer()
for k, v in ipairs(self._mapNode.goInstanceItem) do
v.gameObject:SetActive(self.tbFuncType[k] ~= nil)
if self.tbFuncType[k] ~= nil then
v:InitItem(self.tbFuncType[k])
local bUnlock = PlayerData.Base:CheckFunctionUnlock(self.tbFuncType[k])
self._mapNode.btnGoto[k].gameObject:SetActive(bUnlock)
end
end
NovaAPI.SetTMPText(self._mapNode.txtDoubleCount, self.actData:GetDropActString())
RedDotManager.RegisterNode(RedDotDefine.Activity_DoubleDrop_Quest, self.nActId, self._mapNode.redDotQuest)
self:RefreshQuest()
end
function DoubleDropActCtrl:RefreshQuest()
local tbQuest = self.actData:GetAllQuests()
local nAllCount, nCount = 0, 0
for _, v in ipairs(tbQuest) do
if v.nStatus == AllEnum.ActQuestStatus.Received then
nCount = nCount + 1
end
nAllCount = nAllCount + 1
end
NovaAPI.SetTMPText(self._mapNode.txtQuestNum, string.format("%s/%s", nCount, nAllCount))
local nHeight = self._mapNode.imgQuestFill.sizeDelta.y
local nWidth = 0
if 0 < nCount then
nWidth = math.max(nMaxWidth * (nCount / nAllCount), nMinWidth)
end
self._mapNode.imgQuestFill.sizeDelta = Vector2(nWidth, nHeight)
end
function DoubleDropActCtrl:GetTimeStr(nRemainTime)
local sTimeStr = ""
if nRemainTime <= 60 then
local sec = math.floor(nRemainTime)
sTimeStr = orderedFormat(ConfigTable.GetUIText("Activity_Remain_Time_Sec") or "", sec)
elseif 60 < nRemainTime and nRemainTime <= 3600 then
local min = math.floor(nRemainTime / 60)
local sec = math.floor(nRemainTime - min * 60)
if sec == 0 then
min = min - 1
sec = 60
end
sTimeStr = orderedFormat(ConfigTable.GetUIText("Activity_Remain_Time_Min") or "", min, sec)
elseif 3600 < nRemainTime and nRemainTime <= 86400 then
local hour = math.floor(nRemainTime / 3600)
local min = math.floor((nRemainTime - hour * 3600) / 60)
if min == 0 then
hour = hour - 1
min = 60
end
sTimeStr = orderedFormat(ConfigTable.GetUIText("Activity_Remain_Time_Hour") or "", hour, min)
elseif 86400 < nRemainTime then
local day = math.floor(nRemainTime / 86400)
local hour = math.floor((nRemainTime - day * 86400) / 3600)
if hour == 0 then
day = day - 1
hour = 24
end
sTimeStr = orderedFormat(ConfigTable.GetUIText("Activity_Remain_Time_Day") or "", day, hour)
end
return sTimeStr
end
function DoubleDropActCtrl:StartActTimer()
if self.timer ~= nil then
self.timer:Cancel()
self.timer = nil
end
local nOpenTime = self.actData:GetActOpenTime()
local nCloseTime = self.actData:GetActEndTime()
local refreshTime = function()
local nCurTime = ClientManager.serverTimeStamp
local sTime = ""
local nRemainTime = math.max(nCloseTime - nCurTime, 0)
if nCurTime >= nCloseTime then
sTime = ConfigTable.GetUIText("Activity_End")
elseif nCurTime >= nOpenTime then
sTime = self:GetTimeStr(nRemainTime)
end
if nRemainTime <= 0 and self.timer ~= nil then
self.timer:Cancel()
self.timer = nil
end
NovaAPI.SetTMPText(self._mapNode.txtTime, sTime)
end
refreshTime()
self.timer = self:AddTimer(0, 1, refreshTime, true, true, true)
end
function DoubleDropActCtrl:ClearActivity()
end
function DoubleDropActCtrl:OnBtnClick_Detail()
local mapActCfg = ConfigTable.GetData("ActivityDouble", self.nActId)
if mapActCfg == nil then
return
end
local msg = {
nType = AllEnum.MessageBox.Desc,
sContent = mapActCfg.DesText,
sTitle = ConfigTable.GetUIText("Activity_Btn_Detail")
}
EventManager.Hit(EventId.OpenMessageBox, msg)
end
function DoubleDropActCtrl:OnBtnClick_Goto(btn, nIndex)
local nType = self.tbFuncType[nIndex]
if nType == nil then
return
end
if nType == GameEnum.OpenFuncType.DailyInstance then
EventManager.Hit(EventId.OpenPanel, PanelId.DailyInstanceLevelSelect, 0, 0, true)
elseif nType == GameEnum.OpenFuncType.RegionBoss then
EventManager.Hit(EventId.OpenPanel, PanelId.RogueBossLevel, 0, 0, true)
elseif nType == GameEnum.OpenFuncType.SkillInstance then
EventManager.Hit(EventId.OpenPanel, PanelId.SkillInstanceLevelSelect)
elseif nType == GameEnum.OpenFuncType.CharGemInstance then
EventManager.Hit(EventId.OpenPanel, PanelId.EquipmentInstanceLevelSelect)
end
end
function DoubleDropActCtrl:OnBtnClick_Quest()
EventManager.Hit(EventId.OpenPanel, PanelId.DoubleDropActQuestPanel_103001, self.nActId)
end
function DoubleDropActCtrl:OnEvent_RefreshQuest()
self:RefreshQuest()
end
function DoubleDropActCtrl:OnEnable()
end
function DoubleDropActCtrl:OnDisable()
end
return DoubleDropActCtrl
@@ -0,0 +1,177 @@
local DoubleDropActQuestCtrl = class("DoubleDropActQuestCtrl", BaseCtrl)
DoubleDropActQuestCtrl._mapNodeConfig = {
goBlur = {
sNodeName = "t_fullscreen_blur_blue"
},
aniBlur = {
sNodeName = "t_fullscreen_blur_blue",
sComponentName = "Animator"
},
goRoot = {
sNodeName = "----SafeAreaRoot----",
sComponentName = "Transform"
},
btnFullClose = {
sComponentName = "UIButton",
callback = "OnBtnClick_Close"
},
aniWindow = {sNodeName = "questPopup", sComponentName = "Animator"},
txtWindowTitle = {
sComponentName = "TMP_Text",
sLanguageId = "Double_Drops_Quest_Reward_Title"
},
btnClose = {
sComponentName = "UIButton",
callback = "OnBtnClick_Close"
},
sv = {
sComponentName = "LoopScrollView"
},
btn_GetAllReward = {
sComponentName = "UIButton",
callback = "OnBtnClick_GetAllReward"
},
btn_GetAllReward_None = {
sComponentName = "UIButton",
callback = "OnBtnClick_GetAllReward"
},
txt_GetAll = {
nCount = 2,
sComponentName = "TMP_Text",
sLanguageId = "Double_Drops_Quest_Reward_Receive"
}
}
DoubleDropActQuestCtrl._mapEventConfig = {}
DoubleDropActQuestCtrl._mapRedDotConfig = {}
local nQuestItemWidth = 756
local nMinWidth = 32
function DoubleDropActQuestCtrl:ShowQuestList()
self.actData = PlayerData.Activity:GetActivityDataById(self.nActId)
if self.actData == nil then
return
end
self.tbItemCtrl = {}
self:RefreshQuestList()
self._mapNode.goRoot.gameObject:SetActive(false)
self._mapNode.goBlur:SetActive(true)
local wait = function()
coroutine.yield(CS.UnityEngine.WaitForEndOfFrame())
self._mapNode.goRoot.gameObject:SetActive(true)
self._mapNode.aniWindow:Play("t_window_04_t_in")
EventManager.Hit(EventId.TemporaryBlockInput, 0.3)
end
cs_coroutine.start(wait)
end
function DoubleDropActQuestCtrl:RefreshQuestList()
self.tbQuest = self.actData:GetAllQuests()
table.sort(self.tbQuest, function(a, b)
if a.nStatus == b.nStatus then
return a.nId < b.nId
end
return a.nStatus < b.nStatus
end)
self._mapNode.sv:SetAnim(0.08)
self._mapNode.sv:Init(#self.tbQuest, self, self.OnGridQuestRefresh, nil, false)
self.bHasComQuest = false
for _, v in ipairs(self.tbQuest) do
if v.nStatus == AllEnum.ActQuestStatus.Complete then
self.bHasComQuest = true
break
end
end
self._mapNode.btn_GetAllReward.gameObject:SetActive(self.bHasComQuest)
self._mapNode.btn_GetAllReward_None.gameObject:SetActive(not self.bHasComQuest)
end
function DoubleDropActQuestCtrl:OnGridQuestRefresh(goGrid, gridIndex)
local nIndex = gridIndex + 1
local instanceId = goGrid:GetInstanceID()
local questData = self.tbQuest[nIndex]
local goRoot = goGrid.transform:Find("btnGrid/AnimRoot/Root")
local img_Received = goRoot.transform:Find("img_Received")
local btn_item = goRoot.transform:Find("btn_item"):GetComponent("UIButton")
local item = goRoot.transform:Find("btn_item/AnimRoot/item")
if self.tbItemCtrl[instanceId] == nil then
self.tbItemCtrl[instanceId] = self:BindCtrlByNode(item, "Game.UI.TemplateEx.TemplateItemCtrl")
end
local txtTarget = goRoot.transform:Find("txt_target"):GetComponent("TMP_Text")
local txt_com1 = goRoot.transform:Find("txt_com1"):GetComponent("TMP_Text")
local txt_com2 = goRoot.transform:Find("txt_com2"):GetComponent("TMP_Text")
local bar = goRoot.transform:Find("imgBarBg/rtBarFill/imgMainBarFill"):GetComponent("RectTransform")
local img_state1 = goRoot.transform:Find("img_state1").gameObject
local img_state2 = goRoot.transform:Find("img_state2").gameObject
local img_state3 = goRoot.transform:Find("img_state3").gameObject
img_state1:SetActive(questData.nStatus == AllEnum.ActQuestStatus.Complete)
img_state2:SetActive(questData.nStatus == AllEnum.ActQuestStatus.Received)
img_state3:SetActive(questData.nStatus == AllEnum.ActQuestStatus.UnComplete)
img_Received.gameObject:SetActive(questData.nStatus == AllEnum.ActQuestStatus.Received)
btn_item.onClick:RemoveAllListeners()
local questConfig = ConfigTable.GetData("ActivityDoubleQuest", questData.nId)
if questConfig == nil then
return
end
local itemId = questConfig.ItemId
local itemCount = questConfig.ItemQty
btn_item.onClick:AddListener(function()
UTILS.ClickItemGridWithTips(itemId, btn_item.transform, true, true, false)
end)
self.tbItemCtrl[instanceId]:SetItem(itemId, nil, itemCount, false, questData.nStatus == AllEnum.ActQuestStatus.Received, false, false)
NovaAPI.SetTMPText(txtTarget, questConfig.Desc)
if questData.nStatus == AllEnum.ActQuestStatus.UnComplete then
NovaAPI.SetTMPText(txt_com1, tostring(questData.progress.Cur) .. "/" .. tostring(questData.progress.Max))
NovaAPI.SetTMPText(txt_com2, tostring(questData.progress.Cur) .. "/" .. tostring(questData.progress.Max))
local nWidth = 0
if questData.progress.Cur > 0 then
nWidth = math.max(nQuestItemWidth * (questData.progress.Cur / questData.progress.Max), nMinWidth)
end
bar.sizeDelta = Vector2(nWidth, bar.sizeDelta.y)
else
NovaAPI.SetTMPText(txt_com1, ConfigTable.GetUIText("BdConvert_QuestFinish"))
NovaAPI.SetTMPText(txt_com2, ConfigTable.GetUIText("BdConvert_QuestFinish"))
bar.sizeDelta = Vector2(nQuestItemWidth, bar.sizeDelta.y)
end
txt_com1.gameObject:SetActive(questData.nStatus ~= AllEnum.ActQuestStatus.Received)
txt_com2.gameObject:SetActive(questData.nStatus == AllEnum.ActQuestStatus.Received)
end
function DoubleDropActQuestCtrl:Awake()
end
function DoubleDropActQuestCtrl:OnEnable()
self.tbItemCtrl = {}
local param = self:GetPanelParam()
if type(param) == "table" then
self.nActId = param[1]
end
if self.nActId then
self:ShowQuestList()
end
end
function DoubleDropActQuestCtrl:OnDisable()
if self.tbItemCtrl ~= nil then
for _, ctrl in pairs(self.tbItemCtrl) do
self:UnbindCtrlByNode(ctrl)
end
end
end
function DoubleDropActQuestCtrl:OnDestroy()
end
function DoubleDropActQuestCtrl:OnBtnClick_Close()
self._mapNode.aniBlur:SetTrigger("tOut")
self._mapNode.aniWindow:Play("t_window_04_t_out")
self:AddTimer(1, 0.2, function()
EventManager.Hit(EventId.ClosePanel, PanelId.DoubleDropActQuestPanel_103001)
end, true, true, true)
EventManager.Hit(EventId.TemporaryBlockInput, 0.2)
end
function DoubleDropActQuestCtrl:OnBtnClick_GetAllReward()
if self.actData == nil then
return
end
if not self.bHasComQuest then
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("DoubleDrop_Reward_Receive_Tip"))
return
end
local callback = function()
self:RefreshQuestList()
end
self.actData:SendReceiveQuestReward(0, callback)
end
return DoubleDropActQuestCtrl
@@ -0,0 +1,22 @@
local DoubleDropActQuestPanel = class("DoubleDropActQuestPanel", BasePanel)
DoubleDropActQuestPanel._bIsMainPanel = false
DoubleDropActQuestPanel._sUIResRootPath = "UI_Activity/"
DoubleDropActQuestPanel._tbDefine = {
{
sPrefabPath = "_103001/DoubleDropActRewardPanel.prefab",
sCtrlName = "Game.UI.Activity.DoubleDrop.DoubleDropActQuestCtrl"
}
}
function DoubleDropActQuestPanel:Awake()
end
function DoubleDropActQuestPanel:OnEnable()
end
function DoubleDropActQuestPanel:OnAfterEnter()
end
function DoubleDropActQuestPanel:OnDisable()
end
function DoubleDropActQuestPanel:OnDestroy()
end
function DoubleDropActQuestPanel:OnRelease()
end
return DoubleDropActQuestPanel
@@ -0,0 +1,49 @@
local DoubleDropInsItemCtrl = class("DoubleDropInsItemCtrl", BaseCtrl)
DoubleDropInsItemCtrl._mapNodeConfig = {
imgIconDaily = {},
imgIconRegionBoss = {},
imgIconSkill = {},
imgIconEquipment = {},
txtTitle = {sComponentName = "TMP_Text"},
txtDesc = {sComponentName = "TMP_Text"},
goLock = {},
txtLock = {sComponentName = "TMP_Text"}
}
DoubleDropInsItemCtrl._mapEventConfig = {}
DoubleDropInsItemCtrl._mapRedDotConfig = {}
function DoubleDropInsItemCtrl:InitItem(nFuncType)
self.nType = nFuncType
self._mapNode.imgIconDaily:SetActive(nFuncType == GameEnum.OpenFuncType.DailyInstance)
self._mapNode.imgIconRegionBoss:SetActive(nFuncType == GameEnum.OpenFuncType.RegionBoss)
self._mapNode.imgIconSkill:SetActive(nFuncType == GameEnum.OpenFuncType.SkillInstance)
self._mapNode.imgIconEquipment:SetActive(nFuncType == GameEnum.OpenFuncType.CharGemInstance)
local sDesc = ""
if nFuncType == GameEnum.OpenFuncType.SkillInstance then
sDesc = ConfigTable.GetUIText("LevelMenu_SSkill")
elseif nFuncType == GameEnum.OpenFuncType.RegionBoss then
sDesc = ConfigTable.GetUIText("LevelMenu_SRegion")
elseif nFuncType == GameEnum.OpenFuncType.DailyInstance then
sDesc = ConfigTable.GetUIText("LevelMenu_STime")
elseif nFuncType == GameEnum.OpenFuncType.CharGemInstance then
sDesc = ConfigTable.GetUIText("LevelMenu_SEquipment")
end
NovaAPI.SetTMPText(self._mapNode.txtDesc, sDesc)
local bUnlock = PlayerData.Base:CheckFunctionUnlock(nFuncType)
self._mapNode.goLock:SetActive(not bUnlock)
local mapFuncCfg = ConfigTable.GetData("OpenFunc", nFuncType)
if mapFuncCfg ~= nil then
NovaAPI.SetTMPText(self._mapNode.txtTitle, mapFuncCfg.Name)
if not bUnlock and mapFuncCfg.NeedWorldClass > 0 then
NovaAPI.SetTMPText(self._mapNode.txtLock, orderedFormat(ConfigTable.GetUIText("Double_Drops_WorldClass_Lock"), mapFuncCfg.NeedWorldClass))
end
end
end
function DoubleDropInsItemCtrl:Awake()
end
function DoubleDropInsItemCtrl:OnEnable()
end
function DoubleDropInsItemCtrl:OnDisable()
end
function DoubleDropInsItemCtrl:OnDestroy()
end
return DoubleDropInsItemCtrl