From c7ba0afad4eef4f7dcc8ad4ee8d1ede5dea9ed4b Mon Sep 17 00:00:00 2001 From: megamage Date: Sun, 21 Dec 2008 01:44:22 +0300 Subject: [PATCH] [6926] Use buyout to buy an auction when the last bid is close to the buyout price. Signed-off-by: megamage Fixed cheating possibility with original patch changes. Signed-off-by: VladimirMangos --- src/game/AuctionHouse.cpp | 9 +++++++-- src/shared/revision_nr.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/game/AuctionHouse.cpp b/src/game/AuctionHouse.cpp index 4120d1818..8ec7d402d 100644 --- a/src/game/AuctionHouse.cpp +++ b/src/game/AuctionHouse.cpp @@ -365,10 +365,15 @@ void WorldSession::HandleAuctionPlaceBid( WorldPacket & recv_data ) return; } - if (price < (auction->bid + objmgr.GetAuctionOutBid(auction->bid))) + // cheating + if(price <= auction->bid) + return; + + // price too low for next bid if not buyout + if ((price < auction->buyout || auction->buyout == 0) && + price < auction->bid + objmgr.GetAuctionOutBid(auction->bid)) { //auction has already higher bid, client tests it! - //SendAuctionCommandResult(auction->auctionId, AUCTION_PLACE_BID, ???); return; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index aa66c94b6..101dc5fd9 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "6925" + #define REVISION_NR "6926" #endif // __REVISION_NR_H__