How to get current player's current spec?

I am trying to prevent my addon from running under anything other than retribution spec. But I can’t seem to pull the data.

I do not want other players spec just the current playing characters.

https://wow.gamepedia.com/API_GetSpecialization

local specIndexNbr=GetSpecialization();

The specIndex will match the order of specializations when you open the talent screen. If ret is the top specialization, it will have index 1 from the api

1 Like

It’s best you get this information after the PLAYER_LOGIN event has fired to ensure your current character information has loaded.