【魂印图鉴修改】

dev_chengFeng
zhangqiang 2021-05-17 18:24:47 +08:00
parent d0d20db65b
commit fae85fc903
1 changed files with 34 additions and 15 deletions

View File

@ -34,7 +34,6 @@ function SoulPrintHandBook:InitComponent()
this.scrollView.moveTween.MomentumAmount = 1
this.scrollView.moveTween.Strength = 2
allSoulPrintData= ConfigManager.GetAllConfigsDataByKey(ConfigName.EquipConfig,"Position",5)
end
function SoulPrintHandBook:BindEvent()
@ -81,19 +80,39 @@ function SoulPrintHandBook:OnOpen()
end
function SoulPrintHandBook:OnShow()
this.GetAllData()
curIndex=0
this.OnRefresh(curIndex)
this.SetBottomBarIsActive()
end
function this.GetAllData()
allSoulPrintData = {}
local allCurSoulPrintData= ConfigManager.GetAllConfigsDataByKey(ConfigName.EquipConfig,"Position",5)
for i = 1, #allCurSoulPrintData do
local curSpiritAnimalBook
for _, configInfo in ConfigPairs(ConfigManager.GetConfig(ConfigName.SpiritAnimalBook)) do
if configInfo.FetterType == 2 and configInfo.Teamers and configInfo.Teamers[1] and configInfo.Teamers[1] == allCurSoulPrintData[i].Id then
curSpiritAnimalBook = configInfo
break
end
end
if curSpiritAnimalBook then--表里只有高品质 所以低品质直接添加
if PlayerManager.level >= curSpiritAnimalBook.OpenLevel then
table.insert(allSoulPrintData,allCurSoulPrintData[i])
end
else
table.insert(allSoulPrintData,allCurSoulPrintData[i])
end
end
end
--特殊的开启条件
function this.SetBottomBarIsActive()
for i = 1, #tabs do
--为白金魂印定开启规则
if i == 4 then
local num = ConfigData[89].Value
tabs[i]:SetActive(PlayerManager.level >= tonumber(num))
end
-- if i == 4 then
-- local num = ConfigData[89].Value
-- tabs[i]:SetActive(PlayerManager.level >= tonumber(num))
-- end
end
end
@ -110,18 +129,18 @@ local orginLayer2=0
--打开页面时,页面数据刷新
function this.OnRefresh(index)
local tempData={}
local num = ConfigData[89].Value
-- local num = ConfigData[89].Value
if index==0 then
if PlayerManager.level >= tonumber(num) then--达到80级才显示白色魂印
-- if PlayerManager.level >= tonumber(num) then--达到80级才显示白色魂印
tempData=allSoulPrintData
else
for i,v in ipairs(allSoulPrintData) do
if v.Quality ~= 7 then
table.insert(tempData, v)
end
end
end
-- else
-- for i,v in ipairs(allSoulPrintData) do
-- if v.Quality ~= 7 then
-- table.insert(tempData, v)
-- end
-- end
-- end
else
for i,v in ipairs(allSoulPrintData) do
if v.Quality==(index+3) then