Thread Tools Display Modes
11/05/14, 08:19 PM   #1
Maverick827
Join Date: Aug 2014
Posts: 6
Unit questions

I'm looking for a way to do the following:

1. Get the name of the unit you currently have tab targeted. I know GetUnitName('reticleover') gets the name of the unit you have your reticle/cursor/focus on, but that's unfortunately not what I need. When you target an enemy and hit tab, you get the box with the four little corners around it filled in white. If you look away, the corners are no longer filled in. I need to get the name of that unit, in this state, if possible.

2. Whether or not this unit is in a veteran dungeon/trial. Now that we have dungeon scaling, GetUnitVeteranRank and IsUnitVeteran doesn't necessarily indicate whether or not the dungeon mode itself is set to veteran. I tried IsUnitUsingVeteranDifficulty on trash mobs in a veteran dungeon, but it was false. Maybe it only works for bosses? Or maybe it just doesn't work. There's a SetVeteranDifficulty method, but not GetVeteranDifficulty, unfortunately.

Thanks!
  Reply With Quote
11/05/14, 09:46 PM   #2
katkat42
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 155
Originally Posted by Maverick827 View Post
2. Whether or not this unit is in a veteran dungeon/trial. Now that we have dungeon scaling, GetUnitVeteranRank and IsUnitVeteran doesn't necessarily indicate whether or not the dungeon mode itself is set to veteran. I tried IsUnitUsingVeteranDifficulty on trash mobs in a veteran dungeon, but it was false. Maybe it only works for bosses? Or maybe it just doesn't work. There's a SetVeteranDifficulty method, but not GetVeteranDifficulty, unfortunately.
What I think you need to do is use IsUnitUsingVeteranDifficulty on yourself, not the trash mob. So: IsUnitUsingVeteranDifficulty("player")
  Reply With Quote
11/05/14, 10:09 PM   #3
Maverick827
Join Date: Aug 2014
Posts: 6
That worked, thanks.
  Reply With Quote
11/05/14, 10:23 PM   #4
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
As for 1) you can try unitTag "target". This unitTag exists, but I'm not sure if it always the same as "reticleover" or if it is really highlighted target.
  Reply With Quote
11/06/14, 12:21 PM   #5
Maverick827
Join Date: Aug 2014
Posts: 6
I tried "target," but it didn't seem to work in the scenario.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Unit questions


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