Skip to content

Commit

Permalink
Fixed bug if tradepile contains not only players
Browse files Browse the repository at this point in the history
  • Loading branch information
franzhcs committed Nov 30, 2015
1 parent 6de36a3 commit b856c50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/bid.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ def bid(q, api, playerList, settings):
# Log selling players
for trade in tradepile:
asset = api.cardInfo(trade['resourceId'])
displayName = asset['Item']['CommonName'] if asset['Item']['CommonName'] else asset['Item']['LastName']
if str(asset['Item']['ItemType']).startswith('Player'):
displayName = asset['Item']['CommonName'] if asset['Item']['CommonName'] else asset['Item']['LastName']
else:
displayName = asset['Item']['Desc']
card = PlayerCard(trade, displayName)
q.put((card, EventType.SELLING, api.credits))

Expand Down

0 comments on commit b856c50

Please sign in to comment.