Unit Selection Type
Core Helper
Returns ElvUI’s normalized unit selection type, with optional hostile-threat handling.
NamespaceEModuleCoreLifecyclestable
E:UnitSelectionType(unit, considerHostile)Returns ElvUI’s normalized unit selection type, with optional hostile-threat handling.
Parameters
Section titled “Parameters”unit: Unit token to inspect. considerHostile: Treat units with player threat as hostile.
Returns
Section titled “Returns”Numeric selection type, or nil when the client cannot resolve one.
Example
Section titled “Example”local selectionType = E:UnitSelectionType("target", true)Useful when addon coloring should match ElvUI nameplate or unit selection behavior.
Source: ElvUI/Game/Shared/General/API.lua:212