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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 27 ■ API <strong>Reference</strong> 651GetAddOnMemoryUsageReturns the amount <strong>of</strong> memory used by an addon.mem = GetAddOnMemoryUsage(“name“) or GetAddOnMemoryUsage(index)The value returned is from a cache only updated when callingUpdateAddOnMemoryUsage().Arguments:name—Name <strong>of</strong> an addon (name <strong>of</strong> the addon’s folder <strong>and</strong> TOC file, not the Titlefound in the TOC) (string)index—Index <strong>of</strong> an addon in the addon list (between 1 <strong>and</strong> GetNumAddOns())(number)Returns:mem—Memory usage <strong>of</strong> the addon (in kilobytes) (number)GetAddOnMetadataReturns the value <strong>of</strong> certain fields in an addon’s TOC file.data = GetAddOnMetadata(“name“, “header“) or iGetAddOnMetadata(index, “header“)Arguments:name—Name <strong>of</strong> an addon (name <strong>of</strong> the addon’s folder <strong>and</strong> TOC file, not the Titlefound in the TOC) (string)index—Index <strong>of</strong> an addon in the addon list (between 1 <strong>and</strong> GetNumAddOns())(number)header—Name <strong>of</strong> a header from the addon’s TOC file; only certainheaders can be queried: Author, Title, Notes, Version, <strong>and</strong>anyheaderwhosenamestartswith“X-“ (e.g. X-Website, X-Category) (string)Returns:data—Contents <strong>of</strong> the given TOC file header, or nil if the header does not existor cannot be queried (string)GetAreaSpiritHealerTimeReturns the time remaining until a nearby battleground spirit healer resurrectsall players in its area.timeleft = GetAreaSpiritHealerTime()Returns:timeleft—Seconds remaining be<strong>for</strong>e the next area resurrection (number)GetArenaCurrencyReturns the player’s amount <strong>of</strong> arena points.points = GetArenaCurrency()Returns:points—The player’s current amount <strong>of</strong> honor points (number)

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

Saved successfully!

Ooh no, something went wrong!