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

Load CatchPokemon config in PokemonCatchWorker #5708

Merged
merged 2 commits into from
Sep 27, 2016
Merged

Load CatchPokemon config in PokemonCatchWorker #5708

merged 2 commits into from
Sep 27, 2016

Conversation

Gobberwart
Copy link
Contributor

@Gobberwart Gobberwart commented Sep 27, 2016

Short Description:

If PokemonCatchWorker is instantiated from Sniper or MoveToMapPokemon, the config passed is not the correct config for PokemonCatchWorker, which results in defaults being set instead of using the config file values.

This PR loads the CatchPokemon config into PokemonCatchWorker if no config is provided.

This solution is probably not great python, but it works. If anyone can see a better way to grab this config from the already-existing list of workers, please advise.

Fixes issues like those seen in #5696 and #5684

IMPORTANT NOTE: If the CatchPokemon task is disabled (PR #5591 which completely ignores CatchPokemon task config if the task is disabled), default values will be used instead.

Fixes/Resolves/Closes (please use correct syntax):

@mention-bot
Copy link

@Gobberwart, thanks for your PR! By analyzing the annotation information on this pull request, we identified @YvesHenri, @Quantra and @douglascamata to be potential reviewers

Uses default values as no config is in memory
@Gobberwart Gobberwart changed the title Load default CatchPokemon config in PokemonCatchWorker Load CatchPokemon config in PokemonCatchWorker Sep 27, 2016
@alexyaoyang
Copy link
Contributor

alexyaoyang commented Sep 27, 2016

👍 LGTM

Approved with PullApprove

@Gobberwart Gobberwart merged commit 531b722 into PokemonGoF:dev Sep 27, 2016
@solderzzc
Copy link
Contributor

Great, finally have it fixed.

@khoaanh2212
Copy link

i've still receive error message from snipper : Snipping gives error: daily catch limit reached.
Can you help me? thanks.

@khoaanh2212
Copy link

it fixed,i add :
"daily_catch_limit": 5000
into movetomappokemon and sniper and it works.
thanks.

@Gobberwart Gobberwart deleted the gobb_pokemoncatchworker branch November 9, 2016 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants