feat: Add CanPlaceAuctionBid hook (#15154)

* feat: Add CanPlaceAuctionBid hook

* Codestyle fix
This commit is contained in:
ZhengPeiRu21
2023-04-17 18:06:04 -06:00
committed by GitHub
parent 9af9208d16
commit 5af67b384b
3 changed files with 25 additions and 0 deletions

View File

@@ -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: