RSS

Суббота, 20.04.2024, 13:52
Главная » WoW API » API Функции » Аукцион »

GetAuctionItemSubClasses

[ править ]
Returns a list of localized subclass names for a given item class.
[клоны]
Returns a list of localized subclass names for a given item class. Item subclasses are the second level of hierarchy seen when browsing item classes (categories) at the Auction House: One-Handed Axes, Two-Handed Axes, Bows, Guns, et al for Weapon; Cloth, Leather, Plate, Shields, et al for Armor; Food & Drink, Potion, Elixir et al for Consumable; Red, Blue, Yellow, et al for Gem; etc.

This function still returns valid information if the player is not interacting with an auctioneer.

Signature:
Code
... = GetAuctionItemSubClasses(classIndex)

Arguments:
  • classIndex - Index of an item class (in the list returned by GetAuctionItemClasses()) (number)

Returns:
  • ... - A list of strings, each the name of an item subclass; or nil if the class contains no subclasses (list)

Examples:
-- Example 1 - Prints a list of the subclasses for each item class
function printSubClasses(...)
for class = 1, select("#", ...) do
print(select(class, ...).. ":", strjoin(", ", GetAuctionItemSubClasses(class)))
end
end
printSubClasses(GetAuctionItemClasses())
-- Example 2 - Fetch a list of classIndex (e.g. "Weapon") sub-types:
local weaponSubTypesList = GetAuctionSubClasses(1); --1="Weapon"

-- Some example item sub-classes are:
-- "One-Handed Axes",
-- "Two-Handed Axes",
-- "Bows",
-- "Guns",
-- "One-Handed Maces",
-- "Two-Handed Maces",
-- "Polearms",
-- "One-Handed Swords",
-- "Two-Handed Swords",
-- "Staves",
-- "Fist Weapons",
-- "Miscellaneous",
-- "Daggers",
-- "Thrown",
-- "Crossbows",
-- "Wands",
-- "Fishing Poles"

Также смотрите: Аукцион , Auction functions
Ссылки: http://wowprogramming.com/docs/api/GetAuctionItemSubClasses