Update - 1.9.0.103
EN: 1.9.0.103 CN: 1.9.0.104 JP: 1.9.0.106 KR: 1.9.0.108
This commit is contained in:
@@ -0,0 +1,126 @@
|
||||
local RankBuildDetailCtrl = class("RankBuildDetailCtrl", BaseCtrl)
|
||||
RankBuildDetailCtrl._mapNodeConfig = {
|
||||
TopBar = {
|
||||
sNodeName = "TopBarPanel",
|
||||
sCtrlName = "Game.UI.TopBarEx.TopBarCtrl"
|
||||
},
|
||||
TMPBuildSaveTime = {sComponentName = "TMP_Text"},
|
||||
ani_root = {
|
||||
sNodeName = "----SafeAreaRoot----",
|
||||
sComponentName = "Animator"
|
||||
},
|
||||
BuildDetail = {
|
||||
sCtrlName = "Game.UI.StarTower.Build.StarTowerBuildDetailItemCtrl"
|
||||
},
|
||||
ContentList = {
|
||||
sCtrlName = "Game.UI.StarTower.Build.StarTowerBuildContentCtrl"
|
||||
},
|
||||
btnSave = {
|
||||
sComponentName = "UIButton",
|
||||
callback = "OnBtnClick_Save"
|
||||
},
|
||||
txtBtnSave = {
|
||||
sComponentName = "TMP_Text",
|
||||
sLanguageId = "Rank_Build_Save_Preselection"
|
||||
}
|
||||
}
|
||||
RankBuildDetailCtrl._mapEventConfig = {}
|
||||
function RankBuildDetailCtrl:InitPanel()
|
||||
if self.mapBuild == nil then
|
||||
return
|
||||
end
|
||||
local mapBuildData = {
|
||||
sName = ConfigTable.GetUIText("Rank_Build_Detail_Name"),
|
||||
tbChar = {},
|
||||
nScore = self.mapBuild.BuildScore,
|
||||
mapRank = PlayerData.Build:CalBuildRank(self.mapBuild.BuildScore),
|
||||
bLock = false,
|
||||
bPreference = false,
|
||||
bDetail = false,
|
||||
tbDisc = {},
|
||||
tbSecondarySkill = {},
|
||||
tbPotentials = {},
|
||||
tbNotes = {},
|
||||
bRankPreview = true
|
||||
}
|
||||
for i = 1, 3 do
|
||||
local nCharId = self.mapBuild.Chars[i].Id
|
||||
local nPotentialCount = 0
|
||||
for _, v in ipairs(self.mapBuild.Potentials) do
|
||||
local mapPotentialCfg = ConfigTable.GetData("Potential", v.PotentialId)
|
||||
if mapPotentialCfg ~= nil and mapPotentialCfg.CharId == nCharId then
|
||||
nPotentialCount = nPotentialCount + v.Level
|
||||
end
|
||||
end
|
||||
table.insert(mapBuildData.tbChar, {
|
||||
nTid = self.mapBuild.Chars[i].Id,
|
||||
nPotentialCount = nPotentialCount
|
||||
})
|
||||
end
|
||||
for _, v in ipairs(self.mapBuild.Potentials) do
|
||||
local potentialCfg = ConfigTable.GetData("Potential", v.PotentialId)
|
||||
if potentialCfg then
|
||||
local nCharId = potentialCfg.CharId
|
||||
if nil == mapBuildData.tbPotentials[nCharId] then
|
||||
mapBuildData.tbPotentials[nCharId] = {}
|
||||
end
|
||||
table.insert(mapBuildData.tbPotentials[nCharId], {
|
||||
nPotentialId = v.PotentialId,
|
||||
nLevel = v.Level
|
||||
})
|
||||
end
|
||||
end
|
||||
local tbNotes = {}
|
||||
for _, v in pairs(self.mapBuild.Notes) do
|
||||
tbNotes[v.Tid] = v.Qty
|
||||
end
|
||||
mapBuildData.tbNotes = tbNotes
|
||||
mapBuildData.tbDisc = self.mapBuild.Discs
|
||||
mapBuildData.tbSecondarySkill = self.mapBuild.ActiveSecondaryIds
|
||||
self._mapNode.BuildDetail:Refresh(mapBuildData)
|
||||
self._mapNode.ContentList:Refresh(mapBuildData)
|
||||
end
|
||||
function RankBuildDetailCtrl:Awake()
|
||||
local tbParam = self:GetPanelParam()
|
||||
if type(tbParam) == "table" then
|
||||
self.mapBuild = tbParam[1]
|
||||
end
|
||||
end
|
||||
function RankBuildDetailCtrl:OnEnable()
|
||||
self:InitPanel()
|
||||
end
|
||||
function RankBuildDetailCtrl:OnDisable()
|
||||
end
|
||||
function RankBuildDetailCtrl:OnDestroy()
|
||||
end
|
||||
function RankBuildDetailCtrl:OnRelease()
|
||||
end
|
||||
function RankBuildDetailCtrl:OnBtnClick_Save()
|
||||
local tbAllPreselectionList = PlayerData.PotentialPreselection:GetPreselectionList()
|
||||
local nAllCount = ConfigTable.GetConfigNumber("PotentialPreselectionMaxCount")
|
||||
if nAllCount <= #tbAllPreselectionList then
|
||||
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("Potential_Preselection_Build_Max"))
|
||||
return
|
||||
end
|
||||
local tbCharPotential = {}
|
||||
for k, v in ipairs(self.mapBuild.Chars) do
|
||||
local nCharId = v.Id
|
||||
local tbPotential = {}
|
||||
for _, data in ipairs(self.mapBuild.Potentials) do
|
||||
local mapPotentialCfg = ConfigTable.GetData("Potential", data.PotentialId)
|
||||
if mapPotentialCfg ~= nil and mapPotentialCfg.CharId == nCharId then
|
||||
table.insert(tbPotential, {
|
||||
Id = data.PotentialId,
|
||||
Level = data.Level
|
||||
})
|
||||
end
|
||||
end
|
||||
table.insert(tbCharPotential, {CharId = nCharId, Potentials = tbPotential})
|
||||
end
|
||||
local sName = ConfigTable.GetUIText("Potential_Preselection_Name_Init")
|
||||
local callback = function()
|
||||
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("Potential_Preselection_Save_Form_Rank"))
|
||||
end
|
||||
PlayerData.PotentialPreselection:SavePreselectionFromRank(sName, false, tbCharPotential, callback)
|
||||
end
|
||||
return RankBuildDetailCtrl
|
||||
@@ -0,0 +1,18 @@
|
||||
local RankBuildDetailPanel = class("RankBuildDetailPanel", BasePanel)
|
||||
RankBuildDetailPanel._tbDefine = {
|
||||
{
|
||||
sPrefabPath = "StarTowerBuild/RankBuildDetailPanel.prefab",
|
||||
sCtrlName = "Game.UI.StarTower.Build.RankBuildDetailCtrl"
|
||||
}
|
||||
}
|
||||
function RankBuildDetailPanel:Awake()
|
||||
end
|
||||
function RankBuildDetailPanel:OnEnable()
|
||||
end
|
||||
function RankBuildDetailPanel:OnDisable()
|
||||
end
|
||||
function RankBuildDetailPanel:OnDestroy()
|
||||
end
|
||||
function RankBuildDetailPanel:OnRelease()
|
||||
end
|
||||
return RankBuildDetailPanel
|
||||
@@ -20,6 +20,7 @@ StarTowerBuildBriefCtrl._mapNodeConfig = {
|
||||
sComponentName = "UIButton",
|
||||
callback = "OnBtnClick_OpenFilter"
|
||||
},
|
||||
imgFilterChoose = {},
|
||||
btn_DeleteBuild = {
|
||||
sComponentName = "UIButton",
|
||||
callback = "OnBtnClick_SelectDelete"
|
||||
@@ -134,7 +135,9 @@ StarTowerBuildBriefCtrl._mapNodeConfig = {
|
||||
sComponentName = "Animator"
|
||||
}
|
||||
}
|
||||
StarTowerBuildBriefCtrl._mapEventConfig = {}
|
||||
StarTowerBuildBriefCtrl._mapEventConfig = {
|
||||
[EventId.FilterConfirm] = "OnEvent_RefreshByFilter"
|
||||
}
|
||||
local SortType = {Time = 1, Score = 2}
|
||||
local SortOrder = {Descending = true, Ascending = false}
|
||||
local PanelState = {
|
||||
@@ -153,6 +156,8 @@ local FilterGradeIdx = {
|
||||
btn_FilterGradeC = 0
|
||||
}
|
||||
function StarTowerBuildBriefCtrl:RefreshList()
|
||||
local isDirty = PlayerData.Filter:IsDirty(AllEnum.OptionType.Char)
|
||||
self._mapNode.imgFilterChoose:SetActive(isDirty)
|
||||
if #self._tbAllBuild == 0 then
|
||||
self._mapNode.ExistContent:SetActive(false)
|
||||
self._mapNode.EmptyContent:SetActive(true)
|
||||
@@ -198,7 +203,11 @@ function StarTowerBuildBriefCtrl:FilterAndSortBuildData()
|
||||
if self.FilterPass ~= self.FilterUnpass and (not (not self.FilterPass or mapBuild.bPass) or self.FilterUnpass and mapBuild.bPass) then
|
||||
return
|
||||
end
|
||||
table.insert(ret, mapBuild)
|
||||
local nCharId = mapBuild.tbChar[1].nTid
|
||||
local isFilter = PlayerData.Filter:CheckFilterByChar(nCharId)
|
||||
if isFilter then
|
||||
table.insert(ret, mapBuild)
|
||||
end
|
||||
end
|
||||
for _, mapBuild in ipairs(self._tbAllBuild) do
|
||||
filterBuild(mapBuild)
|
||||
@@ -473,6 +482,10 @@ function StarTowerBuildBriefCtrl:Awake()
|
||||
self.nSortype = SortType.Score
|
||||
self.nSortOrder = SortOrder.Descending
|
||||
self.nPanelState = PanelState.Normal
|
||||
self.mapCacheFilter = {}
|
||||
self.tbOption = {
|
||||
AllEnum.ChooseOption.Char_Element
|
||||
}
|
||||
self:InitSort()
|
||||
self.mapListItemCtrl = {}
|
||||
self.tbCoinRate = ConfigTable.GetConfigArray("StarTowerBuildTransformParas")
|
||||
@@ -485,6 +498,14 @@ function StarTowerBuildBriefCtrl:Awake()
|
||||
self._mapNode.DD_selectDelect:SetList(tbLanguageId, 3)
|
||||
end
|
||||
function StarTowerBuildBriefCtrl:OnEnable()
|
||||
if next(self.mapCacheFilter) ~= nil then
|
||||
for fKey, data in pairs(self.mapCacheFilter) do
|
||||
for sKey, value in pairs(data) do
|
||||
PlayerData.Filter:SetCacheFilterByKey(fKey, sKey, value)
|
||||
end
|
||||
end
|
||||
PlayerData.Filter:SyncFilterByCache()
|
||||
end
|
||||
local GetDataCallback = function(tbBuildData, mapAllBuild)
|
||||
self._mapAllBuild = mapAllBuild
|
||||
self._tbAllBuild = tbBuildData
|
||||
@@ -502,6 +523,19 @@ function StarTowerBuildBriefCtrl:OnDisable()
|
||||
self.mapListItemCtrl[nInstanceId] = nil
|
||||
end
|
||||
self.mapListItemCtrl = {}
|
||||
self.mapCacheFilter = {}
|
||||
for _, fKey in ipairs(self.tbOption) do
|
||||
if self.mapCacheFilter[fKey] == nil then
|
||||
self.mapCacheFilter[fKey] = {}
|
||||
end
|
||||
local data = PlayerData.Filter:GetCacheFilter(fKey)
|
||||
if data ~= nil then
|
||||
for sKey, value in pairs(data) do
|
||||
self.mapCacheFilter[fKey][sKey] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
PlayerData.Filter:Reset(self.tbOption)
|
||||
end
|
||||
function StarTowerBuildBriefCtrl:OnDestroy()
|
||||
end
|
||||
@@ -642,6 +676,7 @@ function StarTowerBuildBriefCtrl:OnBtnClick_OpenDeleteHint(btn)
|
||||
self:OpenConfirmHint()
|
||||
end
|
||||
function StarTowerBuildBriefCtrl:OnBtnClick_OpenFilter(btn)
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.FilterPopupPanel, self.tbOption)
|
||||
end
|
||||
function StarTowerBuildBriefCtrl:OnBtnClick_Result1(btn)
|
||||
local mapData = {
|
||||
@@ -651,4 +686,29 @@ function StarTowerBuildBriefCtrl:OnBtnClick_Result1(btn)
|
||||
}
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.ItemTips, btn.transform, mapData)
|
||||
end
|
||||
function StarTowerBuildBriefCtrl:OnEvent_RefreshByFilter()
|
||||
local bChange = false
|
||||
local tbTemp = clone(self.mapCacheFilter)
|
||||
self.mapCacheFilter = {}
|
||||
for _, fKey in ipairs(self.tbOption) do
|
||||
if self.mapCacheFilter[fKey] == nil then
|
||||
self.mapCacheFilter[fKey] = {}
|
||||
end
|
||||
local data = PlayerData.Filter:GetCacheFilter(fKey)
|
||||
if data ~= nil then
|
||||
if tbTemp[fKey] == nil then
|
||||
bChange = true
|
||||
end
|
||||
for sKey, value in pairs(data) do
|
||||
if not bChange and (tbTemp[fKey][sKey] == nil or tbTemp[fKey][sKey] ~= value) then
|
||||
bChange = true
|
||||
end
|
||||
self.mapCacheFilter[fKey][sKey] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
if bChange then
|
||||
self:RefreshList()
|
||||
end
|
||||
end
|
||||
return StarTowerBuildBriefCtrl
|
||||
|
||||
@@ -127,14 +127,16 @@ function StarTowerBuildContentCtrl:InitPotential()
|
||||
self._mapNode.goPotentialList.gameObject:SetActive(not bEmpty)
|
||||
end
|
||||
function StarTowerBuildContentCtrl:InitDisc()
|
||||
local mapTowerCfg = ConfigTable.GetData("StarTower", self.mapBuild.nTowerId)
|
||||
local tbNote = {}
|
||||
if mapTowerCfg ~= nil then
|
||||
local nDropGroup = mapTowerCfg.SubNoteSkillDropGroupId
|
||||
local tbNoteDrop = CacheTable.GetData("_SubNoteSkillDropGroup", nDropGroup)
|
||||
if tbNoteDrop ~= nil then
|
||||
for _, v in ipairs(tbNoteDrop) do
|
||||
table.insert(tbNote, v.SubNoteSkillId)
|
||||
if self.mapBuild.nTowerId ~= nil then
|
||||
local mapTowerCfg = ConfigTable.GetData("StarTower", self.mapBuild.nTowerId)
|
||||
if mapTowerCfg ~= nil then
|
||||
local nDropGroup = mapTowerCfg.SubNoteSkillDropGroupId
|
||||
local tbNoteDrop = CacheTable.GetData("_SubNoteSkillDropGroup", nDropGroup)
|
||||
if tbNoteDrop ~= nil then
|
||||
for _, v in ipairs(tbNoteDrop) do
|
||||
table.insert(tbNote, v.SubNoteSkillId)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -170,6 +172,9 @@ function StarTowerBuildContentCtrl:InitDisc()
|
||||
if mapDisc == nil then
|
||||
mapDisc = PlayerData.Disc:GetTrialDiscById(nId)
|
||||
end
|
||||
if mapDisc == nil then
|
||||
mapDisc = PlayerData.Disc:GetRankDetailDisc(nId)
|
||||
end
|
||||
if mapDisc ~= nil then
|
||||
local tbSubSkill = mapDisc:GetAllSubSkill(self.mapBuild.tbNotes)
|
||||
for nSkillIndex, v in ipairs(tbSubSkill) do
|
||||
|
||||
@@ -90,14 +90,19 @@ end
|
||||
function StarTowerBuildDetailItemCtrl:RefreshChar()
|
||||
for i = 1, 3 do
|
||||
local nCharTid = self.mapBuild.tbChar[i].nTid
|
||||
local nCharSkinId = PlayerData.Char:GetCharSkinId(nCharTid)
|
||||
local mapCharSkin = ConfigTable.GetData_CharacterSkin(nCharSkinId)
|
||||
local mapCharCfg = ConfigTable.GetData_Character(nCharTid)
|
||||
local sFrame = AllEnum.FrameType_New.BoardFrame .. AllEnum.BoardFrameColor[mapCharCfg.Grade]
|
||||
self:SetPngSprite(self._mapNode.imgCharIcon[i], mapCharSkin.Icon, AllEnum.CharHeadIconSurfix.XXL)
|
||||
self:SetAtlasSprite(self._mapNode.imgCharFrame[i], "12_rare", sFrame, true)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtPotentialCount[i], self.mapBuild.tbChar[i].nPotentialCount)
|
||||
self:SetAtlasSprite(self._mapNode.imgCharElement[i], "12_rare", AllEnum.Char_Element[mapCharCfg.EET].icon)
|
||||
if mapCharCfg ~= nil then
|
||||
local nCharSkinId = PlayerData.Char:GetCharSkinId(nCharTid)
|
||||
if self.mapBuild.bRankPreview then
|
||||
nCharSkinId = mapCharCfg.DefaultSkinId
|
||||
end
|
||||
local mapCharSkin = ConfigTable.GetData_CharacterSkin(nCharSkinId)
|
||||
local sFrame = AllEnum.FrameType_New.BoardFrame .. AllEnum.BoardFrameColor[mapCharCfg.Grade]
|
||||
self:SetPngSprite(self._mapNode.imgCharIcon[i], mapCharSkin.Icon, AllEnum.CharHeadIconSurfix.XXL)
|
||||
self:SetAtlasSprite(self._mapNode.imgCharFrame[i], "12_rare", sFrame, true)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtPotentialCount[i], self.mapBuild.tbChar[i].nPotentialCount)
|
||||
self:SetAtlasSprite(self._mapNode.imgCharElement[i], "12_rare", AllEnum.Char_Element[mapCharCfg.EET].icon)
|
||||
end
|
||||
end
|
||||
end
|
||||
function StarTowerBuildDetailItemCtrl:RefreshDisc()
|
||||
@@ -108,7 +113,7 @@ function StarTowerBuildDetailItemCtrl:RefreshDisc()
|
||||
end
|
||||
nIndex = nIndex + 1
|
||||
end
|
||||
self._mapNode.btnDiscDetail.gameObject:SetActive(self.mapBuild.bTrial ~= true)
|
||||
self._mapNode.btnDiscDetail.gameObject:SetActive(self.mapBuild.bTrial ~= true and not self.mapBuild.bRankPreview)
|
||||
end
|
||||
function StarTowerBuildDetailItemCtrl:SetName(sName)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtBuildName, sName)
|
||||
@@ -131,66 +136,72 @@ function StarTowerBuildDetailItemCtrl:OnBtnClick_Attr()
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.BuildAttrPreview, self.mapBuild.mapRank.Id, self.mapBuild.nScore)
|
||||
end
|
||||
function StarTowerBuildDetailItemCtrl:OnBtnClick_Disc(btn, nIndex)
|
||||
if self.mapBuild.bTrial == true then
|
||||
local nDiscId = self.mapBuild.tbDisc[nIndex]
|
||||
local nDiscId = self.mapBuild.tbDisc[nIndex]
|
||||
if self.mapBuild.bRankPreview == true then
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.DiscSample, nDiscId)
|
||||
elseif self.mapBuild.bTrial == true then
|
||||
local mapDiscData = PlayerData.Disc:GetDiscById(nDiscId)
|
||||
if mapDiscData == nil then
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.DiscSample, nDiscId)
|
||||
else
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.Disc, nDiscId, {nDiscId})
|
||||
end
|
||||
return
|
||||
end
|
||||
local nIdx = 0
|
||||
local nDiscId = 0
|
||||
local tbAllDisc = {}
|
||||
for _, nId in ipairs(self.mapBuild.tbDisc) do
|
||||
nIdx = nIdx + 1
|
||||
if nIdx == nIndex then
|
||||
nDiscId = nId
|
||||
else
|
||||
local nIdx = 0
|
||||
local nDiscId = 0
|
||||
local tbAllDisc = {}
|
||||
for _, nId in ipairs(self.mapBuild.tbDisc) do
|
||||
nIdx = nIdx + 1
|
||||
if nIdx == nIndex then
|
||||
nDiscId = nId
|
||||
end
|
||||
table.insert(tbAllDisc, nId)
|
||||
end
|
||||
table.insert(tbAllDisc, nId)
|
||||
end
|
||||
if nDiscId ~= 0 then
|
||||
local mapDisc = PlayerData.Disc:GetDiscById(nDiscId)
|
||||
if mapDisc ~= nil then
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.Disc, nDiscId, tbAllDisc)
|
||||
if nDiscId ~= 0 then
|
||||
local mapDisc = PlayerData.Disc:GetDiscById(nDiscId)
|
||||
if mapDisc ~= nil then
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.Disc, nDiscId, tbAllDisc)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
function StarTowerBuildDetailItemCtrl:OnBtnClick_Leader()
|
||||
if self.mapBuild.bTrial == true then
|
||||
local nCharTid = self.mapBuild.tbChar[1].nTid
|
||||
local nCharTid = self.mapBuild.tbChar[1].nTid
|
||||
if self.mapBuild.bRankPreview == true then
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgTrialPanel, PanelId.CharInfoTrial, nCharTid)
|
||||
elseif self.mapBuild.bTrial == true then
|
||||
local mapCharCfg = PlayerData.Char:GetCharDataByTid(nCharTid)
|
||||
if mapCharCfg == nil then
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgTrialPanel, PanelId.CharInfoTrial, nCharTid)
|
||||
else
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgPanel, PanelId.CharInfo, nCharTid, {nCharTid})
|
||||
end
|
||||
return
|
||||
else
|
||||
local tbCharId = {}
|
||||
for _, v in ipairs(self.mapBuild.tbChar) do
|
||||
table.insert(tbCharId, v.nTid)
|
||||
end
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgPanel, PanelId.CharInfo, tbCharId[1], tbCharId, true)
|
||||
end
|
||||
local tbCharId = {}
|
||||
for _, v in ipairs(self.mapBuild.tbChar) do
|
||||
table.insert(tbCharId, v.nTid)
|
||||
end
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgPanel, PanelId.CharInfo, tbCharId[1], tbCharId, true)
|
||||
end
|
||||
function StarTowerBuildDetailItemCtrl:OnBtnClick_Sub(btn, nIndex)
|
||||
if self.mapBuild.bTrial == true then
|
||||
local nCharTid = self.mapBuild.tbChar[nIndex + 1].nTid
|
||||
local nCharTid = self.mapBuild.tbChar[nIndex + 1].nTid
|
||||
if self.mapBuild.bRankPreview == true then
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgTrialPanel, PanelId.CharInfoTrial, nCharTid)
|
||||
elseif self.mapBuild.bTrial == true then
|
||||
local mapCharCfg = PlayerData.Char:GetCharDataByTid(nCharTid)
|
||||
if mapCharCfg == nil then
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgTrialPanel, PanelId.CharInfoTrial, nCharTid)
|
||||
else
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgPanel, PanelId.CharInfo, nCharTid, {nCharTid})
|
||||
end
|
||||
return
|
||||
else
|
||||
local tbCharId = {}
|
||||
for _, v in ipairs(self.mapBuild.tbChar) do
|
||||
table.insert(tbCharId, v.nTid)
|
||||
end
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgPanel, PanelId.CharInfo, tbCharId[nIndex + 1], tbCharId, true)
|
||||
end
|
||||
local tbCharId = {}
|
||||
for _, v in ipairs(self.mapBuild.tbChar) do
|
||||
table.insert(tbCharId, v.nTid)
|
||||
end
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgPanel, PanelId.CharInfo, tbCharId[nIndex + 1], tbCharId, true)
|
||||
end
|
||||
function StarTowerBuildDetailItemCtrl:OnBtnClick_DiscDetail(btn, nIndex)
|
||||
if self.mapBuild.bTrial == true then
|
||||
@@ -207,6 +218,9 @@ function StarTowerBuildDetailItemCtrl:OnBtnClick_DiscDetail(btn, nIndex)
|
||||
if mapDisc == nil then
|
||||
mapDisc = PlayerData.Disc:GetTrialDiscById(tbDisc[i])
|
||||
end
|
||||
if mapDisc == nil then
|
||||
mapDisc = PlayerData.Disc:GetRankDetailDisc(tbDisc[i])
|
||||
end
|
||||
mapDiscData[tbDisc[i]] = mapDisc
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user