View Single Post
09-09-23, 02:12 PM   #13
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,894
how do i pull the Paladin.Ret?
It should be:
Lua Code:
  1. local LibClassicSpecs = LibStub("LibClassicSpecs")
  2. --...
  3. local specIndex = GetSpecialization()
  4. local specData = LibClassicSpecs.SpecInfo[specIndex] -- specData should be the class.spec table
  5. for k, v in pairs(specData) do -- what's in the table?
  6.     print(k, v)
  7. 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:
  1. local StatIds = {
  2.   "Strength",
  3.   "Agility",
  4.   "Stamina",
  5.   "Intellect",
  6.   "Spiri",
  7. }
  8.  
  9. local statName = StatIds[playerStat]
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 09-09-23 at 02:21 PM.
  Reply With Quote