Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-18-08, 11:55 AM   #1
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
How to get the size in yards of a given map?

Since GetPlayerMapPosition() returns coordinates for instances with WotLK I'm current playing around with the coordinates and range checks.

My goal is to calculate the distance between the player and a specific unit in yards.

I realized that GetPlayerMapPosition() returns "the unit position relative to WorldMapDetailFrame". A number between 0 and 1.
So I used GetPlayerMapPosition() to get PlayerX, PlayerY and TargetX, TargetY.

So far so good. But how do I get the range in yards from this data? I've found the Astrolabe and LibTourist libs. Both calculate distances in yards based on GetPlayerMapPosition and additional tables with the size in yards of all zones.
eg. from Astrolabe:
Code:
Ashenvale = {
	height = 3843.722811451077,
	width = 5766.728884700476,
	...
	}
So this is exactly what I need. But where the hell do I get these data from?
I've searched around for hours, did tests with map viewers, mpq data, looked at WorldMapFrame.lua, etc., etc. But I can't find any way to get, query or calculate the map size of a given map in yards.

I would really appreciate any help/idea on this topic.
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » How to get the size in yards of a given map?

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