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.

API Documentation

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

Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    23845
  • Created
    May 30, 2010
  • Last Released File
    Oct 17, 2014
  • Total Downloads
    188,438
  • License

Categories

Members

Recent Files

WoW Retail