View Single Post
09-05-17, 08:49 AM
A Frostmaul Preserver
Join Date: Jun 2016
What if, instead of three separate addons for the primary stats, you had just one for primary stats that dynamically changed depending on which spec you're in?
you can get the spec ID for the spec the player is currently in, and with
you can know which primary stat is used (without having to hardcode in a list.)
local _, _, _, _, _, primaryStat = GetSpecializationInfo(GetSpecialization())
(GetSpecializationInfo() info isn't quite up-to-date on wowprogramming; it does not return
This will output 1 (strength), 2 (agility) or 4 (intellect) into primaryStat, which are the same as the LE_UNIT_STAT_STRENGTH, LE_UNIT_STAT_AGILITY and LE_UNIT_STAT_INTELLECT constants.
That way you only need to have one addon installed and it'll cover whichever primary stat you'd be interested in seeing for your current character. Also only need to maintain 1 addon if it needs to be worked on and updated
View Public Profile
Send a private message to Ammako
Find More Posts by Ammako