Overview
Core WeakAuras functions provide the main API for managing auras, regions, and trigger systems.Aura Management
GetData
Retrieves the data table for a specific aura.The unique identifier of the aura
The aura data table containing all configuration
GetRegion
Retrieves the display region for a specific aura.The unique identifier of the aura
The region frame object
Add
Adds a new aura or updates an existing one.The aura data table with all configuration
If true, treats this as a simple property change (optimization)
Delete
Deletes an aura.The aura data table or aura ID string
Rename
Renames an aura to a new ID.The aura data table
The new unique identifier
Rename updates all internal references and parent-child relationships automatically.
InternalVersion
Returns the internal version number of WeakAuras.The internal version number
Display Functions
OpenOptions
Opens the WeakAuras options window.Optional message or aura ID to focus
Toggle
Toggles the pause state of WeakAuras.IsPaused
Checks if WeakAuras is currently paused.True if paused, false otherwise
IsOptionsOpen
Checks if the options window is currently open.True if options are open
Trigger State Management
GetTriggerStateForTrigger
Retrieves the trigger state for a specific trigger.The aura identifier
The trigger number (1-based index)
Table of trigger states keyed by clone ID
GetActiveConditions
Retrieves active conditions for an aura and clone.The aura identifier
The clone identifier
Table of active conditions
Utility Functions
prettyPrint
Prints a formatted message with the WeakAuras prefix.The message to print
split
Splits a string by commas and whitespace.The string to split
Array of string parts
UnitNameWithRealm
Gets the unit name with realm suffix.The unit identifier
The unit name
The realm name
Advanced Functions
ScanEvents
Manually triggers an event scan.The event name
Event arguments
LoadFunction
Loads and compiles a Lua function string.The Lua code string
The aura ID for error reporting
The compiled function
Range and Combat Functions
CheckRange
Checks if a unit is within a specific range.The unit ID (e.g., “target”, “player”)
The range to check in yards
The comparison operator:
<= or >=True if the unit meets the range condition
IsSpellInRange
Checks if a spell is in range of a unit.The spell ID or name
The unit ID
True if spell is in range
GetRange
Gets the estimated range to a unit.The unit ID
If true, only check visible units
Minimum range in yards
Maximum range in yards
State Functions
IsAuraActive
Checks if an aura is currently active (showing).The aura identifier
True if aura is active
IsAuraLoaded
Checks if an aura is loaded (meets load conditions).The aura identifier
True if aura is loaded
Registration Functions
RegisterSubRegionType
Registers a new sub-region type for custom extensions.The sub-region type name
The display name shown in UI
Function that determines if this sub-region is supported for a region type
Function to create the sub-region
Function to update the sub-region
Called when sub-region is acquired from pool
Called when sub-region is released to pool
Default configuration table
Property definitions for configuration