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> 937Returns:success—1 if the player has enough money to send the message; otherwise nil(1nil)Example:-- Quickly send money to a specified character (only works while at an-- open mailbox)function SendCharacterMoney(name, amount)SetSendMailMoney(amount)SendMail(name, number/10000 .. “ gold attached“, ““)endSetSendMailShowingEnables or disables shortcuts <strong>for</strong> attaching items to outgoing mail.SetSendMailShowing(enable)When shortcuts are enabled, UseContainerItem() (i.e. right-click in thedefault UI’s container frames) attaches the item to the outgoing messageinstead <strong>of</strong> using it.Arguments:enable—True to enable shortcuts; false to disable (boolean)SetTaxiBenchmarkModeEnables or disables flight path benchmark mode.SetTaxiBenchmarkMode(“arg“)When benchmark mode is enabled, the next taxi flight the player takes willbehave differently: camera movement is disabled <strong>and</strong> players/creatures/objects below the flight path will not be shown (allowing <strong>for</strong> consistent testconditions). After the flight, framerate statistics will be printed in the chatwindow <strong>and</strong> benchmark mode will be automatically disabled.Arguments:arg—nil, “on“, or1 to enable benchmark mode; “<strong>of</strong>f“ or 0 to disable (string)SetTaxiMapSets a Texture object to show the appropriate flight map texture.SetTaxiMap(texture)Only has effect while interacting with a flight master (i.e. between theTAXIMAP_OPENED <strong>and</strong> TAXIMAP_CLOSED events).Arguments:texture—A Texture object (table)Example:-- Create a frame, <strong>and</strong> set it to the taxi mapTestFrame = CreateFrame(“Frame“, “TestFrame“, UIParent)TestFrame:SetHeight(200)TestFrame:SetWidth(200)TestFrame:SetPoint(“CENTER“, UIParent, “CENTER“, 0, 0)TestFrameTexture = TestFrame:CreateTexture(“TestFrameTexture“, i

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

Saved successfully!

Ooh no, something went wrong!