Returns the spells associated with a specialization.
See also Talent functions.
Signature:
spellID, levelLearned, ... = GetSpecializationSpells(specIndex [, isInspect [, isPet]])
Arguments:
specIndex- The specialization index to get the spells for. (Usually between 1 and 3) (number)isInspect- If true, return the inspected unit's spells instead of the player's. (boolean)isPet- If true, return the player's current pet's spells instead of the player's. (boolean)
Returns:
spellID- spellID of the specialization spell. (number, spellID)levelLearned- The level at which the spell is learned. (number)...- AdditionalspellID, levelLearnedpairs for the other spells of this specialization. (list)
Examples:
local currentSpec = GetSpecialization() -- Get the player's current spec
local spellID, levelLearned = GetSpecializationSpells(currentSpec) -- Get the spellID and level learned of the first spell of this spec.
local spellName = GetSpellInfo(spellID) -- Get the spell name
print("Your specialization's first spell is " .. spellName .. " (spellID " .. spellID .. ") and is learned at level " .. levelLearned .. "!") -- Print it all out to chat