Fix issue where buyer undercuts bids

This commit is contained in:
NathanHandley
2025-09-10 06:52:38 -05:00
parent a87dfe8f82
commit 44bdbc9ced

View File

@@ -770,10 +770,7 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(Player* AHBplayer, AHBConfig *con
bidAmount = auction->GetAuctionOutBid();
if (auction->bidder)
{
sAuctionMgr->SendAuctionOutbiddedMail(auction, bidAmount, AHBplayer, trans);
CharacterDatabase.CommitTransaction(trans);
}
auction->bidder = AHBplayer->GetGUID();
auction->bid = bidAmount;
@@ -785,6 +782,8 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(Player* AHBplayer, AHBConfig *con
stmt->SetData(1, auction->bid);
stmt->SetData(2, auction->Id);
trans->Append(stmt);
CharacterDatabase.CommitTransaction(trans);
}
else if (doBuyout)
{
@@ -815,6 +814,7 @@ void AuctionHouseBot::Update()
if (AHCharacters.size() == 0)
return;
// Only update if the update cycle has been hit
LastCycleCount++;
if (LastCycleCount < CyclesBetweenBuyOrSell)