diff --git a/src/AuctionHouseBot.cpp b/src/AuctionHouseBot.cpp index fe6010c4..51a10fab 100644 --- a/src/AuctionHouseBot.cpp +++ b/src/AuctionHouseBot.cpp @@ -244,8 +244,11 @@ void AuctionHouseBot::Buy(Player* AHBplayer, AHBConfig* config, WorldSession* se LOG_INFO("module", "AHBot [{}]: Considering {} auctions per interval to bid on.", _id, config->GetBidsPerInterval()); } - for (uint32 count = 1; count <= config->GetBidsPerInterval(); ++count) - { + for ( + uint32 count = 1; + count <= config->GetBidsPerInterval() && !auctionsGuidsToConsider.empty(); + ++count + ) { // // Choose a random auction from possible auctions //