@@ -137,7 +137,7 @@ def bid(q, api, playerList, settings):
137137 q .put ('%s Updating watched items...\n ' % (time .strftime ('%Y-%m-%d %H:%M:%S' )))
138138 for item in api .tradeStatus ([tradeId for tradeId in trades ]):
139139 item ['resourceId' ] = trades [item ['tradeId' ]]
140- baseId = str (api . baseId (item ['resourceId' ]))
140+ baseId = str (abs (item ['resourceId' ] + 0x80000000 ))
141141 if baseId not in bidDetails :
142142 continue
143143 maxBid = bidDetails [baseId ]['maxBid' ]
@@ -148,15 +148,14 @@ def bid(q, api, playerList, settings):
148148
149149 tradeId = item ['tradeId' ]
150150 if tradeId not in trades :
151- break
151+ continue
152152
153153 asset = api .cardInfo (trades [tradeId ])
154154 displayName = asset ['Item' ]['CommonName' ] if asset ['Item' ]['CommonName' ] else asset ['Item' ]['LastName' ]
155155 card = PlayerCard (item , displayName )
156156
157157 # Handle Expired Items
158158 if item ['expires' ] == - 1 :
159-
160159 if (item ['bidState' ] == 'highest' or (item ['tradeState' ] == 'closed' and item ['bidState' ] == 'buyNow' )):
161160
162161 # We won! Send to Pile!
@@ -191,7 +190,6 @@ def bid(q, api, playerList, settings):
191190 del trades [tradeId ]
192191
193192 elif item ['bidState' ] != 'highest' :
194-
195193 # Continue if we already have too many listed or we don't have enough credits
196194 if listed >= settings ['maxPlayer' ] or api .credits < settings ['minCredits' ]:
197195 continue
@@ -218,7 +216,7 @@ def bid(q, api, playerList, settings):
218216 # buy now goes directly to unassigned now
219217 if binWon :
220218 for item in api .unassigned ():
221- baseId = str (api . baseId (item ['resourceId' ]))
219+ baseId = str (abs (item ['resourceId' ] + 0x80000000 ))
222220 if baseId not in bidDetails :
223221 continue
224222 maxBid = bidDetails [baseId ]['maxBid' ]
@@ -262,7 +260,7 @@ def bid(q, api, playerList, settings):
262260 if not settings ['relistAll' ] or relistFailed :
263261 q .put ('%s Manually re-listing %d players.\n ' % (time .strftime ('%Y-%m-%d %H:%M:%S' ), expired ))
264262 for i in tradepile :
265- baseId = str (api . baseId ( i ['resourceId' ]))
263+ baseId = str (abs ( item ['resourceId' ] + 0x80000000 ))
266264 if baseId in bidDetails :
267265 sell = i ['startingBid' ] if settings ['relistAll' ] else bidDetails [baseId ]['sell' ]
268266 binPrice = i ['buyNowPrice' ] if settings ['relistAll' ] else bidDetails [baseId ]['binPrice' ]
0 commit comments