ESODecoded

GetItemTrait

ESO Lua API function — used by 46 of the 3,030 addons we indexed (combined 26,249,434 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.

Official signature

GetItemTrait([Bag|#Bag] bagId, integer slotIndex)

Returns: trait

Real usage — from Dolgubon's Lazy Writ Crafter

	return GetItemCreatorName(bag, slot)~= GetUnitName("player") or
		GetItemTrait(bag, slot) ~= ITEM_TRAIT_TYPE_NONE or GetItemLinkFunctionalQuality(link) ~= ITEM_FUNCTIONAL_QUALITY_NORMAL or
		GetItemRequiredChampionPoints(bag, slot) == 160 

Short excerpt from the shipping addon Dolgubon's Lazy Writ Crafterits ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.

Most-downloaded addons using it

AddonTotal downloads
Dolgubon's Lazy Writ Crafter9,498,314
LibLazyCrafting6,538,592
CraftStore5,176,147
LibFilters-3.02,063,617
Dustman1,178,205
Votan's Search Box443,433