LibMapData-1.0
Note: LibMapData-1.0 is unmaintained, a suggested replacement library is HereBeDragons-1.0
Small library that provides mapfile data. it include width,height, upper left x,y and lower right x,y. This data includes multi-floor maps such as the new instances.
To get the mapfile names use GetMapInfo() on the current map. Filenames are constant across localizations.
Sample usage:
mapfiles = LibStub("LibMapData-1.0"); -- get the size of Coth defaulting to the first floor size local width,height = mapfiles:MapArea('CoTStratholme') -- get the size of the 8th floor of icc width,height = mapfiles:MapArea('IcecrownCitadel',8) -- get the size of the Arati mapfile. width,height = mapfiles:MapArea('Arathi')
The floors are optional and if a given floor is not found 0,0 will be returned. This lib came about as a result of several addons needing the data, and simply copying and pasting them in each copy occupies around 44k of memory.
LibMapData now supports Mapchanged callback event. Sample usage:
mapfiles = LibStub("LibMapData-1.0"); mapfiles:RegisterCallback("MapChanged",function(event,map,floor,w,h) print("Map is now "..map) end
-
View User Profile
-
Send Message
Posted Jul 12, 2010its there, the real map name is NetherStormArena
-
View User Profile
-
Send Message
Posted Jul 12, 2010ill add it in mysticalos
-
View User Profile
-
Send Message
Posted Jul 9, 2010missing eye of the storm
areaID
483
-
View User Profile
-
Send Message
Posted Jun 6, 2010unless someone find an error, gona tab as release.
-
View User Profile
-
Send Message
Posted Jun 2, 2010Ive added some distance and direction functions as well
-
View User Profile
-
Send Message
Posted Jun 1, 2010may add that olog, right now it does use any events so its 0 cpu just a little memory
-
View User Profile
-
Send Message
Posted Jun 1, 2010Having the coordinates in a library is very useful in itself already but what's often needed with them is to keep track of the current zone. It's mostly just listening to the zone changed events but there are a few peculiarities in it. Might be useful to have that built in the library as well.
-
View User Profile
-
Send Message
Posted May 31, 2010Nice. I've wondered why nobody did this before.
-
View User Profile
-
Send Message
Posted May 31, 2010Alpha lib ready for testing slaren Ive added area_id to all maps as well
MapAreaId(mapfile) it should match the in-game value.
-
View User Profile
-
Send Message
Posted May 31, 2010ill have a lib ready shortly
-
View User Profile
-
Send Message
Posted May 31, 2010Yay, finally a library for this. Can't wait for a release!