mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 17:13:47 +00:00
feat: Add CanPlaceAuctionBid hook (#15154)
* feat: Add CanPlaceAuctionBid hook * Codestyle fix
This commit is contained in:
@@ -422,6 +422,12 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
|
||||
AuctionEntry* auction = auctionHouse->GetAuction(auctionId);
|
||||
Player* player = GetPlayer();
|
||||
|
||||
if (!sScriptMgr->CanPlaceAuctionBid(player, auction))
|
||||
{
|
||||
SendAuctionCommandResult(0, AUCTION_PLACE_BID, ERR_AUCTION_RESTRICTED_ACCOUNT);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!auction || auction->owner == player->GetGUID())
|
||||
{
|
||||
//you cannot bid your own auction:
|
||||
|
||||
Reference in New Issue
Block a user