Get an Epic Experience with Premium

LibMapData-1.0

Libraries Login to Add Favorites
  • 0 Likes
  • World of Warcraft
  • 2,417 Monthly Downloads
  • Supports: 5.2.0
  • 126,060 Total Downloads
  • Updated 03/05/2013
  • Created 05/30/2010
  • 62 Favorites
  • Project Site
  • Comments
  • Release Type: Release
  • License: All Rights Reserved
  • Newest File: 0.28-release
or

About LibMapData-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

------------------------------------------------------------------------
r128 | kagaro | 2013-03-05 15:45:56 +0000 (Tue, 05 Mar 2013) | 1 line
Changed paths:
   A /tags/0.28-release (from /trunk:127)

Tagging as 0.28-release
------------------------------------------------------------------------
r127 | kagaro | 2013-03-05 15:44:47 +0000 (Tue, 05 Mar 2013) | 1 line
Changed paths:
   M /trunk/LibMapData-1.0.toc
   M /trunk/library.lua

5.2 update
------------------------------------------------------------------------

Comments

First Previous Page 1 of 3 Next Last
Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster addon downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

Infinite Crisis NA

Get Your Preferred Access Code!