Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:World of Warcraft API
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Item === These functions operate on item links or item information directly. See also the [[#Container / Bag]] and [[#Inventory]] sections. :{{id|API|EquipItemByName}}(itemId or "itemName" or "[[itemLink]]"[, [[inventorySlotId|slot]]]) - Equips an item, optionally into a specified slot. :{{id|API|GetAuctionItemLink}}("type", index) - Returns an [[itemLink]] for the specified auction item. :{{id|API|GetContainerItemLink}}([[bagId|bagID]], slot) - Returns the [[itemLink]] of the item located in bag#, slot#. :{{id|API|GetItemCooldown}}(itemID) - Returns startTime, duration, enable. :{{id|API|GetItemCount}}(itemId or "itemName" or "[[itemLink]]"[, includeBank][, includeCharges]) - Returns number of such items in inventory[, or charges instead if it has charges] :{{id|API|GetItemFamily}}(itemId or "itemName" or "[[itemLink]]") - Returns the bag type that an item can go into, or for bags the type of items that it can contain. (added 2.4) :{{id|API|GetItemIcon}}(itemId or "[[itemString]]" or "itemName" or "[[itemLink]]") - Returns the icon for the item. Works for any valid item even if it's not in the cache. (added 2.4) :{{id|API|GetItemInfo}}(itemId or "[[itemString]]" or "itemName" or "[[itemLink]]") - Returns information about an item. :{{id|API|GetItemQualityColor}}(quality) - Returns the RGB color codes for a quality. :{{id|API|GetItemSpell}}(item) - Returns name, rank. :{{id|API|GetItemStats}}(itemLink, statTable) - Returns a table of stats for an item. :{{id|API|GetMerchantItemLink}}(index) - Returns an [[itemLink]] for the given purchasable item :{{id|API|GetQuestItemLink}}("type", index) - Returns an [[itemLink]] for a quest reward item. :{{id|API|GetQuestLogItemLink}}("type", index) - Returns an [[itemLink]] for a quest reward item. :{{id|API|GetTradePlayerItemLink}}(id) - Returns an [[itemLink]] for the given item in your side of the trade window (if open) :{{id|API|GetTradeSkillItemLink}}(index) - Returns the [[itemLink]] for a trade skill item. :{{id|API|GetTradeSkillReagentItemLink}}(index, reagentId) - Returns the [[itemLink]] for one of the reagents needed to craft the given item :{{id|API|GetTradeTargetItemLink}}(id) - Returns an [[itemLink]] for the given item in the other player's side of the trade window (if open) :{{id|API|IsUsableItem}}(item) - Returns usable, noMana. :{{id|API|IsConsumableItem}}(item) :{{id|API|IsCurrentItem}}(item) :{{id|API|IsEquippedItem}}(item) :{{id|API|IsEquippableItem}}(itemId or "itemName" or "[[itemLink]]") - Returns 1 or nil. :{{id|API|IsEquippedItemType}}("type") - Where "type" is any valid inventory type, item class, or item subclass. :{{id|API|IsItemInRange}}("itemName" or "[[itemLink]]", "[[unitId|unit]]") - Nil for invalid target, 0 for out of range, 1 for in range. :{{id|API|ItemHasRange}}(item) :{{id|API|OffhandHasWeapon}}() - Determine if your offhand carries a weapon. :{{id|API|SplitContainerItem}}(bagID,slot,amount) - Picks up part of a stack. :UI {{id|API|SetItemRef}}(link, text, button) - Handles item link tooltips in chat.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)