WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   sStats module (https://www.wowinterface.com/forums/showthread.php?t=42997)

Kendian 03-09-12 04:41 PM

sStats module
 
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~

suicidalkatt 03-10-12 02:55 AM

Quote:

Originally Posted by Kendian (Post 253598)
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:
  1. --Talent Spec Display--
  2.  
  3. local sStats_spec, sStats_specText = sStats:CreateModule("spec")
  4. sStats.RegisterCallback(sStats_spec, "sStats_Modules_Ready", function()
  5.  
  6.     sStats_spec:RegisterEvent("PLAYER_TALENT_UPDATE");
  7.     sStats_spec:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED");
  8.     sStats_spec:SetScript("OnEvent", function()
  9.             local masteryIndex = GetPrimaryTalentTree();
  10.             local spec
  11.             if (masteryIndex == nil) then
  12.                 spec = "Unknown"
  13.             else
  14.                 local _, name = GetTalentTabInfo(masteryIndex);
  15.                 spec = name
  16.             end
  17.             local specName = string.format("%s", spec)
  18.             sStats:SetModuleText(sStats_specText, specName, " Spec")
  19.         end)
  20.  
  21. end)

Edit: If you'd like I could add more detailed information on mouseover tooltip.

Kendian 03-10-12 03:22 AM

Quote:

Originally Posted by suicidalkatt (Post 253608)
Made a pretty quick little addon for sStats. Relatively easy to create.

Code is mostly taken from the default WoW's CharacterFrame:

lua Code:
  1. --Talent Spec Display--
  2.  
  3. local sStats_spec, sStats_specText = sStats:CreateModule("spec")
  4. sStats.RegisterCallback(sStats_spec, "sStats_Modules_Ready", function()
  5.  
  6.     sStats_spec:RegisterEvent("PLAYER_TALENT_UPDATE");
  7.     sStats_spec:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED");
  8.     sStats_spec:SetScript("OnEvent", function()
  9.             local masteryIndex = GetPrimaryTalentTree();
  10.             local spec
  11.             if (masteryIndex == nil) then
  12.                 spec = "Unknown"
  13.             else
  14.                 local _, name = GetTalentTabInfo(masteryIndex);
  15.                 spec = name
  16.             end
  17.             local specName = string.format("%s", spec)
  18.             sStats:SetModuleText(sStats_specText, specName, " Spec")
  19.         end)
  20.  
  21. end)

Edit: If you'd like I could add more detailed information on mouseover tooltip.

That's just awesome. THANK you, very much~ and more detail is always welcome, even though that makes me sound like a beggar, lol~

suicidalkatt 03-10-12 04:44 AM

Quote:

Originally Posted by Kendian (Post 253609)
That's just awesome. THANK you, very much~ and more detail is always welcome, even though that makes me sound like a beggar, lol~

Updated:
http://www.wowinterface.com/download...o.php?id=20931

Kendian 03-11-12 12:45 AM

Thanks for this, I needed this to finish my UI. Parented a transparent KGPanel to this with an on click script to switch specs, works like a dream~

suicidalkatt 03-11-12 01:48 AM

Quote:

Originally Posted by Kendian (Post 253643)
Thanks for this, I needed this to finish my UI. Parented a transparent KGPanel to this with an on click script to switch specs, works like a dream~

Yay :) Glad you're enjoying it.


All times are GMT -6. The time now is 04:22 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI