Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GetInventoryItemLink

Last wiki revision 2023-02-12

Returns the item link for an equipped item. itemLink = GetInventoryItemLink(unit, invSlotId)

  • unit: : UnitId - The unit whose inventory is to be queried.
  • invSlotId: : InventorySlotId - The inventory slot to be queried.
  • itemLink: : ItemLink - The item link for the specified item.

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

Result

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

Source

https://warcraft.wiki.gg/wiki/API_GetInventoryItemLink · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.