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> 685gem2—Item ID <strong>of</strong> the second gem socketed in the item (itemID)gem3—Item ID <strong>of</strong> the third gem socketed in the item (itemID)GetContainerItemIDReturns the item ID <strong>of</strong> an item in the player’s bags.id = GetContainerItemID(container, slot)Arguments:container—Index <strong>of</strong> one <strong>of</strong> the player’s bags or other containers (number,containerID)slot—Index <strong>of</strong> an item slot within the container (number, containerSlotID)Returns:id—Numeric ID <strong>of</strong> the item in the given slot (itemID)GetContainerItemInfoReturns in<strong>for</strong>mation about an item in the player’s bags.texture, count, locked, quality, readable, lootable, link = iGetContainerItemInfo(container, slot)Arguments:container—Index <strong>of</strong> one <strong>of</strong> the player’s bags or other containers (number,containerID)slot—Index <strong>of</strong> an item slot within the container (number, containerSlotID)Returns:texture—Path to the icon texture <strong>for</strong> the item (string)count—Number <strong>of</strong> items in the slot (number)locked—1 if the item is locked; otherwise nil. Items become locked whilebeing moved, split, or placed into other UI elements (such as the mail, trade, <strong>and</strong>auction windows). (1nil)quality—Quality (or rarity) <strong>of</strong> the item (number, itemQuality)readable—1 if the item is readable; otherwise nil. Thisvalueisused by the default UI to show a special cursor over items such asbooks <strong>and</strong> scrolls which can be read by right-clicking. (1nil)lootable—1 if the item is a temporary container containing items thatcan be looted; otherwise nil. Examples include the Bag <strong>of</strong> Fishing Treasures<strong>and</strong> Small Spice Bag rewarded by daily quests, lockboxes (onceunlocked), <strong>and</strong> the trunks occasionally found while fishing. (1nil)link—A hyperlink <strong>for</strong> the item (itemLink)GetContainerItemLinkReturns a hyperlink <strong>for</strong> an item in the player’s bags.link = GetContainerItemLink(container, slot)Arguments:container—Index <strong>of</strong> one <strong>of</strong> the player’s bags or other containers (number,containerID)slot—Index <strong>of</strong> an item slot within the container (number, containerSlotID)

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

Saved successfully!

Ooh no, something went wrong!