View Single Post
08-24-14, 04:56 PM   #2
Cybeloras
A Fallenroot Satyr
 
Cybeloras's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 28
GetTalentInfoByID() is extremely fast, so you could just do this:

Lua Code:
  1. for i = 1, 30000 do
  2.    local id, name, iconTexture, selected, available = GetTalentInfoByID(i)
  3.    if id then
  4.       ...
  5.    end
  6. end

The only issue is that it doesn't tell you what class a talent belongs to.

If you want to tighten up the ID range, the first talent is 15757, and it is highly improbable that it would ever decrease. The last is 21811. But, like I said, the function is super fast so it really doesn't matter much as long as you only ever iterate through once.

Blizzard should have made GetTalentInfo() take specID as a parameter instead of talentGroup -- all their code would still be possible, and yours would be too. =/

Last edited by Cybeloras : 08-24-14 at 05:02 PM.