Thread Tools Display Modes
07-06-12, 08:22 PM   #1
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
Getting Talent Informations

I've sorted out how to get Spec info but I can not find any documentation on how to find out talents.

For example:

Code:
Spec: Survival   --- I've got this working

Secondary Talents  --- This is not working
1.  1  2  3
2.  1  2  3
3.  1  2  3
4.  1  2  3
5.  1  2  3
6.  1  2  3
How in the world are we finding the info that the player has the red secondary talents selected?

I've got an addon that needs to recognize this to display cooldowns correctly without showing unnessary information.

Anyone have any clue?
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
 
07-06-12, 08:46 PM   #2
Voyager
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 22
Originally Posted by Unkn View Post
How in the world are we finding the info that the player has the red secondary talents selected?
http://www.wowpedia.org/Patch_5.0.1/API_changes

It's right there on that page.
 
07-08-12, 09:55 PM   #3
blacknight
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Feb 2005
Posts: 8
this is my exact code for exporting talents and glyphs for both specs from ingame to a lua file

Code:
unit = "player";
	local numTabs,numPts,state,petName;
	local numSpecs = GetNumSpecializations(false, "player");
	local structTalent={};
	local structTalents={};

	xstat["Talents"] = {};

	numSpecGroups = GetNumSpecGroups(false, "player");
	state = "Talents";
	local tabName,iconTexture,pointsSpent,background;
	local cnt=0;
	local nameTalent,iconTexture,tier,column,currentRank,maxRank,isExceptional,meetsPrereq;
	
	for i = 1, numSpecGroups do
		tindex = i;
		structTalent[tindex]={};
		if (GetActiveSpecGroup(false, "player") == i) then
			Act = true;
		else
			Act = false;
		end
		local id, sname, description, sicon, background= GetSpecializationInfo(i);
		local role = GetSpecializationRole(i);
		
		structTalent[tindex]={
			Icon	=	frame.scanIcon(sicon),
			Background	=	frame.scanIcon(background),
			Name		=	sname,
			Desc 		=	description,
			Active		=	Act,
			Role		=	role,
		};
		structTalent[tindex]["Talents"] = {};
		for talentIndex=1,18 do
			--name, iconTexture, tier, column, selected, available = GetTalentInfo(talentIndex ,null, "player", i) 
			name, iconTexture, tier, column, selected, available = GetTalentInfo(talentIndex, "player", i, false, frame.UnitClass("player"));

			if( name ) then
				structTalent[tindex]["Talents"][name]={
					Location	= strjoin(":", tier,column),
					Texture		=	frame.scanIcon(iconTexture),
					Selected	=	selected,
					Available	=	available,
					Name		=	name,
				};
			end
		end
		local structGlyphs={};
		structTalent[tindex]["Glyphs"] = {};
			for index=1, GetNumGlyphSockets() do
				local enabled, glyphType, glyphTooltipIndex, glyphSpell, icon = GetGlyphSocketInfo(index,i);
				if(enabled == 1 and glyphSpell) then
					name, rank, icon, powerCost, isFunnel, powerType, castingTime, minRange, maxRange = GetSpellInfo(glyphSpell)
					structGlyphs[index] = {
						Name	= name,
						Type	= glyphType,
						Icon	= frame.scanIcon(icon),
					};
				else
					structGlyphs[index] = nil;
				end
			end
		structTalent[tindex]["Glyphs"] = structGlyphs;

	end
__________________
 
07-13-12, 09:56 PM   #4
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
Sorry for delay in response.
Thank you much for your help.
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"
 
 

WoWInterface » Site Forums » Archived Beta Forums » MoP Beta archived threads » Getting Talent Informations

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