云游商人修改提交
parent
91710e2985
commit
abc5909014
|
@ -821,29 +821,30 @@ end
|
|||
|
||||
--红点检测(云游商人)
|
||||
function this.CheckSingleRed(data)
|
||||
local NeedCost = ConfigManager.GetConfigData(ConfigName.ComposeBook,data.otherData.needItems[1]).NeedCost
|
||||
local ComposeBook = ConfigManager.GetConfig(ConfigName.ComposeBook)
|
||||
if data.progress > 0 then
|
||||
if BagManager.GetTotalItemNum(NeedCost[1][1]) >= NeedCost[1][2] then
|
||||
local list = BagManager.GetBagItemDataByItemType(ItemBaseType.Equip)
|
||||
local EquipedEquipList = HeroManager.GetEquipedEquipList()
|
||||
for i = 1, #data.otherData.needItems do
|
||||
for j = 1, #list do
|
||||
if ComposeBook[data.otherData.needItems[i]].NeedItems[1][1] == list[j].itemConfig.Id then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
for i = 1, #data.otherData.needItems do
|
||||
for j = 1, #EquipedEquipList do
|
||||
if ComposeBook[data.otherData.needItems[i]].NeedItems[1][1] == EquipedEquipList[j] then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return false
|
||||
-- local NeedCost = ConfigManager.GetConfigData(ConfigName.ComposeBook,data.otherData.needItems[1]).NeedCost
|
||||
-- local ComposeBook = ConfigManager.GetConfig(ConfigName.ComposeBook)
|
||||
-- if data.progress > 0 then
|
||||
-- if BagManager.GetTotalItemNum(NeedCost[1][1]) >= NeedCost[1][2] then
|
||||
-- local list = BagManager.GetBagItemDataByItemType(ItemBaseType.Equip)
|
||||
-- local EquipedEquipList = HeroManager.GetEquipedEquipList()
|
||||
-- for i = 1, #data.otherData.needItems do
|
||||
-- for j = 1, #list do
|
||||
-- if ComposeBook[data.otherData.needItems[i]].NeedItems[1][1] == list[j].itemConfig.Id then
|
||||
-- return true
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- for i = 1, #data.otherData.needItems do
|
||||
-- for j = 1, #EquipedEquipList do
|
||||
-- if ComposeBook[data.otherData.needItems[i]].NeedItems[1][1] == EquipedEquipList[j] then
|
||||
-- return true
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- return false
|
||||
end
|
||||
|
||||
--新三界降魔红点检测
|
||||
|
|
|
@ -30,9 +30,10 @@ end
|
|||
--绑定事件(用于子类重写)
|
||||
function ItemUpstarPre:BindEvent()
|
||||
Util.AddOnceClick(self.btnMaskNeed,function ()
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.YunYouMan,self.data,function ()
|
||||
self:Refresh()
|
||||
end)
|
||||
|
||||
-- UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.YunYouMan,self.data,function ()
|
||||
-- self:Refresh()
|
||||
-- end)
|
||||
end)
|
||||
Util.AddOnceClick(self.btnExchange,function ()
|
||||
if self.data.otherData.selectId == 0 then
|
||||
|
@ -70,6 +71,7 @@ end
|
|||
|
||||
function ItemUpstarPre:Refresh()--ComposeBook[data.otherData.needItems[i]].NeedItems[1][1]
|
||||
-- LogPink("self.data.missionId.:"..tostring(self.data.missionId).." #self.data.otherData.needItems:"..tostring(#self.data.otherData.needItems))
|
||||
self.data.otherData.selectId=self.data.otherData.needItems[1]
|
||||
local needItemId = self.data.otherData.selectId == 0 and self.data.otherData.needItems[1] or self.data.otherData.selectId
|
||||
local configData = ConfigManager.GetConfigData(ConfigName.ComposeBook,needItemId)
|
||||
local rewardList = {configData.NeedItems[1],configData.NeedCost[1],configData.GoalItems[1]}
|
||||
|
@ -101,6 +103,7 @@ function ItemUpstarPre:SetMask()
|
|||
Util.GetGameObject(self.itemList[3].gameObject,"item/icon"):SetActive(self.data.otherData.IsShowItem)
|
||||
else
|
||||
self.btnMaskNeedAdd:SetActive(false)
|
||||
self.btnMaskNeed:SetActive(false)
|
||||
self.btnMaskGet:SetActive(false)
|
||||
Util.GetGameObject(self.itemList[1].gameObject,"effects"):SetActive(true)
|
||||
Util.GetGameObject(self.itemList[1].gameObject,"item/icon"):SetActive(true)
|
||||
|
|
Loading…
Reference in New Issue