Skip to content

Commit

Permalink
Merge pull request #5897 from PokemonGoF/dev
Browse files Browse the repository at this point in the history
Dev merge to master
  • Loading branch information
solderzzc authored Jan 31, 2017
2 parents 87eb853 + 334459a commit 7c2722d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pokemongo_bot/cell_workers/pokemon_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ def check_buddy(self):

if distance_walked >= distance_needed:
self.get_buddy_walked(pokemon)
# self.buddy["start_km_walked"] can be empty here
if 'start_km_walked' not in self.buddy:
self.buddy["start_km_walked"] = 0
self.buddy["last_km_awarded"] = self.buddy["start_km_walked"] + distance_needed * int(distance_walked / distance_needed)
self.lock_buddy = False
else:
Expand Down Expand Up @@ -917,7 +920,7 @@ def get_buddy_walked(self, pokemon):
action_delay(self.config_action_wait_min, self.config_action_wait_max)

return True

def _get_buddyid(self):
if self.buddy and'id' in self.buddy:
return self.buddy['id']
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ paho-mqtt==1.2
Geohash==1.0
python-telegram-bot==5.0.0
discord_simple==0.0.1.15
urllib3==1.18

0 comments on commit 7c2722d

Please sign in to comment.