Elitist Jerks
Register
Blogs
Urban Rivals
Forums
New Posts


Go Back   Elitist Jerks > Public Discussion > User Interface and AddOns
Elitist Jerks Login

gamerDNA Login

Welcome to Elitist Jerks
We're testing some new features on the site regarding OpenID registration and coordination with gamerDNA. If you experience any issues with registering an account, please take the time to fill out a report and send it to this e-mail address. We would appreciate any assistance you could provide in making sure everything is functioning as intended. Thanks!

If this is your first visit, please be sure to check out the FAQ and the forum rules. Users must register to post and new registrations are subject to a one day "mute" period to get acquainted with the community.

Reply
 
LinkBack Thread Tools
Old 07/16/08, 9:07 AM   #1
Sheltim
Von Kaiser
 
Tauren Warrior
 
Baelgun
NotifyInspect, INSPECT_TALENT_READY, and targetting yourself

I'm debugging a mod that inspects your target. It (roughly) uses the following:
self:RegisterEvent("INSPECT_TALENT_READY", "DoSomething");
NotifyInspect("target");
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?

Last edited by Sheltim : 07/16/08 at 9:29 AM.
 
User is offline.
Reply With Quote
Old 07/16/08, 9:19 AM   #2
funkydude
Piston Honda
 
funkydude's Avatar
 
Dwarf Priest
 
Silvermoon (EU)
Did you actually use "me"? It's "player" not "me".

Author of BadBoy, BigWigs, StatBlockCore and more...
 
User is offline.
Reply With Quote
Old 07/16/08, 9:28 AM   #3
Sheltim
Von Kaiser
 
Tauren Warrior
 
Baelgun
Originally Posted by funkydude View Post
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
    CheckWhateverYoureCheckingLocallyInsteadOfInspectingSinceYouCantDoThat()
    return
end
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 10:26 AM. Reason: I don't want to double post
 
User is offline.
Reply With Quote
Old 07/16/08, 10:26 AM   #4
Vodrin
Don Flamenco
 
Tauren Druid
 
Magtheridon (EU)
try;

if UnitIsUnit('player','target') then NotifyInspect("player"); else NotifyInspect("target"); end

No idea if it will help or if its the correct syntax but might do the job. Otherwise it may just be that you can't inspect yourself.
 
User is offline.
Reply With Quote
Old 07/16/08, 11:15 AM   #5
Gearknight
Don Flamenco
 
Dwarf Hunter
 
Kul Tiras
Trying to inspect yourself in-game certainly doesn't seem to do anything.
 
User is offline.
Reply With Quote
Old 07/16/08, 11:36 AM   #6
Sheltim
Von Kaiser
 
Tauren Warrior
 
Baelgun
Originally Posted by Vodrin View Post
try;

if UnitIsUnit('player','target') then NotifyInspect("player"); else NotifyInspect("target"); end

No idea if it will help or if its the correct syntax but might do the job. Otherwise it may just be that you can't inspect yourself.
That's an interesting idea, I'll give it a try.

Originally Posted by Gearknight View Post
Trying to inspect yourself in-game certainly doesn't seem to do anything.

Odd: inspecting yourself via right-click doesn't work, but something like "/script InspectUnit("player")" does work.
 
User is offline.
Reply With Quote
Old 07/17/08, 5:02 AM   #7
Shadowed
Bald Bull
 
Tauren Druid
 
Mal'Ganis
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
     self:RegisterEvent("INSPECT_TALENT_READY, "DoSomething")
     NotifyInspect("target")
end
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)
 
User is offline.
Reply With Quote
Reply

Go Back   Elitist Jerks > Public Discussion > User Interface and AddOns

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Targetting Party Members (help request) Lust User Interface and AddOns 17 08/18/07 1:39 AM
Mod Wanted: Number of mobs targetting me. gilf User Interface and AddOns 7 06/09/07 1:03 PM
Arena Targetting and Tracking Mods Jekar User Interface and AddOns 5 04/03/07 11:59 AM