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 Crafter — its ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.
Most-downloaded addons using it
| Addon | Total downloads |
|---|---|
| Dolgubon's Lazy Writ Crafter | 9,498,314 |
| LibCombat | 5,017,654 |
| Code's Combat Alerts | 4,445,158 |
| Auto Category - Revised | 1,180,586 |
| Dressing Room for Stonethorn | 527,263 |
| Wizard's Wardrobe | 481,038 |