Core/AuctionHandler: Move the MAX_AUCTION_ITEMS check to where it actually does something in HandleAuctionSellItem, thanks @e000 for the suggestion

This commit is contained in:
Subv
2012-02-17 17:46:50 -05:00
parent b3f729274a
commit 9c01620938

View File

@@ -123,6 +123,12 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
uint64 itemGUIDs[MAX_AUCTION_ITEMS]; // 160 slot = 4x 36 slot bag + backpack 16 slot
uint32 count[MAX_AUCTION_ITEMS];
if (itemsCount > MAX_AUCTION_ITEMS)
{
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
return;
}
for (uint32 i = 0; i < itemsCount; ++i)
{
recv_data >> itemGUIDs[i];
@@ -153,12 +159,6 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
return;
}
if (itemsCount > MAX_AUCTION_ITEMS)
{
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
return;
}
etime *= MINUTE;
switch(etime)