Thread: Recipe Book
View Single Post
06-17-05, 10:59 PM   #13
Ratstomper
A Fallenroot Satyr
Join Date: Jun 2005
Posts: 27
Crimeny, I'm so embarassed ...

The specialization skills show up right there in your spellbook in General. I thought I had seen them somewhere...

It's ugly as sin, but you could use a loop with GetSpellName to determine what specializations a character has:

Code:
local i = 1;

while true do
    local spellName, spellRank = GetSpellName(i, BOOKTYPE_SPELL)
    if not spellName then
        do break end
    end

    -- You can check by specific "spell" name for the known specializations ...
    if ( spellName == "Armorsmith" ) then
        -- do stuff here
    end

    -- Or you could generate a much smaller list by only looking at spells with a rank of "Artisan" ...
    -- Note that this will generate a list of all Artisan level tradeskills
    if ( spellRank == "Artisan" ) then
        -- do stuff here
    end

    -- or you could just process the entire list
    -- process spellName or spellRank 

    i = i + 1
end

Last edited by Ratstomper : 06-17-05 at 11:06 PM. Reason: fatfingered "crimeny".... fixed it now
  Reply With Quote