Closed igoticecream closed 7 years ago
wow nice
I can't yet comment on whether it's accurate that the field is MapPokemon instead of LureInfo, but it's worth noting that it's already possible to catch Lured pokemon with the current Proto...
private static async Task CatchLuredPokemon(FortData pokeStop)
{
var diskEncounterResponse = await _client.DiskEncounter(pokeStop.LureInfo.EncounterId, pokeStop.LureInfo.FortId);
var catchPokemonResponse = await _client.CatchPokemon(pokeStop.LureInfo.EncounterId, pokeStop.LureInfo.FortId, pokeball);
}
Edit: That's a slimmed down version of the code, you still need to do all the validation, checking for a pokemon (via LureInfo.ActivePokemonId), and checking for errors.
You need spawn point id in order to catch a map pokemon (see: https://github.com/AeonLucid/POGOProtos/blob/master/src/POGOProtos/Networking/Requests/Messages/CatchPokemonMessage.proto)
LureInfo doesnt provide this spawn point id. Again, i have made this change with testing it and it is indeed MapPokemonProto
https://raw.githubusercontent.com/Jumboperson/PokemonGoDumper/master/OldDumps/Assembly-CSharp.cs
Check out this assembly:
// Namespace: Holoholo.Rpc class PokemonFortProto
and take a look at:
static int ActivePokemonFieldNumber = 13;
I don't think you understand, the FortId -IS- the spawn point id. I'm not just making up this code, I'm literally using it and have been using it to get to level 30 so far. Lured pokemon spawn on a Fort node, not a normal spawn node. You can even use pokeStop.FortId and it still works. If you try printing out the spawn point ID that your change supposedly sends to the server, you'll notice it's a FortId, not a SpawnPointId.
Edit: This is an important distinction because you need to use a separate Encounter message from normal pokemon, and the new encounter message requires the FortId.
I tested what you said, and it works too o.o
I noticed myself I needed a spawn point id while writing an auto-catch but none was supplied so just went with the fort id.
I'll merge this in once you get to removing the old FortLureInfo
message ;).
I wouldn't merge, see #101
@Lennix what seems to be the problem? The internal proto says the field is MapPokemon.
Please let me know if this is still relevant.
Coming from this issue #101