aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/AuctionHouseHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/AuctionHouseHandler.cpp')
-rw-r--r--src/server/game/Handlers/AuctionHouseHandler.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp
index 33316338c9e..3fc36cf6f7c 100644
--- a/src/server/game/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp
@@ -151,6 +151,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
if (itemsCount > MAX_AUCTION_ITEMS)
{
SendAuctionCommandResult(NULL, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
+ recvData.rfinish();
return;
}
@@ -159,8 +160,11 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
recvData >> itemGUIDs[i];
recvData >> count[i];
- if (!itemGUIDs[i] || !count[i] || count[i] > 1000 )
+ if (!itemGUIDs[i] || !count[i] || count[i] > 1000)
+ {
+ recvData.rfinish();
return;
+ }
}
recvData >> bid;
@@ -170,6 +174,14 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
if (!bid || !etime)
return;
+ if (bid > MAX_MONEY_AMOUNT || buyout > MAX_MONEY_AMOUNT)
+ {
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Player %s (GUID %u) attempted to sell item with higher price than max gold amount.", _player->GetName().c_str(), _player->GetGUIDLow());
+ SendAuctionCommandResult(NULL, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
+ return;
+ }
+
+
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{