Originally Posted by Kendian
Anyway to talk someone into writing a spec module for sStats? Or point me in the right direction? I'm trying to modify Diminfo to read out spec, instead of talent points, or just pare down Lumstats to just show spec, but no luck so far.
My thanks, in advance, for any/all help~
|
Made a pretty quick little addon for sStats. Relatively easy to create.
Code is mostly taken from the default WoW's CharacterFrame:
lua Code:
--Talent Spec Display--
local sStats_spec, sStats_specText = sStats:CreateModule("spec")
sStats.RegisterCallback(sStats_spec, "sStats_Modules_Ready", function()
sStats_spec:RegisterEvent("PLAYER_TALENT_UPDATE");
sStats_spec:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED");
sStats_spec:SetScript("OnEvent", function()
local masteryIndex = GetPrimaryTalentTree();
local spec
if (masteryIndex == nil) then
spec = "Unknown"
else
local _, name = GetTalentTabInfo(masteryIndex);
spec = name
end
local specName = string.format("%s", spec)
sStats:SetModuleText(sStats_specText, specName, " Spec")
end)
end)
Edit: If you'd like I could add more detailed information on mouseover tooltip.