WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   MoP Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=162)
-   -   Getting Talent Informations (https://www.wowinterface.com/forums/showthread.php?t=43660)

Unkn 07-06-12 08:22 PM

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?

Voyager 07-06-12 08:46 PM

Quote:

Originally Posted by Unkn (Post 257800)
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.

blacknight 07-08-12 09:55 PM

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


Unkn 07-13-12 09:56 PM

Sorry for delay in response.
Thank you much for your help.


All times are GMT -6. The time now is 05:58 AM.

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