Every item returned from GetItemInfo() has a type and subtype. It's preferable to use the item classID (since they match the item enums) instead of the localized itemType strings.
GetItemInfo[]
itemType, itemSubType, _, _, _, _, classID, subclassID = select(6, GetItemInfo(itemID))
- 6. itemType
- string - The localized type of the item.
- 7. itemSubType
- string - The localized sub-type of the item.
- 12. classID
- number - The class ID of the item.
- 13. subclassID
- number - The subclass ID of the item.
Item Type[]
Key | classID | itemType (enUS) | SubType Enum | Description | |
---|---|---|---|---|---|
Consumable | 0 | Consumable | Enum.ItemConsumableSubclass |
||
Container | 1 | Container | |||
Weapon | 2 | Weapon | Enum.ItemWeaponSubclass |
||
Gem | 3 | Gem | Enum.ItemGemSubclass |
||
Armor | 4 | Armor | Enum.ItemArmorSubclass |
||
Reagent | 5 | Reagent | Enum.ItemReagentSubclass |
Obsolete | |
Projectile | 6 | Projectile | Obsolete | ||
Tradegoods | 7 | Tradeskill | |||
ItemEnhancement | 8 | Item Enhancement | |||
Recipe | 9 | Recipe | Enum.ItemRecipeSubclass |
||
CurrencyTokenObsolete | 10 | Money(OBSOLETE) | |||
Quiver | 11 | Quiver | Obsolete | ||
Questitem | 12 | Quest | |||
Key | 13 | Key | |||
PermanentObsolete | 14 | Permanent(OBSOLETE) | |||
Miscellaneous | 15 | Miscellaneous | Enum.ItemMiscellaneousSubclass |
||
Glyph | 16 | Glyph | |||
Battlepet | 17 | Battle Pets | Enum.BattlePetTypes |
||
WoWToken | 18 | WoW Token | |||
Profession | 19 | Profession | Enum.ItemProfessionSubclass |
Added in 10.0.0 |
Example:
/dump Enum.ItemClass.Battlepet -- 17
Item Subtype[]
0: Consumable[]
Warning: The ItemConsumableSubclass enums actually have the wrong values (Issue #218).
Key | subclassID | itemSubType (enUS) | Description |
---|---|---|---|
Generic | 0 | Explosives and Devices | |
Potion | 1 | Potion | |
Elixir | 2 | Elixir | |
Scroll | 3 | Scroll (OBSOLETE) | |
Fooddrink | 4 | Food & Drink | |
Itemenhancement | 5 | Item Enhancement (OBSOLETE) | |
Bandage | 6 | Bandage | |
Other | 7 | Other |
1: Container[]
subclassID | itemSubType (enUS) | Description |
---|---|---|
0 | Bag | |
1 | Soul Bag | Classic |
2 | Herb Bag | |
3 | Enchanting Bag | |
4 | Engineering Bag | |
5 | Gem Bag | |
6 | Mining Bag | |
7 | Leatherworking Bag | |
8 | Inscription Bag | |
9 | Tackle Box | |
10 | Cooking Bag |
2: Weapon[]
Key | subclassID | itemSubType (enUS) | Description |
---|---|---|---|
Axe1H | 0 | One-Handed Axes | |
Axe2H | 1 | Two-Handed Axes | |
Bows | 2 | Bows | |
Guns | 3 | Guns | |
Mace1H | 4 | One-Handed Maces | |
Mace2H | 5 | Two-Handed Maces | |
Polearm | 6 | Polearms | |
Sword1H | 7 | One-Handed Swords | |
Sword2H | 8 | Two-Handed Swords | |
Warglaive | 9 | Warglaives | |
Staff | 10 | Staves | |
Bearclaw | 11 | Bear Claws | |
Catclaw | 12 | CatClaws | |
Unarmed | 13 | Fist Weapons | |
Generic | 14 | Miscellaneous | |
Dagger | 15 | Daggers | |
Thrown | 16 | Thrown | Classic |
Obsolete3 | 17 | Spears | |
Crossbow | 18 | Crossbows | |
Wand | 19 | Wands | |
Fishingpole | 20 | Fishing Poles |
3: Gem[]
Key | subclassID | itemSubType (enUS) | Description |
---|---|---|---|
Intellect | 0 | Intellect | |
Agility | 1 | Agility | |
Strength | 2 | Strength | |
Stamina | 3 | Stamina | |
Spirit | 4 | Spirit | |
Criticalstrike | 5 | Critical Strike | |
Mastery | 6 | Mastery | |
Haste | 7 | Haste | |
Versatility | 8 | Versatility | |
Other | 9 | Other | |
Multiplestats | 10 | Multiple Stats | |
Artifactrelic | 11 | Artifact Relic |
4: Armor[]
Key | subclassID | itemSubType (enUS) | Description |
---|---|---|---|
Generic | 0 | Miscellaneous | Includes Spellstones, Firestones, Trinkets, Rings and Necks |
Cloth | 1 | Cloth | |
Leather | 2 | Leather | |
3 | |||
Plate | 4 | Plate | |
Cosmetic | 5 | Cosmetic | |
Shield | 6 | Shields | |
Libram | 7 | Librams | Classic |
Idol | 8 | Idols | Classic |
Totem | 9 | Totems | Classic |
Sigil | 10 | Sigils | Classic |
Relic | 11 | Relic |
5: Reagent[]
- For crafting reagents see 7: Tradeskill. For spell reagents see 15: Miscellaneous.
Key | subclassID | itemSubType (enUS) | Description |
---|---|---|---|
Reagent | 0 | Reagent | |
Keystone | 1 | Keystone | |
ContextToken | 2 | Context Token |
6: Projectile[]
subclassID | itemSubType (enUS) | Description |
---|---|---|
0 | Wand(OBSOLETE) | |
1 | Bolt(OBSOLETE) | |
2 | Arrow | |
3 | Bullet | |
4 | Thrown(OBSOLETE) |
7: Tradeskill[]
subclassID | itemSubType (enUS) | Description |
---|---|---|
0 | Trade Goods (OBSOLETE) | |
1 | Parts | |
2 | Explosives (OBSOLETE) | |
3 | Devices (OBSOLETE) | |
4 | Jewelcrafting | |
5 | Cloth | |
6 | Leather | |
7 | Metal & Stone | |
8 | Cooking | |
9 | Herb | |
10 | Elemental | |
11 | Other | |
12 | Enchanting | |
13 | Materials (OBSOLETE) | |
14 | Item Enchantment (OBSOLETE) | |
15 | Weapon Enchantment - Obsolete | |
16 | Inscription | |
17 | Explosives and Devices (OBSOLETE) |
8: Item Enhancement[]
subclassID | itemSubType (enUS) | Description |
---|---|---|
0 | Head | |
1 | Neck | |
2 | Shoulder | |
3 | Cloak | |
4 | Chest | |
5 | Wrist | |
6 | Hands | |
7 | Waist | |
8 | Legs | |
9 | Feet | |
10 | Finger | |
11 | Weapon | One-handed weapons |
12 | Two-Handed Weapon | |
13 | Shield/Off-hand | |
14 | Misc |
9: Recipe[]
Key | subclassID | itemSubType (enUS) | Description |
---|---|---|---|
Book | 0 | Book | |
Leatherworking | 1 | Leatherworking | |
Tailoring | 2 | Tailoring | |
Engineering | 3 | Engineering | |
Blacksmithing | 4 | Blacksmithing | |
Cooking | 5 | Cooking | |
Alchemy | 6 | Alchemy | |
FirstAid | 7 | First Aid | |
Enchanting | 8 | Enchanting | |
Fishing | 9 | Fishing | |
Jewelcrafting | 10 | Jewelcrafting | |
Inscription | 11 | Inscription |
10: Money (Obsolete)[]
subclassID | itemSubType (enUS) | Description |
---|---|---|
0 | Money(OBSOLETE) |
11: Quiver[]
subclassID | itemSubType (enUS) | Description |
---|---|---|
0 | Quiver(OBSOLETE) | |
1 | Bolt(OBSOLETE) | |
2 | Quiver | |
3 | Ammo Pouch |
12: Quest[]
subclassID | itemSubType (enUS) | Description |
---|---|---|
0 | Quest |
13: Key[]
subclassID | itemSubType (enUS) | Description |
---|---|---|
0 | Key | |
1 | Lockpick |
14: Permanent (Obsolete)[]
subclassID | itemSubType (enUS) | Description |
---|---|---|
0 | Permanent |
15: Miscellaneous[]
Key | subclassID | itemSubType (enUS) | Description |
---|---|---|---|
Junk | 0 | Junk | |
Reagent | 1 | Reagent | Mainly spell reagents. For crafting reagents see 7: Tradeskill. |
CompanionPet | 2 | Companion Pets | |
Holiday | 3 | Holiday | |
Other | 4 | Other | |
Mount | 5 | Mount | |
MountEquipment | 6 | Mount Equipment |
16: Glyph[]
subclassID | itemSubType (enUS) | Description |
---|---|---|
1 | Warrior | |
2 | Paladin | |
3 | Hunter | |
4 | Rogue | |
5 | Priest | |
6 | Death Knight | |
7 | Shaman | |
8 | Mage | |
9 | Warlock | |
10 | Monk | |
11 | Druid | |
12 | Demon Hunter |
17: Battle Pets[]
Key | subclassID | itemSubType (enUS) | Description |
---|---|---|---|
Humanoid | 0 | Humanoid | |
Dragonkin | 1 | Dragonkin | |
Flying | 2 | Flying | |
Undead | 3 | Undead | |
Critter | 4 | Critter | |
Magic | 5 | Magic | |
Elemental | 6 | Elemental | |
Beast | 7 | Beast | |
Aquatic | 8 | Aquatic | |
Mechanical | 9 | Mechanical |
18: WoW Token[]
subclassID | itemSubType (enUS) | Description |
---|---|---|
0 | WoW Token |
19: Profession[]
Key | subclassID | itemSubType (enUS) | Description |
---|---|---|---|
Blacksmithing | 0 | Blacksmithing | |
Leatherworking | 1 | Leatherworking | |
Alchemy | 2 | Alchemy | |
Herbalism | 3 | Herbalism | |
Cooking | 4 | Cooking | |
Mining | 5 | Mining | |
Tailoring | 6 | Tailoring | |
Engineering | 7 | Engineering | |
Enchanting | 8 | Enchanting | |
Fishing | 9 | Fishing | |
Skinning | 10 | Skinning | |
Jewelcrafting | 11 | Jewelcrafting | |
Inscription | 12 | Inscription | |
Archaeology | 13 | Archaeology |
Patch changes[]
- Patch 10.0.0 (2022-10-25): Added
Enum.ItemClass.Profession
. - Patch 9.1.0 (2021-06-29): Changed from
LE_
Lua Enums to theEnum
table.
See also[]
- GetItemClassInfo() - Returns item class names.
- GetItemSubClassInfo() - Returns item subclass names.
- GetAuctionItemSubClasses() - Returns valid item subclasses for the Auction House.