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> 733quantity—Number <strong>of</strong> stacked items, or 0 <strong>for</strong> money (number)quality—Quality (rarity) <strong>of</strong> the item (number, itemQuality)locked—1 if the item is locked (preventing the player from looting it); otherwisenil (1nil)GetLootSlotLinkReturns a hyperlink <strong>for</strong> an item available as loot.link = GetLootSlotLink(slot)Returns nil if the loot slot is empty or contains money.Arguments:slot—Index <strong>of</strong> a loot slot (between 1 <strong>and</strong> GetNumLootItems())(number)Returns:link—A hyperlink <strong>for</strong> the item (string)GetLootThresholdReturns the threshold used <strong>for</strong> Master Looter, Group Loot, <strong>and</strong> Need Be<strong>for</strong>eGreed loot methods.threshold = GetLootThreshold()Items above the threshold quality will trigger the special behavior <strong>of</strong> thecurrent loot method: <strong>for</strong> Group Loot <strong>and</strong> Need Be<strong>for</strong>e Greed, rolling willautomatically begin once a group member loots the corpse or object holdingthe item; <strong>for</strong> Master Loot, the item will be invisible to all but the loot mastertasked with assigning the loot.Returns:threshold—Minimum item quality to trigger the loot method (number,itemQuality)GetMacroBodyReturns the body text <strong>of</strong> a macro.body = GetMacroBody(index) or GetMacroBody(“name“)Arguments:index—Index <strong>of</strong> a macro (number, macroID)name—Name <strong>of</strong> a macro (string)Returns:body—Body text / comm<strong>and</strong>s <strong>of</strong> the macro (string)GetMacroIconInfoReturns the texture <strong>for</strong> a macro icon option.texture = GetMacroIconInfo(index)Arguments:index—Index <strong>of</strong> a macro icon option (between 1 <strong>and</strong> GetNumMacroIcons())(number)Returns:texture—Path to the icon texture (string)

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

Saved successfully!

Ooh no, something went wrong!