ESODecoded

GetItemWeaponType

ESO Lua API function — used by 61 of the 3,030 addons we indexed (combined 23,052,655 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.

Official signature

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

Returns: weaponType

Real usage — from Dolgubon's Lazy Writ Crafter


		local harmType = GetItemWeaponType(bag, slot)
		local stabbyStabStabs = {[WEAPONTYPE_SWORD]=true, [WEAPONTYPE_TWO_HANDED_SWORD]=true, [WEAPONTYPE_DAGGER]=true}

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
LibCombat5,017,654
Code's Combat Alerts4,445,158
Auto Category - Revised1,180,586
Dressing Room for Stonethorn527,263
Wizard's Wardrobe481,038