Lore archive · Warcraft Wiki, 2023 dump
API GetSpecialization
Last wiki revision 2022-09-09
Returns the index of the player's current specialization. currentSpec = GetSpecialization([isInspect, isPet, specGroup])
- isInspect: - if true, return information for the inspected player
- isPet: - if true, return information for the player's pet.
- specGroup: - The index of a given specialization/talent/glyph group (1 for primary / 2 for secondary).
- currentSpec: - index of the current specialization (ascending from 1), or nil if no specialization is currently learned.
The following snippet prints the name of the player's current specialization if you have one selected. local currentSpec = GetSpecialization if currentSpec then local _, currentSpecName = GetSpecializationInfo(currentSpec) print("Your current spec:", currentSpecName) else print("You do not currently have a spec.") end
- For inspecting another player's spec, see
- Returns a value of 5 as of 9.0.1 for newly created characters.
Source
https://warcraft.wiki.gg/wiki/API_GetSpecialization · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.