【云游商人】怎加妖晶数量检测

dev_chengFeng
ZhangBiao 2021-04-22 18:12:16 +08:00
parent 99602b3008
commit 75be84bbff
1 changed files with 15 additions and 12 deletions

View File

@ -198,20 +198,23 @@ function this.UpdateSingleTypeData(actType)
end end
function this.CheckSingleRed(data) function this.CheckSingleRed(data)
if data.progress == 0 then local NeedCost = ConfigManager.GetConfigData(ConfigName.ComposeBook,data.otherData.needItems[1]).NeedCost
local list = BagManager.GetBagItemDataByItemType(ItemBaseType.Equip) if data.progress > 0 then
local EquipedEquipList = HeroManager.GetEquipedEquipList() if BagManager.GetTotalItemNum(NeedCost[1][1]) >= NeedCost[1][2] then
for i = 1, #data.otherData.needItems do local list = BagManager.GetBagItemDataByItemType(ItemBaseType.Equip)
for j = 1, #list do local EquipedEquipList = HeroManager.GetEquipedEquipList()
if data.otherData.needItems[i] == list[j].itemConfig.Id then for i = 1, #data.otherData.needItems do
return true for j = 1, #list do
if data.otherData.needItems[i] == list[j].itemConfig.Id then
return true
end
end end
end end
end for i = 1, #data.otherData.needItems do
for i = 1, #data.otherData.needItems do for j = 1, #EquipedEquipList do
for j = 1, #EquipedEquipList do if data.otherData.needItems[i] == EquipedEquipList[j] then
if data.otherData.needItems[i] == EquipedEquipList[j] then return true
return true end
end end
end end
end end