[3.3.5] Core/AuctionHouse: Auction bidders (#18328)

* Save more auction bidders than the highest bidder only
This commit is contained in:
iridinite
2017-11-27 23:00:30 +01:00
committed by Shauren
parent 463ed5e1ac
commit 9d454eb3df
7 changed files with 86 additions and 12 deletions

View File

@@ -515,6 +515,16 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
stmt->setUInt32(2, auction->Id);
trans->Append(stmt);
if (auction->bidders.find(player->GetGUID()) == auction->bidders.end())
{
// save new bidder in list, and save record to db
auction->bidders.insert(player->GetGUID());
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_AUCTION_BIDDERS);
stmt->setUInt32(0, auction->Id);
stmt->setUInt32(1, auction->bidder);
trans->Append(stmt);
}
SendAuctionCommandResult(auction->Id, AUCTION_PLACE_BID, ERR_AUCTION_OK, 0);
}
else