Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch snipe in move_to_map_pokemon.py #4146

Merged
merged 1 commit into from
Aug 17, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pokemongo_bot/cell_workers/move_to_map_pokemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def snipe(self, pokemon):
last_position = self.bot.position[0:2]
self.bot.heartbeat()
self._teleport_to(pokemon)
catch_worker = PokemonCatchWorker(pokemon, self.bot)
catch_worker = PokemonCatchWorker(pokemon, self.bot, self.config)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This likely doesn't do what you're expecting. You're passing the MoveToMapPokemon's config to the PokemonCatchWorker. None of the keys that the catch worker is expecting will be there. You can send an empty dict to use the defaults if that's what is desired.

If you want to specify different values for the catching config, you need to add the keys to the MoveToMapPokemon config section.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. I was too quick to fix the issue and did not look in the revised code.
alt text

api_encounter_response = catch_worker.create_encounter_api_call()
time.sleep(SNIPE_SLEEP_SEC)
self._teleport_back(last_position)
Expand Down