【ID1010465】

增加白金装备图鉴
dev_chengFeng
jiaoyangna 2021-10-14 12:01:55 +08:00
parent 81166ae892
commit 4f580146bd
11 changed files with 127 additions and 15 deletions

View File

@ -943,6 +943,7 @@ RedPointType = {
SoulPrint_Fetter = 798, --魂印羁绊 SoulPrint_Fetter = 798, --魂印羁绊
TianShuMiJuan = 799, --天书秘卷红点 TianShuMiJuan = 799, --天书秘卷红点
TianShuPokemon_Fetter = 800,--灵兽羁绊 TianShuPokemon_Fetter = 800,--灵兽羁绊
Equip_Fetter = 805, --装备羁绊
--跨服天梯 --跨服天梯
JumpServer_MainCity = 820,--主界面跨服天梯 JumpServer_MainCity = 820,--主界面跨服天梯

View File

@ -766,6 +766,9 @@ RELIC_STATUS_FIELD = protobuf.FieldDescriptor();
LIKABLEINFO = protobuf.Descriptor(); LIKABLEINFO = protobuf.Descriptor();
LIKABLEINFO_HEROSTATICID_FIELD = protobuf.FieldDescriptor(); LIKABLEINFO_HEROSTATICID_FIELD = protobuf.FieldDescriptor();
LIKABLEINFO_LIKABLENUM_FIELD = protobuf.FieldDescriptor(); LIKABLEINFO_LIKABLENUM_FIELD = protobuf.FieldDescriptor();
EQUIPBOOKINFO = protobuf.Descriptor();
EQUIPBOOKINFO_EQUIPID_FIELD = protobuf.FieldDescriptor();
EQUIPBOOKINFO_NUM_FIELD = protobuf.FieldDescriptor();
ERRORRESPONSE_ERRCODE_FIELD.name = "errCode" ERRORRESPONSE_ERRCODE_FIELD.name = "errCode"
ERRORRESPONSE_ERRCODE_FIELD.full_name = ".rpc.protocols.ErrorResponse.errCode" ERRORRESPONSE_ERRCODE_FIELD.full_name = ".rpc.protocols.ErrorResponse.errCode"
@ -8058,6 +8061,33 @@ LIKABLEINFO.enum_types = {}
LIKABLEINFO.fields = {LIKABLEINFO_HEROSTATICID_FIELD, LIKABLEINFO_LIKABLENUM_FIELD} LIKABLEINFO.fields = {LIKABLEINFO_HEROSTATICID_FIELD, LIKABLEINFO_LIKABLENUM_FIELD}
LIKABLEINFO.is_extendable = false LIKABLEINFO.is_extendable = false
LIKABLEINFO.extensions = {} LIKABLEINFO.extensions = {}
EQUIPBOOKINFO_EQUIPID_FIELD.name = "equipId"
EQUIPBOOKINFO_EQUIPID_FIELD.full_name = ".rpc.protocols.EquipBookInfo.equipId"
EQUIPBOOKINFO_EQUIPID_FIELD.number = 1
EQUIPBOOKINFO_EQUIPID_FIELD.index = 0
EQUIPBOOKINFO_EQUIPID_FIELD.label = 1
EQUIPBOOKINFO_EQUIPID_FIELD.has_default_value = false
EQUIPBOOKINFO_EQUIPID_FIELD.default_value = 0
EQUIPBOOKINFO_EQUIPID_FIELD.type = 5
EQUIPBOOKINFO_EQUIPID_FIELD.cpp_type = 1
EQUIPBOOKINFO_NUM_FIELD.name = "num"
EQUIPBOOKINFO_NUM_FIELD.full_name = ".rpc.protocols.EquipBookInfo.num"
EQUIPBOOKINFO_NUM_FIELD.number = 2
EQUIPBOOKINFO_NUM_FIELD.index = 1
EQUIPBOOKINFO_NUM_FIELD.label = 1
EQUIPBOOKINFO_NUM_FIELD.has_default_value = false
EQUIPBOOKINFO_NUM_FIELD.default_value = 0
EQUIPBOOKINFO_NUM_FIELD.type = 5
EQUIPBOOKINFO_NUM_FIELD.cpp_type = 1
EQUIPBOOKINFO.name = "EquipBookInfo"
EQUIPBOOKINFO.full_name = ".rpc.protocols.EquipBookInfo"
EQUIPBOOKINFO.nested_types = {}
EQUIPBOOKINFO.enum_types = {}
EQUIPBOOKINFO.fields = {EQUIPBOOKINFO_EQUIPID_FIELD, EQUIPBOOKINFO_NUM_FIELD}
EQUIPBOOKINFO.is_extendable = false
EQUIPBOOKINFO.extensions = {}
ActivityInfo = protobuf.Message(ACTIVITYINFO) ActivityInfo = protobuf.Message(ACTIVITYINFO)
ActivityInfo.MissionInfo = protobuf.Message(ACTIVITYINFO_MISSIONINFO) ActivityInfo.MissionInfo = protobuf.Message(ACTIVITYINFO_MISSIONINFO)
@ -8080,6 +8110,7 @@ Drop = protobuf.Message(DROP)
EndlessPoint = protobuf.Message(ENDLESSPOINT) EndlessPoint = protobuf.Message(ENDLESSPOINT)
EndlessRefreshInfo = protobuf.Message(ENDLESSREFRESHINFO) EndlessRefreshInfo = protobuf.Message(ENDLESSREFRESHINFO)
Equip = protobuf.Message(EQUIP) Equip = protobuf.Message(EQUIP)
EquipBookInfo = protobuf.Message(EQUIPBOOKINFO)
ErrorResponse = protobuf.Message(ERRORRESPONSE) ErrorResponse = protobuf.Message(ERRORRESPONSE)
EventBehaviorCommon = protobuf.Message(EVENTBEHAVIORCOMMON) EventBehaviorCommon = protobuf.Message(EVENTBEHAVIORCOMMON)
EventBehaviorValues = protobuf.Message(EVENTBEHAVIORVALUES) EventBehaviorValues = protobuf.Message(EVENTBEHAVIORVALUES)

View File

@ -99,6 +99,7 @@ GETALLPOKEMONRESPONSE_POKEMONGOT_FIELD = protobuf.FieldDescriptor();
GETALLPROPERTYINFORESPONSE = protobuf.Descriptor(); GETALLPROPERTYINFORESPONSE = protobuf.Descriptor();
GETALLPROPERTYINFORESPONSE_ALLBOOKENABLED_FIELD = protobuf.FieldDescriptor(); GETALLPROPERTYINFORESPONSE_ALLBOOKENABLED_FIELD = protobuf.FieldDescriptor();
GETALLPROPERTYINFORESPONSE_EQUIPGOT_FIELD = protobuf.FieldDescriptor(); GETALLPROPERTYINFORESPONSE_EQUIPGOT_FIELD = protobuf.FieldDescriptor();
GETALLPROPERTYINFORESPONSE_EQUIPLIST_FIELD = protobuf.FieldDescriptor();
REPLACETEAMPOKEMONINFOREQUEST = protobuf.Descriptor(); REPLACETEAMPOKEMONINFOREQUEST = protobuf.Descriptor();
REPLACETEAMPOKEMONINFOREQUEST_TEAMPOKEMONINFOS_FIELD = protobuf.FieldDescriptor(); REPLACETEAMPOKEMONINFOREQUEST_TEAMPOKEMONINFOS_FIELD = protobuf.FieldDescriptor();
POKENMONUPLEVELREQUEST = protobuf.Descriptor(); POKENMONUPLEVELREQUEST = protobuf.Descriptor();
@ -1119,11 +1120,22 @@ GETALLPROPERTYINFORESPONSE_EQUIPGOT_FIELD.default_value = {}
GETALLPROPERTYINFORESPONSE_EQUIPGOT_FIELD.type = 5 GETALLPROPERTYINFORESPONSE_EQUIPGOT_FIELD.type = 5
GETALLPROPERTYINFORESPONSE_EQUIPGOT_FIELD.cpp_type = 1 GETALLPROPERTYINFORESPONSE_EQUIPGOT_FIELD.cpp_type = 1
GETALLPROPERTYINFORESPONSE_EQUIPLIST_FIELD.name = "equipList"
GETALLPROPERTYINFORESPONSE_EQUIPLIST_FIELD.full_name = ".rpc.protocols.GetAllPropertyInfoResponse.equipList"
GETALLPROPERTYINFORESPONSE_EQUIPLIST_FIELD.number = 3
GETALLPROPERTYINFORESPONSE_EQUIPLIST_FIELD.index = 2
GETALLPROPERTYINFORESPONSE_EQUIPLIST_FIELD.label = 3
GETALLPROPERTYINFORESPONSE_EQUIPLIST_FIELD.has_default_value = false
GETALLPROPERTYINFORESPONSE_EQUIPLIST_FIELD.default_value = {}
GETALLPROPERTYINFORESPONSE_EQUIPLIST_FIELD.message_type = CommonProto_pb.EQUIPBOOKINFO
GETALLPROPERTYINFORESPONSE_EQUIPLIST_FIELD.type = 11
GETALLPROPERTYINFORESPONSE_EQUIPLIST_FIELD.cpp_type = 10
GETALLPROPERTYINFORESPONSE.name = "GetAllPropertyInfoResponse" GETALLPROPERTYINFORESPONSE.name = "GetAllPropertyInfoResponse"
GETALLPROPERTYINFORESPONSE.full_name = ".rpc.protocols.GetAllPropertyInfoResponse" GETALLPROPERTYINFORESPONSE.full_name = ".rpc.protocols.GetAllPropertyInfoResponse"
GETALLPROPERTYINFORESPONSE.nested_types = {} GETALLPROPERTYINFORESPONSE.nested_types = {}
GETALLPROPERTYINFORESPONSE.enum_types = {} GETALLPROPERTYINFORESPONSE.enum_types = {}
GETALLPROPERTYINFORESPONSE.fields = {GETALLPROPERTYINFORESPONSE_ALLBOOKENABLED_FIELD, GETALLPROPERTYINFORESPONSE_EQUIPGOT_FIELD} GETALLPROPERTYINFORESPONSE.fields = {GETALLPROPERTYINFORESPONSE_ALLBOOKENABLED_FIELD, GETALLPROPERTYINFORESPONSE_EQUIPGOT_FIELD, GETALLPROPERTYINFORESPONSE_EQUIPLIST_FIELD}
GETALLPROPERTYINFORESPONSE.is_extendable = false GETALLPROPERTYINFORESPONSE.is_extendable = false
GETALLPROPERTYINFORESPONSE.extensions = {} GETALLPROPERTYINFORESPONSE.extensions = {}
REPLACETEAMPOKEMONINFOREQUEST_TEAMPOKEMONINFOS_FIELD.name = "teamPokemonInfos" REPLACETEAMPOKEMONINFOREQUEST_TEAMPOKEMONINFOS_FIELD.name = "teamPokemonInfos"

View File

@ -594,6 +594,12 @@ function this.GoIntoBackData(drop)
if (#drop.itemlist > 0) then if (#drop.itemlist > 0) then
--BagManager.UpDataBagItemIdNumber(drop.itemlist) --BagManager.UpDataBagItemIdNumber(drop.itemlist)
--Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold) --Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold)
for i = 1, #drop.itemlist do
if itemConfig[drop.itemlist[i].itemId].ItemType == ItemType.Equip then
EquipManager.InitHaveEquipDatas(drop.itemlist[i].itemId,drop.itemlist[i].itemNum)
end
end
TianShuMiJuanManger.CheckFetterStatus(4)
CheckRedPointStatus(RedPointType.Recruit_Normal) CheckRedPointStatus(RedPointType.Recruit_Normal)
CheckRedPointStatus(RedPointType.Recruit_ShenJiang) CheckRedPointStatus(RedPointType.Recruit_ShenJiang)
CheckRedPointStatus(RedPointType.Recruit_Friend) CheckRedPointStatus(RedPointType.Recruit_Friend)
@ -633,6 +639,14 @@ function this.GoIntoBackData(drop)
end end
function this.GMCallBackData(drop) function this.GMCallBackData(drop)
if drop.itemlist and #drop.itemlist > 0 then
for i = 1, #drop.itemlist do
if itemConfig[drop.itemlist[i].itemId].ItemType == ItemType.Equip then
EquipManager.InitHaveEquipDatas(drop.itemlist[i].itemId,drop.itemlist[i].itemNum)
end
end
TianShuMiJuanManger.CheckFetterStatus(4)
end
--for i = 1, #drop.itemlist do --for i = 1, #drop.itemlist do
-- BagManager.UpdateBagData(drop.itemlist[i]) -- BagManager.UpdateBagData(drop.itemlist[i])
--end --end
@ -684,7 +698,11 @@ function this.GetTableByBackDropData(drop)
itemdata.num = drop.itemlist[i].itemNum itemdata.num = drop.itemlist[i].itemNum
table.insert(itemDataList, itemdata) table.insert(itemDataList, itemdata)
--BagManager.UpdateBagData(itemdata.backData) --BagManager.UpdateBagData(itemdata.backData)
if itemConfig[drop.itemlist[i].itemId].ItemType == ItemType.Equip then
EquipManager.InitHaveEquipDatas(drop.itemlist[i].itemId,drop.itemlist[i].itemNum)
end
end end
TianShuMiJuanManger.CheckFetterStatus(4)
CheckRedPointStatus(RedPointType.Recruit_Normal) CheckRedPointStatus(RedPointType.Recruit_Normal)
CheckRedPointStatus(RedPointType.Recruit_ShenJiang) CheckRedPointStatus(RedPointType.Recruit_ShenJiang)
CheckRedPointStatus(RedPointType.Recruit_Friend) CheckRedPointStatus(RedPointType.Recruit_Friend)
@ -810,7 +828,11 @@ function this.GetItemListFromTempBag(drop, isSave)
elseif this.dropIsSHowEquipPrint then--献祭 升星吞卡 掉落身上装备和魂印 但是不显示 前端做处理 elseif this.dropIsSHowEquipPrint then--献祭 升星吞卡 掉落身上装备和魂印 但是不显示 前端做处理
table.insert(itemDataList, itemdata) table.insert(itemDataList, itemdata)
end end
if itemConfig[drop.itemlist[i].itemId].ItemType == ItemType.Equip then
EquipManager.InitHaveEquipDatas(drop.itemlist[i].itemId,drop.itemlist[i].itemNum)
end
end end
TianShuMiJuanManger.CheckFetterStatus(4)
end end
if drop.equipId ~= nil and #drop.equipId > 0 then if drop.equipId ~= nil and #drop.equipId > 0 then
--LogError("获取宝物的数量:".. LengthOfTable(drop.equipId)) --LogError("获取宝物的数量:".. LengthOfTable(drop.equipId))
@ -1094,7 +1116,11 @@ function this.BagIndicationRefresh(msg)
if itemConfig[v.itemId].ItemType == ItemType.LingShouChip then--灵兽碎片获得刷新红点 if itemConfig[v.itemId].ItemType == ItemType.LingShouChip then--灵兽碎片获得刷新红点
Game.GlobalEvent:DispatchEvent(GameEvent.Pokemon.PokemonChipRefresh) Game.GlobalEvent:DispatchEvent(GameEvent.Pokemon.PokemonChipRefresh)
end end
if itemConfig[v.itemId].ItemType == ItemType.Equip then
EquipManager.InitHaveEquipDatas(v.itemId,v.itemNum)
end
end end
TianShuMiJuanManger.CheckFetterStatus(4)
end end
elseif msg.type == 1 then elseif msg.type == 1 then
--临时背包 --临时背包

View File

@ -6,10 +6,21 @@ local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
local equipStarsConfig = ConfigManager.GetConfig(ConfigName.EquipStarsConfig) local equipStarsConfig = ConfigManager.GetConfig(ConfigName.EquipStarsConfig)
local rewardGroupConfig=ConfigManager.GetConfig(ConfigName.RewardGroup) local rewardGroupConfig=ConfigManager.GetConfig(ConfigName.RewardGroup)
--已装备的
this.equipDatas = {}
function this.Initialize() function this.Initialize()
this.equipDatas = {}
this.HaveEquipDatas = {}
end
function this.InitHaveEquipDatas(id,num)
if not this.HaveEquipDatas[id] then
this.HaveEquipDatas[id] = 0
end
this.HaveEquipDatas[id] = this.HaveEquipDatas[id] + num
LogGreen("this.HaveEquipDatas[id]:"..this.HaveEquipDatas[id].." id:"..id)
end
function this.GetHaveEquipDatas()
return this.HaveEquipDatas
end end
--upHeroDid --upHeroDid

View File

@ -261,6 +261,11 @@ function this.AllBookEnableResponse(func)
end end
SoulPrintManager.UpdateAllHavedSoulPrint(msg.equipGot) SoulPrintManager.UpdateAllHavedSoulPrint(msg.equipGot)
end end
if msg.equipList then
for k,v in ipairs(msg.equipList) do
EquipManager.InitHaveEquipDatas(v.equipId,v.num)
end
end
TianShuMiJuanManger.OnLevelChange() TianShuMiJuanManger.OnLevelChange()
if func then if func then
func(msg) func(msg)

