Thread Tools Display Modes
09-23-08, 08:57 AM   #1
Ailae
A Rage Talon Dragon Guard
 
Ailae's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 318
Quick GetTalentInfo-question

Hello

Just making a tiny little addon for myself to track duration on my short-time blessings on other people and I have a quick question.

At the moment I'm not checking whether I have the Guardian's Favor talent or not (it increases duration of Blessing of Freedom by 4 sec fully talented) since for myself I can just assume that I have it. But in a spark of wanting to fool around with making it more generic and to save me some lua-editing come Wrath when I might respec I figured I'd add it now.

So if I wanted to see if I have the talent maxed out I would do
Code:
GetTalentInfo(2, 4)
which would return
Code:
"Guardian's Favor", "Interface\\Icons\\Spell_Holy_SealOfProtection", 2, 2, 2, 2, nil, 1
The variable list being name, iconTexture, tier, column, rank, maxRank, isExceptional, meetsPrereq. With this info can I at all times assume that if rank equals maxRank I have this talent maxed out? It might seem obvious but just trying to make sure.

Oh, and another question: when is talent-info available? At PLAYER_ENTERING_WORLD?

Thanks in advance!
  Reply With Quote
09-23-08, 11:34 PM   #2
Travisstorma
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 9
The variable list being name, iconTexture, tier, column, rank, maxRank, isExceptional, meetsPrereq. With this info can I at all times assume that if rank equals maxRank I have this talent maxed out? It might seem obvious but just trying to make sure.
Yes. That should work. My code I just used if rank == 3 then blah = true since 3 was the max rank.

Oh, and another question: when is talent-info available? At PLAYER_ENTERING_WORLD?

Thanks in advance!
As far as I know, talent info isn't available until the the first frame is drawn. I ran into this problem about a month ago. P_E_W was fired too early for this. What I ended up doing is creating a simple frame that had its OnUpdate call a function that looked for that info. Once my mod had the info it just hid the frame.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Quick GetTalentInfo-question


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