API GetInventoryItemLink

104,672pages on
this wiki
Add New Page
Talk0 Share
WoW API < GetInventoryItemLink

Get the itemLink for the specified item.

"itemLink" = GetInventoryItemLink("unit", slotId)

Arguments Edit

("unit", slotId)
UnitId - A string representing the unit whose inventory is to be queried.
InventorySlotId - The inventory slot to be queried, obtained via GetInventorySlotInfo().

Returns Edit

itemLink- The item link for the specified item or
nil, if the slot is empty.

Example Edit

local mainHandLink = GetInventoryItemLink("player",GetInventorySlotInfo("MainHandSlot"))
local _, _, _, _, _, _, itemType = GetItemInfo(mainHandLink)


Prints the subtype of the mainhand weapon - for example "Mace" or "Sword".

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki