ESODecoded

IsUnitAttackable

ESO Lua API function — used by 39 of the 3,030 addons we indexed (combined 1,019,732 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.

Official signature

IsUnitAttackable(string unitTag)

Returns: bool attackable

Real usage — from Combat Reticle

                    --- Must get target info to determine normal/hostile/friendly mode
                    if IsUnitAttackable( "reticleover" ) then
                        if g_use_combat_hostile then

Short excerpt from the shipping addon Combat Reticleits 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
Combat Reticle183,846
LibBossFight136,378
HowToSunspire122,568
Perfect Weave106,805
Slip's Sanity's Edge Assist81,446
Combat Cloud Updated39,850