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> 699includeSubroutines—True to include time spent in other functions calledby the given function; false to count only time spent in the function body(boolean)Returns:usage—Amount <strong>of</strong> CPU time used by the function (in milliseconds) sincethe UI was loaded or ResetCPUUsage() was last called (number)calls—Number <strong>of</strong> times the function was called (number)GetGMTicketRequests GM ticket status from the server.The UPDATE_TICKET event fires when data is ready.GetGameTimeReturns the current realm (server) time.hour, minute = GetGameTime()Returns:hour—Hour portion <strong>of</strong> the time (on a 24-hour clock) (number)minute—Minute portion <strong>of</strong> the time (number)GetGammaReturns the current display gamma setting.gamma = GetGamma()Gamma value determines the contrast between lighter <strong>and</strong> darker portions <strong>of</strong>the game display; <strong>for</strong> a detailed explanation, see the Wikipedia entry onGamma correction entry.Returns:gamma—Current gamma setting (number)GetGlyphLinkGets a hyperlink <strong>for</strong> the contents <strong>of</strong> a glyph socket.link = GetGlyphLink(socket, talentGroup)Glyph links are distinct from item <strong>and</strong> spell links: e.g.‘‘|cff66bbff|Hglyph:21:361|h[Glyph <strong>of</strong> Hunter’s Mark]|h|r‘‘.Arguments:socket—Which glyph socket to query (between 1 <strong>and</strong> NUM_GLYPH_SLOTS)(number, glyphIndex)talentGroup—Which set <strong>of</strong> glyphs to query, if the player has Dual Talent Specializationenabled (number)1—Primary Talents2—Secondary Talentsnil—Currently active talentsReturns:link—A hyperlink <strong>for</strong> the glyph socket’s contents, or ‘‘’’ if the socket is empty(string, hyperlink)

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

Saved successfully!

Ooh no, something went wrong!