Get Unit Spec Info
Core Helper
Scans a player tooltip and returns ElvUI’s cached specialization metadata for that unit.
NamespaceEModuleCoreLifecyclestable
E:GetUnitSpecInfo(unit)Scans a player tooltip and returns ElvUI’s cached specialization metadata for that unit.
Parameters
Section titled “Parameters”unit: Player unit token to inspect.
Returns
Section titled “Returns”Spec info table with id, index, classFile, localized names, icon, and role when available.
Example
Section titled “Example”local specInfo = E:GetUnitSpecInfo("target")Useful for addons that need spec/class information without duplicating ElvUI tooltip parsing.
Source: ElvUI/Game/Shared/General/API.lua:353