Now, normally this works fine. There's sometimes up to a few second delay from calling NotifyInspect and receiving the INSPECT_TALENT_READY event. As expected. However, when I have myself targeted, it takes an extraordinary amount of time. I've let it sit for a few minutes and gave up after that.
I've looked at WoWWiki, WoWDev, and WoWProgramming.com. None of them have a reference to this sort of problem.
Does anyone have any ideas of what might be going on, what I might be doing wrong, or how to further debug this? Has anyone encountered a similar situation? Is there something special that I have to do with NotifyInspect when using "target" with myself targeted?
Did you actually use "me"? It's "player" not "me".
Sorry about that. I do realize it's "player" and not "me", but I was just trying to give context. The code actually uses "target" in all cases. The problem is when I have myself targeted. I'll edit my OP for clarity. Thanks
EDIT: I just got a response from Akryn:
if UnitIsUnit("target","player") then
btw, it's also a good idea to hooksecurefunc on NotifyInspect, so that you can tell if some other addon called it after you did but before you get the info back, which means you'll need to discard that data unless it's on the same unit.
This implies that ITR simply won't fire when the "target" is "player". Is that true?
Last edited by Sheltim : 07/16/08 at 9:26 AM.
Reason: I don't want to double post
If you try and inspect yourself INSPECT_TALENT_READY never fires, my guess is because the client already knows your talents/gear/ect so theres nothing to request, if you notice when you do InspectUnit("player") it shows gear fine but the talents don't actually show up.
What Vodrin gave was close, you want something like.
if( not UnitIsUnit("player", "target") ) then
If you want to show the players talents when they target themselves then
local firstPoints = select(3, GetTalentTabInfo(1)) or 0
local secondPoints = select(3, GetTalentTabInfo(2)) or 0
local thirdPoints = select(3, GetTalentTabInfo(3)) or 0
local spec = string.format("%d/%d/%d", firstPoints, secondPoints, thirdPoints)