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 47ad7ffa568..abeee3e1a9e 100644
--- a/src/server/game/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp
@@ -127,6 +127,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
if (itemsCount > MAX_AUCTION_ITEMS)
{
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
+ recvData.rfinish();
return;
}
@@ -135,8 +136,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;
@@ -146,6 +150,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(0, AUCTION_SELL_ITEM, ERR_AUCTION_DATABASE_ERROR);
+ return;
+ }
+
+
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!creature)
{