【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, --魂印羁绊
TianShuMiJuan = 799, --天书秘卷红点
TianShuPokemon_Fetter = 800,--灵兽羁绊
Equip_Fetter = 805, --装备羁绊
--跨服天梯
JumpServer_MainCity = 820,--主界面跨服天梯

View File

@ -766,6 +766,9 @@ RELIC_STATUS_FIELD = protobuf.FieldDescriptor();
LIKABLEINFO = protobuf.Descriptor();
LIKABLEINFO_HEROSTATICID_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.full_name = ".rpc.protocols.ErrorResponse.errCode"
@ -8058,6 +8061,33 @@ LIKABLEINFO.enum_types = {}
LIKABLEINFO.fields = {LIKABLEINFO_HEROSTATICID_FIELD, LIKABLEINFO_LIKABLENUM_FIELD}
LIKABLEINFO.is_extendable = false
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.MissionInfo = protobuf.Message(ACTIVITYINFO_MISSIONINFO)
@ -8080,6 +8110,7 @@ Drop = protobuf.Message(DROP)
EndlessPoint = protobuf.Message(ENDLESSPOINT)
EndlessRefreshInfo = protobuf.Message(ENDLESSREFRESHINFO)
Equip = protobuf.Message(EQUIP)
EquipBookInfo = protobuf.Message(EQUIPBOOKINFO)
ErrorResponse = protobuf.Message(ERRORRESPONSE)
EventBehaviorCommon = protobuf.Message(EVENTBEHAVIORCOMMON)
EventBehaviorValues = protobuf.Message(EVENTBEHAVIORVALUES)

View File

@ -99,6 +99,7 @@ GETALLPOKEMONRESPONSE_POKEMONGOT_FIELD = protobuf.FieldDescriptor();
GETALLPROPERTYINFORESPONSE = protobuf.Descriptor();
GETALLPROPERTYINFORESPONSE_ALLBOOKENABLED_FIELD = protobuf.FieldDescriptor();
GETALLPROPERTYINFORESPONSE_EQUIPGOT_FIELD = protobuf.FieldDescriptor();
GETALLPROPERTYINFORESPONSE_EQUIPLIST_FIELD = protobuf.FieldDescriptor();
REPLACETEAMPOKEMONINFOREQUEST = protobuf.Descriptor();
REPLACETEAMPOKEMONINFOREQUEST_TEAMPOKEMONINFOS_FIELD = protobuf.FieldDescriptor();
POKENMONUPLEVELREQUEST = protobuf.Descriptor();
@ -1119,11 +1120,22 @@ GETALLPROPERTYINFORESPONSE_EQUIPGOT_FIELD.default_value = {}
GETALLPROPERTYINFORESPONSE_EQUIPGOT_FIELD.type = 5
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.full_name = ".rpc.protocols.GetAllPropertyInfoResponse"
GETALLPROPERTYINFORESPONSE.nested_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.extensions = {}
REPLACETEAMPOKEMONINFOREQUEST_TEAMPOKEMONINFOS_FIELD.name = "teamPokemonInfos"

View File

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

View File

@ -6,10 +6,21 @@ local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
local equipStarsConfig = ConfigManager.GetConfig(ConfigName.EquipStarsConfig)
local rewardGroupConfig=ConfigManager.GetConfig(ConfigName.RewardGroup)
--已装备的
this.equipDatas = {}
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
--upHeroDid

View File

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

View File

@ -283,6 +283,7 @@ function this.InitRedPointAllRelate()
RPData:SetParent(RedPointType.Hero_Fetter,RedPointType.TianShuMiJuan)
RPData:SetParent(RedPointType.SoulPrint_Fetter,RedPointType.TianShuMiJuan)
RPData:SetParent(RedPointType.TianShuPokemon_Fetter,RedPointType.TianShuMiJuan)
RPData:SetParent(RedPointType.Equip_Fetter,RedPointType.TianShuMiJuan)
--牛气冲天
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_ChipCompound,PokemonManager.PokemonChipCompoundRedPoint)
RPData:AddCheckFunc(RedPointType.Pokemon_Fetter,PokemonManager.RefreshPokemonFetterRedPoint)
RPData:AddCheckFunc(RedPointType.Hero_Fetter,TianShuMiJuanManger.CheckRedPointType)
RPData:AddCheckFunc(RedPointType.SoulPrint_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)

View File

@ -92,7 +92,7 @@ function this.GetAllData()
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
if configInfo.FetterType == 2 and configInfo.Teamers and configInfo.Teamers[1] and configInfo.Teamers[1][1] == allCurSoulPrintData[i].Id then
curSpiritAnimalBook = configInfo
break
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],
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 = {
[0] = Language[10175],

View File

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

View File

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