From 864ec71941953ad159f427d16cdb77a0f530d37e Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Mon, 2 May 2011 01:22:29 +0400 Subject: [PATCH] [11415] Better server side error reporting to player for bid adding cases Sometime to client can sedn bid infor near to same time. In like cases client fail prevent bid apply attempt at self side and need send proper error from server side instead just ignore packet. --- src/game/AuctionHouseHandler.cpp | 13 +++++++++++-- src/shared/revision_nr.h | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/game/AuctionHouseHandler.cpp b/src/game/AuctionHouseHandler.cpp index e99911d2f..c97c0a643 100644 --- a/src/game/AuctionHouseHandler.cpp +++ b/src/game/AuctionHouseHandler.cpp @@ -451,14 +451,23 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data) } // cheating - if (price <= auction->bid || price < auction->startbid) + if (price < auction->startbid) return; + // cheating or client lags + if (price <= auction->bid) + { + // client test but possible in result lags + SendAuctionCommandResult(auction, AUCTION_BID_PLACED, AUCTION_ERR_HIGHER_BID); + return; + } + // price too low for next bid if not buyout if ((price < auction->buyout || auction->buyout == 0) && price < auction->bid + auction->GetAuctionOutBid()) { - // auction has already higher bid, client tests it! + // client test but possible in result lags + SendAuctionCommandResult(auction, AUCTION_BID_PLACED, AUCTION_ERR_BID_INCREMENT); return; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index faff94266..4a3515ef0 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 "11414" + #define REVISION_NR "11415" #endif // __REVISION_NR_H__