Skip to content

Commit

Permalink
Revert "Ultraball try emit_event when past min" (#4566)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjmadsen authored Aug 22, 2016
1 parent 93ecb81 commit c2911bc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pokemongo_bot/cell_workers/pokemon_catch_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,11 @@ def _do_catch(self, pokemon, encounter_id, catch_rate_by_ball, is_vip=False):
while ball_count[current_ball] == 0 and current_ball < maximum_ball:
current_ball += 1
if ball_count[current_ball] == 0:
self.emit_event('no_pokeballs', formatted='No usable (non-ultra)pokeballs found!')
self.emit_event('no_pokeballs', formatted='No usable pokeballs found!')

# use untraball if there is no other balls with constraint to `min_ultraball_to_keep`
if maximum_ball != ITEM_ULTRABALL and ball_count[ITEM_ULTRABALL] > min_ultraball_to_keep:
maximum_ball = ITEM_ULTRABALL
self.emit_event('trying_ultraball', formatted='More ultraballs than minimum. Trying...')
continue
else:
return WorkerResult.ERROR
Expand Down

0 comments on commit c2911bc

Please sign in to comment.