Thread Tools Display Modes
04-27-09, 09:56 PM   #1
MysticalNyte
A Murloc Raider
Join Date: Jan 2009
Posts: 4
Target distance range

Hey Scott and everyone,

I would like to see an actual target distance range where boss or target is xx yards away insted of the 10-30, 0-30 whatever it is, built into the HUD if possible. I know DBM has something similar in it, but I haven't personally seen it cause I don't use DBM.
 
04-28-09, 12:03 AM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,899
Hmm not sure how DBM are doing it but a quick look at wowwiki's list there is only 1 command to test the distance and it only results in values relating to less than 10 , less than 15, or less than 30. As you can see from the below this is probably where most of the range meters take their values from.

canInteract = CheckInteractDistance(unit)


unit
The unit to query (e.g. "target", "party1", "pet", "player")
distIndex
A value 1-4:
1 = Inspect, 28 yards
2 = Trade, 11.11 yards
3 = Duel, 9.9 yards
4 = Follow, 28 yards
 
04-28-09, 12:07 AM   #3
spiritwulf
A Cobalt Mageweaver
 
spiritwulf's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2006
Posts: 202
I believe the more distance specific addons are scanning the char spellbook and using the range definitions for the abilities found there to help determine range as well. This only adds a small amount of corection however.
__________________
Traveling through the night on padded feet
the ghost in the dark
to rend and kill
not for pleasure
but for survival
 
04-28-09, 09:07 AM   #4
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Originally Posted by MysticalNyte View Post
Hey Scott and everyone,

I would like to see an actual target distance range where boss or target is xx yards away insted of the 10-30, 0-30 whatever it is, built into the HUD if possible. I know DBM has something similar in it, but I haven't personally seen it cause I don't use DBM.
This is not possible... Blizzard purposely does not allow mods to know how far a mob is, exactly, from the player and that will never change. As Xrystal points out, the CheckInteractDistance() method can be used to determine if the mob is inside a certain radius and that's all... so you can build a range with that such as 0 - 9.9, 9.9 to 11, 11 - 28 or 28 - 100.

Spiritwulf is also correct and that is in fact what nUI does. Actually, nUI uses both methods. I parse the list of spells in your spellbook when nUI loads and I build a table of spells and their ranges. When you have a mob targeted, I parse that list and create a minimum and a maximum distance based on which spells are usable on the target. When that's done, I double check the result against the interact data and refine if needed.

I know of no other way to do this.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
04-28-09, 06:52 PM   #5
wreck
A Flamescale Wyrmkin
 
wreck's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2009
Posts: 114
Yep, this is another anti-exploit situation. I remember back in WoW Beta it was possible to get the exact range to a target. Unfortunately people were using that to stay just outside of their opponents range while using their max range weapon/spell.

Someone actually put together a mod that looked at your target, then based on their class/level decided what their maximum range was. Then you got a colored indicator - Red you are in range, green you are out of their range and safe.

Think of the possibilities in PvP
 
 

WoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Support » nUI: Suggestion Box » Target distance range

Thread Tools
Display Modes

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