Builds a list of sort criteria for auction listings. Has no effect until SortAuctionApplySort(type) is called; thus, this function can be called repeatedly to build a complex set of sort criteria. Sort criteria are applied server-side, affecting not only the order of items within one "page" of listings but the order in which items are collected into pages.
Criteria are applied in the order set by this function; i.e. the last criterion set becomes the primary sort criterion (see example).
See also Auction functions.
Signature:
SortAuctionSetSort("list", "sort", reversed)
Arguments:
list- Type of auction listing (string)bidder- Auctions the player has bid onlist- Auctions the player can browse and bid on or buy outowner- Auctions the player placed
sort- Criterion to add to the sort (string)bid- Amount of the current or minimum bid on the itembuyout- Buyout price of the itemduration- Time remaining before the auction expireslevel- Required character level to use or equip the itemminbidbuyout- Buyout price, or minimum bid if no buyout price is availablename- Name of the itemquality- itemQuality of the itemquantity- Number of stacked items in the auctionseller- Name of the character who created of the auction (or in theownerlisting, the current high bidder)status- Status of the auction (e.g. in thebidderlisting, whether the player has been outbid)
reversed- True to sort in reverse order; otherwise false. "Reverse" here is relative to the default order, not to absolute value: e.g. the default order forqualityis descending (Epic, Rare, Uncommon, etc), but the default order forlevelis ascending (1-80) (boolean)
Examples:
-- clear any existing criteria
SortAuctionClearSort("list")
-- then, apply some criteria of our own
SortAuctionSetSort("list", "name")
SortAuctionSetSort("list", "level", 1)
SortAuctionSetSort("list", "quality")
-- apply the criteria to the server query
SortAuctionApplySort("list")
-- results are now sorted by quality, level and name:
-- higher quality items are listed before lower (e.g. Epic, Rare, Uncommon)
-- items with the same quality are sorted descending by level (e.g. 80, 75, 30, 1)
-- items with the same quality and level are sorted alphabetically by name