Reply
Thread Tools Display Modes
Unread 03-09-12, 04:41 PM   #1
Kendian
A Molten Giant
 
Kendian's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 614
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~
__________________
Kendian is offline   Reply With Quote
Unread 03-10-12, 02:55 AM   #2
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 310
Originally Posted by Kendian View Post
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.

Last edited by suicidalkatt : 03-10-12 at 02:59 AM.
suicidalkatt is offline   Reply With Quote
Unread 03-10-12, 03:22 AM   #3
Kendian
A Molten Giant
 
Kendian's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 614
Originally Posted by suicidalkatt View Post
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~
__________________
Kendian is offline   Reply With Quote
Unread 03-10-12, 04:44 AM   #4
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 310
Originally Posted by Kendian View Post
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

Last edited by suicidalkatt : 03-10-12 at 02:19 PM.
suicidalkatt is offline   Reply With Quote
Unread 03-11-12, 12:45 AM   #5
Kendian
A Molten Giant
 
Kendian's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 614
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~
__________________
Kendian is offline   Reply With Quote
Unread 03-11-12, 01:48 AM   #6
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 310
Originally Posted by Kendian View Post
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.
suicidalkatt is offline   Reply With Quote
Reply

Go BackWoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » sStats module

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off