[6926] Use buyout to buy an auction when the last bid is close to the buyout price.

Signed-off-by: megamage <megamage@getmangos.com>

Fixed cheating possibility with original patch changes.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
megamage 2008-12-21 01:44:22 +03:00 committed by tomrus88
parent 128f808858
commit c7ba0afad4
2 changed files with 8 additions and 3 deletions

View file

@ -365,10 +365,15 @@ void WorldSession::HandleAuctionPlaceBid( WorldPacket & recv_data )
return; 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! //auction has already higher bid, client tests it!
//SendAuctionCommandResult(auction->auctionId, AUCTION_PLACE_BID, ???);
return; return;
} }

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "6925" #define REVISION_NR "6926"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__