【灵兽】 灵兽数据分页
parent
ce78226529
commit
80c949c54d
|
@ -79,6 +79,8 @@ GETALLEQUIPREQUEST_TYPE_FIELD = protobuf.FieldDescriptor();
|
||||||
GETALLEQUIPRESPONSE = protobuf.Descriptor();
|
GETALLEQUIPRESPONSE = protobuf.Descriptor();
|
||||||
GETALLEQUIPRESPONSE_EQUIP_FIELD = protobuf.FieldDescriptor();
|
GETALLEQUIPRESPONSE_EQUIP_FIELD = protobuf.FieldDescriptor();
|
||||||
GETALLEQUIPRESPONSE_ISSENDFINISH_FIELD = protobuf.FieldDescriptor();
|
GETALLEQUIPRESPONSE_ISSENDFINISH_FIELD = protobuf.FieldDescriptor();
|
||||||
|
GETALLPOKEMONREQUEST = protobuf.Descriptor();
|
||||||
|
GETALLPOKEMONREQUEST_START_FIELD = protobuf.FieldDescriptor();
|
||||||
GETALLPOKEMONRESPONSE = protobuf.Descriptor();
|
GETALLPOKEMONRESPONSE = protobuf.Descriptor();
|
||||||
GETALLPOKEMONRESPONSE_POKEMONINFO_FIELD = protobuf.FieldDescriptor();
|
GETALLPOKEMONRESPONSE_POKEMONINFO_FIELD = protobuf.FieldDescriptor();
|
||||||
GETALLPOKEMONRESPONSE_TEAMPOKEMONINFOS_FIELD = protobuf.FieldDescriptor();
|
GETALLPOKEMONRESPONSE_TEAMPOKEMONINFOS_FIELD = protobuf.FieldDescriptor();
|
||||||
|
@ -849,6 +851,23 @@ GETALLEQUIPRESPONSE.enum_types = {}
|
||||||
GETALLEQUIPRESPONSE.fields = {GETALLEQUIPRESPONSE_EQUIP_FIELD, GETALLEQUIPRESPONSE_ISSENDFINISH_FIELD}
|
GETALLEQUIPRESPONSE.fields = {GETALLEQUIPRESPONSE_EQUIP_FIELD, GETALLEQUIPRESPONSE_ISSENDFINISH_FIELD}
|
||||||
GETALLEQUIPRESPONSE.is_extendable = false
|
GETALLEQUIPRESPONSE.is_extendable = false
|
||||||
GETALLEQUIPRESPONSE.extensions = {}
|
GETALLEQUIPRESPONSE.extensions = {}
|
||||||
|
GETALLPOKEMONREQUEST_START_FIELD.name = "start"
|
||||||
|
GETALLPOKEMONREQUEST_START_FIELD.full_name = ".com.ljsd.jieling.protocols.GetAllPokemonRequest.start"
|
||||||
|
GETALLPOKEMONREQUEST_START_FIELD.number = 1
|
||||||
|
GETALLPOKEMONREQUEST_START_FIELD.index = 0
|
||||||
|
GETALLPOKEMONREQUEST_START_FIELD.label = 1
|
||||||
|
GETALLPOKEMONREQUEST_START_FIELD.has_default_value = false
|
||||||
|
GETALLPOKEMONREQUEST_START_FIELD.default_value = 0
|
||||||
|
GETALLPOKEMONREQUEST_START_FIELD.type = 5
|
||||||
|
GETALLPOKEMONREQUEST_START_FIELD.cpp_type = 1
|
||||||
|
|
||||||
|
GETALLPOKEMONREQUEST.name = "GetAllPokemonRequest"
|
||||||
|
GETALLPOKEMONREQUEST.full_name = ".com.ljsd.jieling.protocols.GetAllPokemonRequest"
|
||||||
|
GETALLPOKEMONREQUEST.nested_types = {}
|
||||||
|
GETALLPOKEMONREQUEST.enum_types = {}
|
||||||
|
GETALLPOKEMONREQUEST.fields = {GETALLPOKEMONREQUEST_START_FIELD}
|
||||||
|
GETALLPOKEMONREQUEST.is_extendable = false
|
||||||
|
GETALLPOKEMONREQUEST.extensions = {}
|
||||||
GETALLPOKEMONRESPONSE_POKEMONINFO_FIELD.name = "pokemonInfo"
|
GETALLPOKEMONRESPONSE_POKEMONINFO_FIELD.name = "pokemonInfo"
|
||||||
GETALLPOKEMONRESPONSE_POKEMONINFO_FIELD.full_name = ".com.ljsd.jieling.protocols.GetAllPokemonResponse.pokemonInfo"
|
GETALLPOKEMONRESPONSE_POKEMONINFO_FIELD.full_name = ".com.ljsd.jieling.protocols.GetAllPokemonResponse.pokemonInfo"
|
||||||
GETALLPOKEMONRESPONSE_POKEMONINFO_FIELD.number = 1
|
GETALLPOKEMONRESPONSE_POKEMONINFO_FIELD.number = 1
|
||||||
|
@ -1604,6 +1623,7 @@ EspecialEquipBackRequest = protobuf.Message(ESPECIALEQUIPBACKREQUEST)
|
||||||
EspecialEquipBackResponse = protobuf.Message(ESPECIALEQUIPBACKRESPONSE)
|
EspecialEquipBackResponse = protobuf.Message(ESPECIALEQUIPBACKRESPONSE)
|
||||||
GetAllEquipRequest = protobuf.Message(GETALLEQUIPREQUEST)
|
GetAllEquipRequest = protobuf.Message(GETALLEQUIPREQUEST)
|
||||||
GetAllEquipResponse = protobuf.Message(GETALLEQUIPRESPONSE)
|
GetAllEquipResponse = protobuf.Message(GETALLEQUIPRESPONSE)
|
||||||
|
GetAllPokemonRequest = protobuf.Message(GETALLPOKEMONREQUEST)
|
||||||
GetAllPokemonResponse = protobuf.Message(GETALLPOKEMONRESPONSE)
|
GetAllPokemonResponse = protobuf.Message(GETALLPOKEMONRESPONSE)
|
||||||
GetAllRingFireResponse = protobuf.Message(GETALLRINGFIRERESPONSE)
|
GetAllRingFireResponse = protobuf.Message(GETALLRINGFIRERESPONSE)
|
||||||
GetAllSkinResponse = protobuf.Message(GETALLSKINRESPONSE)
|
GetAllSkinResponse = protobuf.Message(GETALLSKINRESPONSE)
|
||||||
|
|
|
@ -449,7 +449,7 @@ function this.ExecuteLoading()
|
||||||
--[[[4] = ]]function() NetManager.AllEquipRequest(0, LoadingPanel.OnStep) end, -- 装备
|
--[[[4] = ]]function() NetManager.AllEquipRequest(0, LoadingPanel.OnStep) end, -- 装备
|
||||||
--[[[5] = ]]function() NetManager.AllEquipTreasureRequest(0, LoadingPanel.OnStep) end, --
|
--[[[5] = ]]function() NetManager.AllEquipTreasureRequest(0, LoadingPanel.OnStep) end, --
|
||||||
--[[[6] = ]]function() NetManager.GetSoulPrintDataRequest(0, LoadingPanel.OnStep) end, -- 魂印
|
--[[[6] = ]]function() NetManager.GetSoulPrintDataRequest(0, LoadingPanel.OnStep) end, -- 魂印
|
||||||
--[[[7] = ]]function() NetManager.DiffMonsterRequest(LoadingPanel.OnStep) end, -- 异妖
|
--[[[7] = ]]function() NetManager.DiffMonsterRequest(0,LoadingPanel.OnStep) end, -- 异妖
|
||||||
--[[[8] = ]]function() NetManager.HeroInfoRequest(0, LoadingPanel.OnStep) end, --
|
--[[[8] = ]]function() NetManager.HeroInfoRequest(0, LoadingPanel.OnStep) end, --
|
||||||
--[[[9] = ]]function() NetManager.TeamInfoRequest(LoadingPanel.OnStep) end, -- 编队
|
--[[[9] = ]]function() NetManager.TeamInfoRequest(LoadingPanel.OnStep) end, -- 编队
|
||||||
--[[[10] =]] function() NetManager.GetAllMailData(LoadingPanel.OnStep) end, -- 邮件
|
--[[[10] =]] function() NetManager.GetAllMailData(LoadingPanel.OnStep) end, -- 邮件
|
||||||
|
|
|
@ -904,18 +904,25 @@ function this.MissionOpenRequest(missionId, func)
|
||||||
end
|
end
|
||||||
|
|
||||||
--请求获取异妖消息
|
--请求获取异妖消息
|
||||||
function this.DiffMonsterRequest(func)
|
function this.DiffMonsterRequest(_start,func)
|
||||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.GET_ALL_POKEMON_REQUEST, MessageTypeProto_pb.GET_ALL_POKEMON_RESPONSE, nil, function(buffer)
|
local data = HeroInfoProto_pb.GetAllPokemonRequest()
|
||||||
|
data.start = _start
|
||||||
|
local msg = data:SerializeToString()
|
||||||
|
Network:SendMessageWithCallBack(MessageTypeProto_pb.GET_ALL_POKEMON_REQUEST, MessageTypeProto_pb.GET_ALL_POKEMON_RESPONSE, msg, function(buffer)
|
||||||
local data = buffer:DataByte()
|
local data = buffer:DataByte()
|
||||||
local msg = HeroInfoProto_pb.GetAllPokemonResponse()
|
local msg = HeroInfoProto_pb.GetAllPokemonResponse()
|
||||||
msg:ParseFromString(data)
|
msg:ParseFromString(data)
|
||||||
|
|
||||||
PokemonManager.InitPokemonsData(msg.pokemonInfo)--pokemonInfo)
|
PokemonManager.InitPokemonsData(msg.pokemonInfo)--pokemonInfo)
|
||||||
PokemonManager.UpdatePokemonFormationDatas(msg.teamPokemonInfos)--msg.pokemonInfo)
|
if not msg.pokemonInfo or (msg.pokemonInfo and #msg.pokemonInfo < 20) then
|
||||||
PokemonManager.InitPokemonsFetterData(msg.pokemonBookEnabled)
|
PokemonManager.UpdatePokemonFormationDatas(msg.teamPokemonInfos)--msg.pokemonInfo)
|
||||||
PokemonManager.InitPokemonsGetrData(msg.pokemonGot)
|
PokemonManager.InitPokemonsFetterData(msg.pokemonBookEnabled)
|
||||||
if func then
|
PokemonManager.InitPokemonsGetrData(msg.pokemonGot)
|
||||||
func(msg)
|
if func then
|
||||||
|
func(msg)
|
||||||
|
end
|
||||||
|
elseif msg.pokemonInfo and #msg.pokemonInfo >= 20 then
|
||||||
|
_start = _start + #msg.pokemonInfo
|
||||||
|
this.DiffMonsterRequest(_start, func)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,6 +8,7 @@ local pokemonFetter = {}--灵兽羁绊
|
||||||
local pokemonFormation = {}--灵兽编队
|
local pokemonFormation = {}--灵兽编队
|
||||||
local pokemonGet = {} --已经获得过的灵兽
|
local pokemonGet = {} --已经获得过的灵兽
|
||||||
function this.Initialize()
|
function this.Initialize()
|
||||||
|
pokemons = {}
|
||||||
pokemonFormation = {}
|
pokemonFormation = {}
|
||||||
for i = 1, 6 do
|
for i = 1, 6 do
|
||||||
local teamInfo = {}
|
local teamInfo = {}
|
||||||
|
@ -21,10 +22,11 @@ end
|
||||||
--初始化灵兽数据
|
--初始化灵兽数据
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
function this.InitPokemonsData(_msgPokemonList)
|
function this.InitPokemonsData(_msgPokemonList)
|
||||||
-- LogPink("初始化灵兽数据" .. #_msgPokemonList)
|
if _msgPokemonList then
|
||||||
pokemons = {}
|
-- LogPink("初始化灵兽数据" .. #_msgPokemonList)
|
||||||
for i = 1, #_msgPokemonList do
|
for i = 1, #_msgPokemonList do
|
||||||
this.UpdatePokemonDatas(_msgPokemonList[i])
|
this.UpdatePokemonDatas(_msgPokemonList[i])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -262,17 +264,20 @@ end
|
||||||
--灵兽羁绊 (羁绊属性直接就是团队属性)
|
--灵兽羁绊 (羁绊属性直接就是团队属性)
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
function this.InitPokemonsGetrData(_msgPokemonGetList)
|
function this.InitPokemonsGetrData(_msgPokemonGetList)
|
||||||
|
if not _msgPokemonGetList then
|
||||||
|
return
|
||||||
|
end
|
||||||
--Log("灵兽羁绊" .. #_msgPokemonFetterList)
|
--Log("灵兽羁绊" .. #_msgPokemonFetterList)
|
||||||
pokemonGet = {}
|
pokemonGet = {}
|
||||||
LogRed("_msgPokemonGetList[i]:"..#_msgPokemonGetList)
|
-- LogRed("_msgPokemonGetList[i]:"..#_msgPokemonGetList)
|
||||||
for i = 1, #_msgPokemonGetList do
|
for i = 1, #_msgPokemonGetList do
|
||||||
LogRed("_msgPokemonGetList[i]:".._msgPokemonGetList[i])
|
-- LogRed("_msgPokemonGetList[i]:".._msgPokemonGetList[i])
|
||||||
pokemonGet[_msgPokemonGetList[i]] = _msgPokemonGetList[i]
|
pokemonGet[_msgPokemonGetList[i]] = _msgPokemonGetList[i]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.InitPokemonsFetterData(_msgPokemonFetterList)
|
function this.InitPokemonsFetterData(_msgPokemonFetterList)
|
||||||
--Log("灵兽羁绊" .. #_msgPokemonFetterList)
|
-- Log("灵兽羁绊" .. #_msgPokemonFetterList)
|
||||||
pokemonFetter = {}
|
pokemonFetter = {}
|
||||||
if not _msgPokemonFetterList then
|
if not _msgPokemonFetterList then
|
||||||
return
|
return
|
||||||
|
@ -304,7 +309,7 @@ function this.GetAllPokemonFetterDatas()
|
||||||
end
|
end
|
||||||
table.insert(SpiritAnimalBookList,singPokemonFetterData)
|
table.insert(SpiritAnimalBookList,singPokemonFetterData)
|
||||||
end
|
end
|
||||||
LogGreen("#SpiritAnimalBookList:"..#SpiritAnimalBookList)
|
-- LogGreen("#SpiritAnimalBookList:"..#SpiritAnimalBookList)
|
||||||
return SpiritAnimalBookList
|
return SpiritAnimalBookList
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue