diff --git a/pokemongo_bot/__init__.py b/pokemongo_bot/__init__.py index 2b083cdad6..bc9c4ab270 100644 --- a/pokemongo_bot/__init__.py +++ b/pokemongo_bot/__init__.py @@ -160,17 +160,13 @@ def work_on_cell(self, cell, position, work_on_forts=1): # Check if session token has expired self.check_session(position) - if self.config.initial_transfer: - worker = InitialTransferWorker(self) - if worker.work() == WorkerResult.RUNNING: - return - self.config.initial_transfer = False + worker = InitialTransferWorker(self) + if worker.work() == WorkerResult.RUNNING: + return - if self.config.evolve_all: - worker = EvolveAllWorker(self) - if worker.work() == WorkerResult.RUNNING: - return - self.config.evolve_all = [] + worker = EvolveAllWorker(self) + if worker.work() == WorkerResult.RUNNING: + return RecycleItemsWorker(self).work() diff --git a/pokemongo_bot/cell_workers/evolve_all_worker.py b/pokemongo_bot/cell_workers/evolve_all_worker.py index 05c398fe72..806f2ca6a0 100644 --- a/pokemongo_bot/cell_workers/evolve_all_worker.py +++ b/pokemongo_bot/cell_workers/evolve_all_worker.py @@ -56,11 +56,14 @@ def _should_run(self): # Will skip evolving if user wants to use an egg and there is none skip_evolves = False + if self.config.evolve_all: + return skip_evolves + # Pop lucky egg before evolving to maximize xp gain use_lucky_egg = self.config.use_lucky_egg lucky_egg_count = self.bot.item_inventory_count(Item.ITEM_LUCKY_EGG.value) - if use_lucky_egg and lucky_egg_count > 0: + if use_lucky_egg and lucky_egg_count > 0: logger.log('Using lucky egg ... you have {}' .format(lucky_egg_count)) response_dict_lucky_egg = self.bot.use_lucky_egg()