hunterjm / futgui

FIFA Auto Buyer GUI
73 stars 24 forks source link

# Won double counting when player is sniped #93

Open aftershock9 opened 7 years ago

aftershock9 commented 7 years ago

When a player is bought on a snipe, the # won column is double counting e.g. events as follows

Card Purchased: BIN 10000 on Messi Auction Won: 10000 on Messi Item Listed: Messi for 150 (200 BIN)

The # won column reflects the above events as 2 players won, but it should be 1.

Mglt-b commented 7 years ago

Yes, can confirm

Mglt-b commented 7 years ago

Because of listed ?

                # Buy!!!
                if api.bid(item['tradeId'], item['buyNowPrice']):
                    asset = api.cardInfo(item['resourceId'])
                    displayName = asset['Item']['CommonName'] if asset['Item']['CommonName'] else asset['Item']['LastName']
                    card = PlayerCard(item, displayName)

                    q.put((card, EventType.BIN, api.credits))
                    q.put('%s    Card Purchased: BIN %d on %s %s\n' % (time.strftime('%Y-%m-%d %H:%M:%S'), item['buyNowPrice'], asset['Item']['FirstName'], asset['Item']['LastName']))
                    trades[item['tradeId']] = item['resourceId']
                    binWon = True
                    listed += 1
                else:
                    q.put('%s    Bid Error: You are not allowed to bid on this trade\n' % (time.strftime('%Y-%m-%d %H:%M:%S')))

try to delete : listed += 1