how do i pull the Paladin.Ret?
|
It should be:
Lua Code:
local LibClassicSpecs = LibStub("LibClassicSpecs")
--...
local specIndex = GetSpecialization()
local specData = LibClassicSpecs.SpecInfo[specIndex] -- specData should be the class.spec table
for k, v in pairs(specData) do -- what's in the table?
print(k, v)
end
But this is data mostly returned by
GetSpecializationInfo
If you wanted to get "Strength" instead of 1 then you would have to build your own table and access that as the library does not appear to export this information (because locales are a thing)
Lua Code:
local StatIds = {
"Strength",
"Agility",
"Stamina",
"Intellect",
"Spiri",
}
local statName = StatIds[playerStat]