Skip to content

Commit

Permalink
Do not buy items with zero price
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamGagorik committed Nov 8, 2024
1 parent 69cf46a commit 45f59f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ffxiahbot/auction/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ def _buy_row(self, row: AuctionHouse, max_price: int) -> bool:
row: Auction House row to buy.
max_price: Maximum price to pay.
"""
if max_price <= 0:
logger.error("max buying price is zero! itemid=%d", row.itemid)
self.add_to_blacklist(row.id)
return False

# check price
if row.price <= max_price:
date = timeutils.timestamp(datetime.datetime.now())
Expand Down

0 comments on commit 45f59f1

Please sign in to comment.