Closed coolaj86 closed 8 years ago
Almost got pokemons
figured out:
disappear_time: MapPokemon[i].ExpirationTimeMs // ??? how to convert from ProtoLong to int?
encounter_id: MapPokemon[i].EncounterId // ??? how to convert from ProtoLong to base64?
// also NearbyPokemon[i].EncounterId
latitude: MapPokemon[i].Latitude
longitude: MapPokemon[i].Longitude
pokemon_id: MapPokemon[i].PokedexTypeId // how to convert from ProtoLong to base64?
// also NearbyPokemon[i].PokedexNumber
pokemon_name: pokeio.pokemonlist[n - 1]
spawnpoint_id: MapPokemon[i].SpawnpointId
Both of ExpirationTimeMs and EncounterId should be protoLong. However, they can be fit into numbers. You can simply do parseInt(MapPokemon[i].ExpirationTimeMs.toString())
to transform it back into number.
The gym stuff comes from Fort
in a self.Heartbeat
cell. I am using an older version where it is missing some of the data, but it looks something like this:
Fort: [
{
FortId: "076c7d8c03634557bf9a90ce51028268.16",
LastModifiedMs: {
low: 162407318,
high: 342,
unsigned: false
},
Latitude: 38.898951,
Longitude: -77.038961,
Team: null,
GuardPokemonId: null,
GuardPokemonLevel: null,
Enabled: true,
FortType: 1,
GymPoints: null,
IsInBattle: null,
ActiveFortModifier: null,
LureInfo: null,
CooldownCompleteMs: null,
Sponsor: null,
RenderingType: null
}
...
]
If you'd like to help I now have a working server (using this library) and client (forked from AHAAAAAAA) at https://github.com/Daplie/node-pokemap
Right now it only shows Pokémon, but with a little help massaging the data to match AHAAAAAAA's format, it'll show all the rest as well.
I'm trying to get this to work with the python client's web UI. The sample data looks like this:
I'm just poking around right now and trying to figure out where these values came from (and how they were converted from the binary formats and s2 formats, etc). If there's anything you can immediately comment on please do so. Otherwise I'll just be working my way through. :)