View Single Post
03-23-24, 12:22 PM   #6
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,937
Ah, then nope, not possible to do that.

Not sure where that ID you are talking about comes from as the GUID value which is a short term unique id for everything in the game is much longer than a single number.

"Creature-0-1465-0-2105-448-000043F59F"
Which is an example provided on https://warcraft.wiki.gg/wiki/API_UnitGUID page.

Unless you have already extracted the ID element from the GUID.
The ID for that creature is 448 with the three immediately before referencing the server, instance and zone they are in.

I cannot see a reverse equivalent except for players (https://warcraft.wiki.gg/wiki/API_GetPlayerInfoByGUID).

So, the nearest you could get ( assuming it is the GUID you are talking about ) is to cycle through all the possible targets via the /target ( or more precisely in this case /targetenemy) command or tab target and use the PLAYER_CHANGED_TARGET or UNIT_TARGET events to identify a target switch or
use the UPDATE_MOUSEOVER_UNIT event to identify an entity under the mouse when you move it.

see the following pages for more info:
https://warcraft.wiki.gg/wiki/UNIT_TARGET
https://warcraft.wiki.gg/wiki/PLAYER_TARGET_CHANGED
https://warcraft.wiki.gg/wiki/UPDATE_MOUSEOVER_UNIT

and use UnitGUID to get their unique ID and check it against the one(s) you want.

Once you have identified the correct target you could then use ( https://warcraft.wiki.gg/wiki/API_SetRaidTargetIcon ) to set an icon on that entity so people can see it.

I am assuming this is so that everyone targets the same entity.


I obviously haven't tried this myself, but it would be my first steps in attempting such a task.

There is no way to do this without you utilising a hardware action ( keypress, slash command, mousemove etc ) for each target change.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 03-23-24 at 12:37 PM.
  Reply With Quote