12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 27 ■ API <strong>Reference</strong> 737showInBattleMap—True if the l<strong>and</strong>mark should be shown in the Battle Map(aka Zone Map) UI; false <strong>for</strong> l<strong>and</strong>marks which should only be shown on the<strong>World</strong> Map (boolean)GetMapOverlayInfoReturns in<strong>for</strong>mation about a world map overlay.textureName, textureWidth, textureHeight, <strong>of</strong>fsetX, <strong>of</strong>fsetY, imapPointX, mapPointY = GetMapOverlayInfo(index)Map overlays correspond to areas which are ‘‘discovered’’ when entered bythe player, ‘‘filling in’’ the blank areas <strong>of</strong> the world map.Arguments:index—Index <strong>of</strong> a map overlay (between 1 <strong>and</strong> GetNumMapOverlays())(number)Returns:textureName—Path to the overlay texture (string)textureWidth—Width <strong>of</strong> the texture (in pixels) (number)textureHeight—Height <strong>of</strong> the texture (in pixels) (number)<strong>of</strong>fsetX—Horizontal position <strong>of</strong> the overlay’s top left corner relativeto the zone map (0 = left edge, 1 = right edge) (number)<strong>of</strong>fsetY—Vertical position <strong>of</strong> the overlay’s top left corner relative to the zonemap (0 = top, 1 = bottom) (number)mapPointX—Unused (number)mapPointY—Unused (number)GetMapZonesReturns the map zones <strong>for</strong> a given continent.... = GetMapZones(continentIndex)Arguments:continentIndex—Index <strong>of</strong> a continent (in the list returned byGetMapContinents()) (number)Returns:...—A list <strong>of</strong> strings, each the localized name <strong>of</strong> a zone within the continent(list)Example:local continent = GetCurrentMapContinent()local zones = {GetMapZones(continent)}<strong>for</strong> idx,zone in ipairs(zones) doprint(“Zone #“..idx .. “: “ .. zone)endGetMasterLootC<strong>and</strong>idateReturns in<strong>for</strong>mation about a given loot c<strong>and</strong>idate.c<strong>and</strong>idate = GetMasterLootC<strong>and</strong>idate(index)Used in the default UI to build the popup menu used in master lootassignment. Only valid if the player is the master looter.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!