mirror of
https://github.com/NathanHandley/mod-ah-bot-plus.git
synced 2026-02-04 19:43:50 +00:00
Fix issue where buyer undercuts bids
This commit is contained in:
@@ -770,10 +770,7 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(Player* AHBplayer, AHBConfig *con
|
|||||||
bidAmount = auction->GetAuctionOutBid();
|
bidAmount = auction->GetAuctionOutBid();
|
||||||
|
|
||||||
if (auction->bidder)
|
if (auction->bidder)
|
||||||
{
|
|
||||||
sAuctionMgr->SendAuctionOutbiddedMail(auction, bidAmount, AHBplayer, trans);
|
sAuctionMgr->SendAuctionOutbiddedMail(auction, bidAmount, AHBplayer, trans);
|
||||||
CharacterDatabase.CommitTransaction(trans);
|
|
||||||
}
|
|
||||||
|
|
||||||
auction->bidder = AHBplayer->GetGUID();
|
auction->bidder = AHBplayer->GetGUID();
|
||||||
auction->bid = bidAmount;
|
auction->bid = bidAmount;
|
||||||
@@ -785,6 +782,8 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(Player* AHBplayer, AHBConfig *con
|
|||||||
stmt->SetData(1, auction->bid);
|
stmt->SetData(1, auction->bid);
|
||||||
stmt->SetData(2, auction->Id);
|
stmt->SetData(2, auction->Id);
|
||||||
trans->Append(stmt);
|
trans->Append(stmt);
|
||||||
|
|
||||||
|
CharacterDatabase.CommitTransaction(trans);
|
||||||
}
|
}
|
||||||
else if (doBuyout)
|
else if (doBuyout)
|
||||||
{
|
{
|
||||||
@@ -815,6 +814,7 @@ void AuctionHouseBot::Update()
|
|||||||
if (AHCharacters.size() == 0)
|
if (AHCharacters.size() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
// Only update if the update cycle has been hit
|
// Only update if the update cycle has been hit
|
||||||
LastCycleCount++;
|
LastCycleCount++;
|
||||||
if (LastCycleCount < CyclesBetweenBuyOrSell)
|
if (LastCycleCount < CyclesBetweenBuyOrSell)
|
||||||
|
|||||||
Reference in New Issue
Block a user