WoW API < GetInventoryItemLink

Get the itemLink for the specified item.

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

Arguments[edit | edit source]

("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 | edit source]

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

Example[edit | edit source]

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


Prints the subtype of the mainhand weapon - for example "Mace" or "Sword".
Community content is available under CC-BY-SA unless otherwise noted.