mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core): Crashfix. (#11495)
This commit is contained in:
@@ -731,6 +731,9 @@ bool AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
|
||||
{
|
||||
uint32 itrcounter = 0;
|
||||
|
||||
// Ensures that listfrom is not greater that auctions count
|
||||
listfrom = std::min(listfrom, static_cast<uint32>(GetAuctions().size()));
|
||||
|
||||
std::vector<AuctionEntry*> auctionShortlist;
|
||||
|
||||
// pussywizard: optimization, this is a simplified case
|
||||
@@ -880,8 +883,13 @@ bool AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player
|
||||
}
|
||||
}
|
||||
|
||||
if (auctionShortlist.empty())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check if sort enabled, and first sort column is valid, if not don't sort
|
||||
if (sortOrder.size() > 0)
|
||||
if (!sortOrder.empty())
|
||||
{
|
||||
AuctionSortInfo const& sortInfo = *sortOrder.begin();
|
||||
if (sortInfo.sortOrder >= AUCTION_SORT_MINLEVEL && sortInfo.sortOrder < AUCTION_SORT_MAX && sortInfo.sortOrder != AUCTION_SORT_UNK4)
|
||||
|
||||
Reference in New Issue
Block a user