Thread Tools Display Modes
11-24-23, 03:48 AM   #1
GnomeIndustries
A Defias Bandit
Join Date: Sep 2022
Posts: 3
Question Working out if a talent is known

I'm trying to write a module to my addon for my Death Knight that shows a warning when the Icy Talons buff is about to drop off or is missing. Which I've done... BUT

If I don't have the talent then I'll never have the buff and thus the warning always shows.

Is there an easy way to detect whether the talent is currently known or not?
  Reply With Quote
11-24-23, 01:53 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 6,007
This might help
https://warcraft.wiki.gg/wiki/API_GetTalentInfo

But you might have to build up a list of current talents to make it easier to find a talent if the direct route doesn't work.
__________________


All Level 70 Characters:
Demon Warlock
Resto Druid
Disc Priest
Resto Shaman
Survival Hunter
Augment Evoker
Frost Mage
Vengence Demon Hunter
Rogue ( was subtlety )

Brewmaster Monk (TR)
Prot Paladin (TR)
Blood Death Knight ( TR)

As you can see I am missing a warrior

And .. I don't have all the allied races covered. Time Runner time when it happens again

  Reply With Quote
11-25-23, 07:59 AM   #3
Mimma
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Nov 2019
Posts: 7
Originally Posted by GnomeIndustries View Post
I'm trying to write a module to my addon for my Death Knight that shows a warning when the Icy Talons buff is about to drop off or is missing. Which I've done... BUT

If I don't have the talent then I'll never have the buff and thus the warning always shows.

Is there an easy way to detect whether the talent is currently known or not?

You could make the simple approach and only activate the message if Icy Talons had been actived earlier. It's dirty but simple :-)

Only problem is it won't work until you have actually cast the spell - and it won't work after you respec.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Working out if a talent is known


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