View File

@ -283,6 +283,7 @@ function this.InitRedPointAllRelate()
RPData:SetParent(RedPointType.Hero_Fetter,RedPointType.TianShuMiJuan) RPData:SetParent(RedPointType.Hero_Fetter,RedPointType.TianShuMiJuan)
RPData:SetParent(RedPointType.SoulPrint_Fetter,RedPointType.TianShuMiJuan) RPData:SetParent(RedPointType.SoulPrint_Fetter,RedPointType.TianShuMiJuan)
RPData:SetParent(RedPointType.TianShuPokemon_Fetter,RedPointType.TianShuMiJuan) RPData:SetParent(RedPointType.TianShuPokemon_Fetter,RedPointType.TianShuMiJuan)
RPData:SetParent(RedPointType.Equip_Fetter,RedPointType.TianShuMiJuan)
--牛气冲天 --牛气冲天
RPData:SetParent(RedPointType.NiuQiChongTian_1,RedPointType.NiuQiChongTian) RPData:SetParent(RedPointType.NiuQiChongTian_1,RedPointType.NiuQiChongTian)
@ -510,10 +511,10 @@ function this.RegisterRedCheckFunc()
RPData:AddCheckFunc(RedPointType.Pokemon_Recruit,PokemonManager.RefreshPokemonRecruitRedPoint) RPData:AddCheckFunc(RedPointType.Pokemon_Recruit,PokemonManager.RefreshPokemonRecruitRedPoint)
RPData:AddCheckFunc(RedPointType.Pokemon_ChipCompound,PokemonManager.PokemonChipCompoundRedPoint) RPData:AddCheckFunc(RedPointType.Pokemon_ChipCompound,PokemonManager.PokemonChipCompoundRedPoint)
RPData:AddCheckFunc(RedPointType.Pokemon_Fetter,PokemonManager.RefreshPokemonFetterRedPoint)
RPData:AddCheckFunc(RedPointType.Hero_Fetter,TianShuMiJuanManger.CheckRedPointType) RPData:AddCheckFunc(RedPointType.Hero_Fetter,TianShuMiJuanManger.CheckRedPointType)
RPData:AddCheckFunc(RedPointType.SoulPrint_Fetter,TianShuMiJuanManger.CheckRedPointType) RPData:AddCheckFunc(RedPointType.SoulPrint_Fetter,TianShuMiJuanManger.CheckRedPointType)
RPData:AddCheckFunc(RedPointType.TianShuPokemon_Fetter,TianShuMiJuanManger.CheckRedPointType) RPData:AddCheckFunc(RedPointType.TianShuPokemon_Fetter,TianShuMiJuanManger.CheckRedPointType)
RPData:AddCheckFunc(RedPointType.Equip_Fetter,TianShuMiJuanManger.CheckRedPointType)
--跨服天梯 --跨服天梯
RPData:AddCheckFunc(RedPointType.JumpServer_HightLadder_HaveMianFeiPanel,JumpServerManager.JumpServerHightLadderMianFeiNumRedPoint) RPData:AddCheckFunc(RedPointType.JumpServer_HightLadder_HaveMianFeiPanel,JumpServerManager.JumpServerHightLadderMianFeiNumRedPoint)

View File

@ -92,7 +92,7 @@ function this.GetAllData()
for i = 1, #allCurSoulPrintData do for i = 1, #allCurSoulPrintData do
local curSpiritAnimalBook local curSpiritAnimalBook
for _, configInfo in ConfigPairs(ConfigManager.GetConfig(ConfigName.SpiritAnimalBook)) do 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 if configInfo.FetterType == 2 and configInfo.Teamers and configInfo.Teamers[1] and configInfo.Teamers[1][1] == allCurSoulPrintData[i].Id then
curSpiritAnimalBook = configInfo curSpiritAnimalBook = configInfo
break break
end end

View File

@ -19,6 +19,10 @@ local tabs = {
default = "r_hero_xuanze_002", lock = "r_hero_xuanze_002", select = "r_hero_xuanze_001",tabName = Language[12276], default = "r_hero_xuanze_002", lock = "r_hero_xuanze_002", select = "r_hero_xuanze_001",tabName = Language[12276],
rpType = RedPointType.TianShuPokemon_Fetter,funcType = FUNCTION_OPEN_TYPE.POKEMON,bg = "t_tianshumijuan_lingshouditu",zi = "t_tianshumijuan_lingshoupian_zi_zh", rpType = RedPointType.TianShuPokemon_Fetter,funcType = FUNCTION_OPEN_TYPE.POKEMON,bg = "t_tianshumijuan_lingshouditu",zi = "t_tianshumijuan_lingshoupian_zi_zh",
}, },
[4] = { --装备
default = "r_hero_xuanze_002", lock = "r_hero_xuanze_002", select = "r_hero_xuanze_001",tabName = "装备篇",
rpType = RedPointType.Equip_Fetter,funcType = FUNCTION_OPEN_TYPE.COMPOUND,bg = "t_tianshumijuan_shengjiangditu",zi = "t_tianshumijuan_zhuangbeipian_zi_zh",
},
} }
local status = { local status = {
[0] = Language[10175], [0] = Language[10175],

View File

@ -23,6 +23,7 @@ function this.OnLevelChange()
this.CheckFetterStatus(1) this.CheckFetterStatus(1)
this.CheckFetterStatus(2) this.CheckFetterStatus(2)
this.CheckFetterStatus(3) this.CheckFetterStatus(3)
this.CheckFetterStatus(4)
end end
function this.CheckRedPointType(redType) function this.CheckRedPointType(redType)
@ -32,6 +33,8 @@ function this.CheckRedPointType(redType)
return this.CheckRedPoint(2) return this.CheckRedPoint(2)
elseif redType == RedPointType.TianShuPokemon_Fetter then elseif redType == RedPointType.TianShuPokemon_Fetter then
return this.CheckRedPoint(3) return this.CheckRedPoint(3)
elseif redType == RedPointType.Equip_Fetter then
return this.CheckRedPoint(4)
end end
end end
@ -66,6 +69,7 @@ function this.UpdateFetterId(ids)
this.CheckFetterStatus(1) this.CheckFetterStatus(1)
this.CheckFetterStatus(2) this.CheckFetterStatus(2)
this.CheckFetterStatus(3) this.CheckFetterStatus(3)
this.CheckFetterStatus(4)
end end
--检测条件变化,判断羁绊是否可激活 --检测条件变化,判断羁绊是否可激活
@ -83,6 +87,10 @@ function this.CheckFetterStatus(fetterType)
this.GetAllPokemonFetterDatas(fetterType,curPokemonSidList) this.GetAllPokemonFetterDatas(fetterType,curPokemonSidList)
CheckRedPointStatus(RedPointType.Pokemon_Fetter) CheckRedPointStatus(RedPointType.Pokemon_Fetter)
CheckRedPointStatus(RedPointType.TianShuPokemon_Fetter) CheckRedPointStatus(RedPointType.TianShuPokemon_Fetter)
elseif fetterType == 4 then
local curPokemonSidList = EquipManager.GetHaveEquipDatas()
this.GetAllPokemonFetterDatas(fetterType,curPokemonSidList)
CheckRedPointStatus(RedPointType.Equip_Fetter)
end end
end end
@ -91,7 +99,7 @@ function this.GetAllPokemonFetterDatas(fetterType,curPokemonSidList)
local SpiritAnimalBookList = {} local SpiritAnimalBookList = {}
for k,v in pairs(this.fetterData) do for k,v in pairs(this.fetterData) do
if v.fetterType == fetterType and v.enabled == -1 then if v.fetterType == fetterType and v.enabled == -1 then
if this.IsCompound(v.teamers,curPokemonSidList) then if this.IsCompound(v.teamers,curPokemonSidList,v.fetterType) then
v.enabled = 0 v.enabled = 0
end end
end end
@ -107,10 +115,15 @@ function this.CheckRedPoint(fetterType)
return false return false
end end
function this.IsCompound(Teamers,curPokemonSidList) function this.IsCompound(Teamers,curPokemonSidList,fetterType)
local isCompound = true local isCompound = true
for k,v in ipairs(Teamers) do for k,v in ipairs(Teamers) do
if curPokemonSidList[v] == nil then if curPokemonSidList[v[1]] == nil then
if isCompound then
isCompound = false
break
end
elseif fetterType and fetterType == 4 and curPokemonSidList[v[1]] < v[2] then
if isCompound then if isCompound then
isCompound = false isCompound = false
break break
@ -171,7 +184,7 @@ function this.GetAllPokemonFetterAddProsSWarPower(fetterType)
return addPowerVal return addPowerVal
end end
function this.IsHaveItem(fetterType,id) function this.IsHaveItem(fetterType,id,num)
local data = {} local data = {}
if fetterType == 1 then if fetterType == 1 then
data = PlayerManager.heroHandBook data = PlayerManager.heroHandBook
@ -179,11 +192,18 @@ function this.IsHaveItem(fetterType,id)
data = SoulPrintManager.GetAllHavedSoulPrint() data = SoulPrintManager.GetAllHavedSoulPrint()
elseif fetterType == 3 then elseif fetterType == 3 then
data = PokemonManager.GetAllPokemonGetDatas() data = PokemonManager.GetAllPokemonGetDatas()
elseif fetterType == 4 then
data = EquipManager.GetHaveEquipDatas()
end end
if data[id] then if fetterType == 4 then
if data[id] and data[id] >= num then
return true
else
return false
end
elseif data[id] then
return true return true
else
return false
end end
return false
end end
return this return this

View File

@ -82,8 +82,9 @@ function FetterItem:SetData(data,_parent)
end end
Util.SetGray(self.itemList[i].gameObject,false) Util.SetGray(self.itemList[i].gameObject,false)
self.itemList[i].gameObject:SetActive(true) self.itemList[i].gameObject:SetActive(true)
self.itemList[i]:OnOpen(false,{self.itemData.teamers[i],0},1,true,false,false,self.sortingOrder) self.itemList[i]:OnOpen(false,{self.itemData.teamers[i][1],self.itemData.teamers[i][2]},1,true,false,false,self.sortingOrder)
if TianShuMiJuanManger.IsHaveItem(self.itemData.fetterType,self.itemData.teamers[i]) then self.itemList[i].num.gameObject:SetActive(true)
if TianShuMiJuanManger.IsHaveItem(self.itemData.fetterType,self.itemData.teamers[i][1],self.itemData.teamers[i][2]) then
Util.SetGray(self.itemList[i].gameObject,false) Util.SetGray(self.itemList[i].gameObject,false)
else else
Util.SetGray(self.itemList[i].gameObject,true) Util.SetGray(self.itemList[i].gameObject,true)