[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.
This commit is contained in:
VladimirMangos 2011-05-02 01:22:29 +04:00
parent ea8821ae8d
commit 864ec71941
2 changed files with 12 additions and 3 deletions

View file

@ -451,14 +451,23 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
} }
// cheating // cheating
if (price <= auction->bid || price < auction->startbid) if (price < auction->startbid)
return; 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 // price too low for next bid if not buyout
if ((price < auction->buyout || auction->buyout == 0) && if ((price < auction->buyout || auction->buyout == 0) &&
price < auction->bid + auction->GetAuctionOutBid()) 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; 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 "11414" #define REVISION_NR "11415"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__