Registers the frame for a specific event, triggering the OnEvent handler when the event occurs for the specified units.
Frame:RegisterUnitEvent(event, unit1 [, unit2])
The API function is available for any widget capable of having an OnEvent handler.
- string - name of the event, e.g. "UNIT_POWER".
- string : UnitId - unit to deliver the event for.
- string? : UnitId - second unit to deliver the event for.
- A frame can only ever watch for events for two units using this mechanism. Repeated calls will overwrite old registrations.
- You must unregister the event in order to switch to or from an Frame:RegisterEvent registration for the same event. Otherwise, the RegisterEvent call is silently ignored, and the filters remain in effect.
Patch 5.0.4 (2012-08-28): Added.