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