【云游商人】更改索引方式

dev_chengFeng
ZhangBiao 2021-12-30 15:51:12 +08:00
parent 973e19ac66
commit f500bc9ed1
1 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@ local parent
local sortingOrder=0
local func
local data
local ComposeBook = ConfigManager.GetConfig(ConfigName.ComposeBook)
function this:InitComponent(gameObject)
self.titleText=Util.GetGameObject(gameObject,"TitleText"):GetComponent("Text")
@ -62,7 +63,7 @@ function this:OnShow(_parent,...)
local EquipedEquipList = HeroManager.GetEquipedEquipList()
for i = 1, #data.otherData.needItems do
for j = 1, #list do
if data.otherData.needItems[i] == tonumber(list[j].itemConfig.Id) then
if ComposeBook[data.otherData.needItems[i]].NeedItems[1][1] == tonumber(list[j].itemConfig.Id) then
local sdata = {}
sdata.Id = tonumber(list[j].itemConfig.Id)
sdata.Num = list[j].num
@ -73,7 +74,7 @@ function this:OnShow(_parent,...)
end
for i = 1, #data.otherData.needItems do
for j = 1, #EquipedEquipList do
if data.otherData.needItems[i] == tonumber(EquipedEquipList[j]) then
if ComposeBook[data.otherData.needItems[i]].NeedItems[1][1] == tonumber(EquipedEquipList[j]) then
local sdata = {}
sdata.Id = tonumber(EquipedEquipList[j])
sdata.Num = 1