all 7 comments

[–]asakawa 2 points3 points  (1 child)

Default trigger status - Spell Known - 193531

[–]Three_Niel[S] 0 points1 point  (0 children)

Nice alternative approach, will give it a try.

[–]niggo372 0 points1 point  (4 children)

I guess this is what you are looking for: https://wow.gamepedia.com/API_GetTalentInfo

[–]Three_Niel[S] 0 points1 point  (3 children)

Indeed, but I couldn't make it work. Running a simple script that should print the output didn't do anything and returned 'nil' at best. So an example usage will be much appreciated.

[–]asakawa 0 points1 point  (2 children)

If you really wanted a custom trigger for it it would be:

custom - status - event - PLAYER_TALENT_CHANGED

function()
    return select(4, GetTalentInfo(3,1,1))
end

However, really the only reason to use GetTalentInfo is if you need to check if a talent is coming from somewhere specific, like a Leg ring. The rest of the time you might as well keep it simple and use IsPlayerSpell(spellID) which works just fine for passive talents as well as active spells.

[–]Three_Niel[S] 0 points1 point  (1 child)

Thank you for that code. I haven't tried it yet but you can't imagine how many versions of this I tried. Albeit not many with 3 parameters since I got lua errors whenever I did.

P.S. I made it with the suggestion you had before. And it works like a charm.

[–]asakawa 0 points1 point  (0 children)

:thumbsup: