Originally Posted by Ekaterina
You'd want to register for PLAYER_SPECIALIZATION_CHANGED
You can get the current spec with GetSpecialization(). Below is an example of usage from wowpedia:
Lua Code:
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
wow.gamepedia.com/API_GetSpecialization
|
Better than my answer and helps me too, thanks