Pokemon-GO-node-api icon indicating copy to clipboard operation
Pokemon-GO-node-api copied to clipboard

How do you get data on the pokemon you just caught?

Open ameyer opened this issue 9 years ago • 5 comments

Using pokeAPI.CatchPokemon, I just get back a CatchPokemonResponse with a status and MissPercent.

Other than checking the inventory, how do I get information (id, type, cp, etc) on the Pokemon that was caught?

ameyer avatar Aug 15 '16 06:08 ameyer

I enabled CapturedPokemonId in pokemon.proto and changed to a fixed64. I also enabled CaptureAward in pokemon.proto.

Now I at least get something good.

  CapturedPokemonId: Long { low: 231617896, high: -1834732217, unsigned: true },
  CaptureAward: 
   { ActivityType: [ 1, 12, 13 ],
     XP: [ 100, 100, 10 ],
     Candy: [ 3, 0, 0 ],
     Stardust: [ 100, 0, 0 ] } }

But now how would I take that Pokemon ID and get info on that pokemon?

ameyer avatar Aug 15 '16 14:08 ameyer

how do you get CaptureAward?

when you EncounterPokemon it's will callback some data like pokemon ID

monarchfish avatar Aug 16 '16 02:08 monarchfish

EncounterPokemon second callback like this

{ WildPokemon: { EncounterId: Long { low: -69370227, high: -664151409, unsigned: true }, LastModifiedMs: Long { low: -1859329067, high: 342, unsigned: false }, Latitude: 24.979762628558674, Longitude: 121.41825154371163, SpawnPointId: '34681d1ebe3', pokemon: { Id: null, PokemonId: 120, cp: 37 }, TimeTillHiddenMs: 727191 }, EncounterBackground: null, EncounterStatus: 1 }

monarchfish avatar Aug 16 '16 02:08 monarchfish

To enable CaptureAward I just went into pokemon.proto and enabled it. It is commented out for some reason.

ameyer avatar Aug 16 '16 02:08 ameyer

Thanks for this!

ameyer avatar Aug 16 '16 02:08 ameyer