Thread Tools Display Modes
07-10-16, 05:58 PM   #1
TimothyLuke
A Fallenroot Satyr
 
TimothyLuke's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 24
Question Getting Talent Choices as a string like 3121133

I'm trying to get a simple dump of talents as a string like 3121133 meaning choice 3 tier 1, choice 1 tier 2 etc.

i tried as a starting point
Code:
local talents
for i=1,7 do
  local _, talentID = GetTalentRowSelectionInfo(i)
  talents = talents .. talentID
end
Now i know this is probabely not going to return what I am after but the error I am getting is that global GetTalentRowSelectionInfo() is nil.

I couldn't find anything about this api changing. What have I missed?

Last edited by TimothyLuke : 07-10-16 at 06:46 PM.
 
07-10-16, 08:06 PM   #2
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
Looks like it is now GetTalentTierInfo.
Code:
local talentGroup, talents = GetActiveSpecGroup(), ""
for talentTier = 1, MAX_TALENT_TIERS do
	local available, selected = GetTalentTierInfo(talentTier, talentGroup, nil, 'player')
	talents = talents .. (available and selected or "0")
end
Seems like the unit 'player' is defaulted so you can shorten it up to GetTalentTierInfo(talentTier, talentGroup) if you wanted.
 
07-10-16, 08:28 PM   #3
Gethe
RealUI Developer
 
Gethe's Avatar
Premium Member
Featured
Join Date: Sep 2008
Posts: 942
Also, GetActiveSpecGroup will always return 1 in Legion since the concept of a "spec group" was made for dual specs, which is no longer a thing. So you can save a function call and just do GetTalentTierInfo(talentTier, 1).
__________________
Knowledge = Power; Be OP

 
07-11-16, 03:46 AM   #4
TimothyLuke
A Fallenroot Satyr
 
TimothyLuke's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 24
THank you all.

This worked:

Code:
local talents = ""
  for talentTier = 1, MAX_TALENT_TIERS do
    local available, selected = GetTalentTierInfo(talentTier, 1)
    talents = talents .. (available and selected or "0")
  end
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » Getting Talent Choices as a string like 3121133


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