Thread Tools Display Modes
05-30-05, 02:24 PM   #1
Keppler
An Aku'mai Servant
Join Date: May 2005
Posts: 37
Retain a reference to targeted unit

Hi Folks

A quick question, as I'm just getting my feet wet (or should that be dirty) in the Addon scenes.

Is it possible to maintain a reference to a unit, or list of units, after the user has moved target to another unit? I ask because the API's I've trawled through seem to have a restricted list of UnitIDs ("target", "raidN" etc) but don't seem to have a method to retrieve an in game handle on a unit. Is this deliberate, or am I missing something?

Useful site, by the way.

Kepps
  Reply With Quote
05-30-05, 02:27 PM   #2
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 7,134
Thanks Keppler. We are hoping it is going to become even more useful, now that folks are actually using it.
  Reply With Quote
05-30-05, 02:50 PM   #3
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
No unfortunately there is no unique id for targets available to us in WoW

A macro/script can target in only one of four ways:
1. Target by name
2. Target by unit type ("player", "mouseover", "party1", "party2", "raid1", etc)
3. Target last enemy
4. Target nearest enemy/friend

If there are two mobs of the same name then it's totally random which you'll target. Eventually I'm sure they'll give us a way to uniquely identify targets. It's a huge problem until then.
  Reply With Quote
05-30-05, 04:58 PM   #4
Keppler
An Aku'mai Servant
Join Date: May 2005
Posts: 37
Thanks for the info folks.
Yes, it's as I expected - I suspect it's a deliberate decision to restrict this to avoid anything too fancy being done from a botting point of view.
Alas my nice and simple "Polymorph counter" is now pretty useless, as I'd be restricted to either
a) keeping the poly'd targeted, rendering it pointless
b) only switch targets once
c) rely on luck.

Pity, cos there's a definate lack of mage-specific mods out there.
Better get cracking on my other ideas.
Thanks for the help.
Kepps
  Reply With Quote
05-31-05, 07:35 AM   #5
Keppler
An Aku'mai Servant
Join Date: May 2005
Posts: 37
Update: found the event CHAT_MSG_SPELL_AURA_GONE_OTHER which sorted me out. This fires when a buff or debuff not on self expires.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Retain a reference to targeted unit


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