mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[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:
parent
ea8821ae8d
commit
864ec71941
2 changed files with 12 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11414"
|
||||
#define REVISION_NR "11415"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue