View Single Post
11-21-14, 05:24 PM   #4
Digital_Utopia
A Flamescale Wyrmkin
 
Digital_Utopia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2012
Posts: 110
Originally Posted by myrroddin View Post
Ah, let me clarify then. Since my intent is writing a library that adds icons or pins to maps, one cannot make the assumption that you log into the game at your Garrison. Once there, I can probably get the mapID, but what if you log into the game in Stormwind? The library should still be able to put a pin on the Garrison even though you aren't there to get the mapID.

So my question really is: how do I get the mapID for instances if aren't there currently? Another example might be putting the mailbox icons into Gnomereggan (sp).
Well, putting things on the worldmap would be simple enough. Since you can listened to map changed events, you can use that to update the currently visible/active map. Minimap on the other hand would likely tie into the zone changed event, and querying for mapID/floor. However, I can't say I've ever had experience with manually placing a pin on the minimap.

Now, the tricky part - and this is where Astrolabe was the most useful for - was tracking the direction and distance to a pin in another zone/floor. As far as I know - the only Blizzard API that does something similar, is their getsupertrackedquest method; but for everything else - there's not much tying one zone to another. After all, the "coordinates" everybody uses are nothing more than a percentage of the local map. So there's no real good way to determine distance to another zone, as they're not required to be at the same scale. For instance, while on one map - it might take 20 yards to go a tenth of a coordinate, while on another, it might take a single yard.

Now, I haven't explored Astrolabe completely - and admittedly, I'm more than a bit rusty with my API knowledge; but I will say this - I was able to create complete continent maps, made out of the local maps, via the Astrolabe API data. Including scale and position.

For all I know - the sizes and offsets could be hard-coded into the API. But regardless, that's likely where all that extra complexity comes from.
__________________
  Reply With Quote