Here's code for determining all of the item classes and their associated subclasses:
Code:
do
COMPILED_ITEM_CLASSES = {}
local classIndex = 0
local className = _G.GetItemClassInfo(classIndex)
while className and className ~= "" do
COMPILED_ITEM_CLASSES[classIndex] = {
name = className,
subClasses = {},
}
local subClassIndex = 0
local subClassName = _G.GetItemSubClassInfo(classIndex, subClassIndex)
while subClassName and subClassName ~= "" do
COMPILED_ITEM_CLASSES[classIndex].subClasses[subClassIndex] = subClassName
subClassIndex = subClassIndex + 1
subClassName = _G.GetItemSubClassInfo(classIndex, subClassIndex)
end
classIndex = classIndex + 1
className = _G.GetItemClassInfo(classIndex)
end
end
You can then look at the table (it's globally declared) to see what's what. The starting index of 0 rather than 1 is intentional - they're actually used by Blizzard.