Skip to content

Commit

Permalink
Merge pull request #5036 from rawgni/lvl_up_pretty_print_bug
Browse files Browse the repository at this point in the history
fix #5019
  • Loading branch information
solderzzc authored Sep 1, 2016
2 parents 1c27516 + 2efc899 commit 7c6393b
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions pokemongo_bot/cell_workers/collect_level_up_reward.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,11 @@ def _collect_level_reward(self):
item['name'] = got_item
count = 'item_count' in item and item['item_count'] or 0
inventory.items().get(item['item_id']).add(count)
try:
self.emit_event(
'level_up_reward',
formatted='Received level up reward: {items}',
data={
'items': ', '.join(["{}x {}".format(data[x], x) for x in data])
}
)
except TypeError:
pass
self.emit_event(
'level_up_reward',
formatted='Received level up reward: {items}',
data={
# [{'item_id': 3, 'name': u'Ultraball', 'item_count': 10}, {'item_id': 103, 'name': u'Hyper Potion', 'item_count': 10}]
'items': ', '.join(["{}x {}".format(x['item_count'], x['name']) for x in data])
}
)

0 comments on commit 7c6393b

Please sign in to comment.