Module apl.Main

This is the APL (Rotation) module.

Functions

APL:OnInitialize () Called when the APL is initialized.
APL:OnTick () Called on every game tick.
APL:OnCombatTick () Called on every game tick when in combat.
APL:OnOutOfCombatTick () Called on every game tick when out of combat.
APL:GetMenu () Gets the menu object for the APL.
APL:AddMenuRow (...) Adds a new row to the APL menu with provided elements.
APL:AddMenuHeaderRow (text) Adds a header row to the APL menu.
APL:MenuCheckbox (name, value, tooltip) Creates and adds a checkbox to the APL menu.
APL:MenuSlider (name, value, min, max, precision, tooltip) Creates and adds a slider to the APL menu.
APL:MenuSliderHP (name, value, tooltip) Creates and adds an HP percentage slider to the APL menu.
APL:MenuDropdown (name, value, options, tooltip) Creates and adds a dropdown menu to the APL menu.
APL:AddToggle (name, toggled) Adds a toggle button to the APL.
APL:AddCommand (name, callback) Adds a command to the APL.
APL:AddActions (actions) Adds multiple actions to the APL.
APL:AddAction (action, key) Adds a single action to the APL.
APL:AddFocusActions () Adds predefined focus-related macros as actions to the APL.
APL:AddGenericActions () Adds predefined generic macros as actions to the APL (e.g., trinkets, weapons, stopcasting).
APL:AddInterrupts (interrupts) Adds multiple interrupt actions to the APL.
APL:AddInterrupt (action, config, key) Adds a single interrupt action to the APL.
APL:AddDispels (dispels) Adds multiple dispel actions to the APL.
APL:AddDispel (action, config, key) Adds a single dispel action to the APL.
APL:AddPurges (purges) Adds multiple purge actions to the APL.
APL:AddPurge (action, config, key) Adds a single purge action to the APL.
APL:AddDesnares (desnares) Adds multiple desnare actions to the APL.
APL:AddDesnare (action, config, key) Adds a single desnare action to the APL.
APL:AddMitigations (mitigations) Adds multiple mitigation actions to the APL.
APL:AddMitigation (action, key) Adds a single mitigation action to the APL.
APL:GetSpecSettings () Retrieves the specialization-specific settings for the current APL.
APL:GetActionSettings () Retrieves the action settings for the current APL.
APL:GetActionSetting (action) Retrieves the setting for a specific action.
APL:GetSettings () Retrieves all settings for the current APL.
APL:GetSetting (name) Retrieves a specific setting by name.


Functions

APL:OnInitialize ()
Called when the APL is initialized.

Returns:

    boolean True if initialization was successful, false otherwise.
APL:OnTick ()
Called on every game tick.

Returns:

    boolean True if any action was taken, false otherwise.
APL:OnCombatTick ()
Called on every game tick when in combat.

Returns:

    boolean True if any action was taken, false otherwise.
APL:OnOutOfCombatTick ()
Called on every game tick when out of combat.

Returns:

    boolean True if any action was taken, false otherwise.
APL:GetMenu ()
Gets the menu object for the APL.

Returns:

    table The menu object.
APL:AddMenuRow (...)
Adds a new row to the APL menu with provided elements. Elements are passed as variable arguments.

Parameters:

  • ... any Elements to add to the menu row.
APL:AddMenuHeaderRow (text)
Adds a header row to the APL menu.

Parameters:

  • text string The text for the header.
APL:MenuCheckbox (name, value, tooltip)
Creates and adds a checkbox to the APL menu.

Parameters:

  • name string The name of the checkbox setting.
  • value boolean The initial value of the checkbox.
  • tooltip string Optional tooltip for the checkbox.

Returns:

    table The created checkbox GUI element.
APL:MenuSlider (name, value, min, max, precision, tooltip)
Creates and adds a slider to the APL menu.

Parameters:

  • name string The name of the slider setting.
  • value number The initial value of the slider.
  • min number The minimum value of the slider.
  • max number The maximum value of the slider.
  • precision number The precision of the slider value.
  • tooltip string Optional tooltip for the slider.

Returns:

    table The created slider GUI element.
APL:MenuSliderHP (name, value, tooltip)
Creates and adds an HP percentage slider to the APL menu.

Parameters:

  • name string The name of the HP slider setting.
  • value number The initial value (percentage) of the slider.
  • tooltip string Optional tooltip for the slider.

Returns:

    table The created slider GUI element.
APL:MenuDropdown (name, value, options, tooltip)
Creates and adds a dropdown menu to the APL menu.

Parameters:

  • name string The name of the dropdown setting.
  • value string The initial selected value of the dropdown.
  • options table A table of options for the dropdown.
  • tooltip string Optional tooltip for the dropdown.

Returns:

    table The created dropdown GUI element.
APL:AddToggle (name, toggled)
Adds a toggle button to the APL.

Parameters:

  • name string The name of the toggle setting.
  • toggled boolean The initial toggled state.
APL:AddCommand (name, callback)
Adds a command to the APL.

Parameters:

  • name string The name of the command.
  • callback function The function to execute when the command is called.
APL:AddActions (actions)
Adds multiple actions to the APL.

Parameters:

  • actions table A table of actions to add, where keys are action IDs and values are action objects.
APL:AddAction (action, key)
Adds a single action to the APL.

Parameters:

  • action table The action object to add. Must have an `isAction` field.
  • key string Optional key for the action. If nil, `action.id` is used.
APL:AddFocusActions ()
Adds predefined focus-related macros as actions to the APL.
APL:AddGenericActions ()
Adds predefined generic macros as actions to the APL (e.g., trinkets, weapons, stopcasting).
APL:AddInterrupts (interrupts)
Adds multiple interrupt actions to the APL.

Parameters:

  • interrupts table A table of interrupt definitions. Each entry should have `Action` (the action object) and `Config` (a table with `Kick`, `CC`, `Boss`, `NeedTarget`, `Range` fields).
APL:AddInterrupt (action, config, key)
Adds a single interrupt action to the APL.

Parameters:

  • action table The action object for the interrupt. Must have an `isAction` field.
  • config table Configuration for the interrupt, including `Kick`, `CC`, `Boss`, `NeedTarget`, `Range`.
  • key string Optional key for the interrupt. If nil, `action.id` is used.
APL:AddDispels (dispels)
Adds multiple dispel actions to the APL.

Parameters:

  • dispels table A table of dispel definitions. Each entry should have `Action` (the action object) and `Config` (a table with `Types` and `Range` fields).
APL:AddDispel (action, config, key)
Adds a single dispel action to the APL.

Parameters:

  • action table The action object for the dispel. Must have an `isAction` field.
  • config table Configuration for the dispel, including `Types` and `Range`.
  • key string Optional key for the dispel. If nil, `action.id` is used.
APL:AddPurges (purges)
Adds multiple purge actions to the APL.

Parameters:

  • purges table A table of purge definitions. Each entry should have `Action` (the action object) and `Config` (a table with `Types` and `Range` fields).
APL:AddPurge (action, config, key)
Adds a single purge action to the APL.

Parameters:

  • action table The action object for the purge. Must have an `isAction` field.
  • config table Configuration for the purge, including `Types` and `Range`.
  • key string Optional key for the purge. If nil, `action.id` is used.
APL:AddDesnares (desnares)
Adds multiple desnare actions to the APL.

Parameters:

  • desnares table A table of desnare definitions. Each entry should have `Action` (the action object) and `Config` (a table with `NeedTarget` and `Range` fields).
APL:AddDesnare (action, config, key)
Adds a single desnare action to the APL.

Parameters:

  • action table The action object for the desnare. Must have an `isAction` field.
  • config table Configuration for the desnare, including `NeedTarget` and `Range`.
  • key string Optional key for the desnare. If nil, `action.id` is used.
APL:AddMitigations (mitigations)
Adds multiple mitigation actions to the APL.

Parameters:

  • mitigations table A table of mitigation definitions. Each entry should have `Action` (the action object).
APL:AddMitigation (action, key)
Adds a single mitigation action to the APL.

Parameters:

  • action table The action object for the mitigation. Must have an `isAction` field.
  • key string Optional key for the mitigation. If nil, `action.id` is used.
APL:GetSpecSettings ()
Retrieves the specialization-specific settings for the current APL.

Returns:

    table|nil A table containing the spec settings, or nil if not found.
APL:GetActionSettings ()
Retrieves the action settings for the current APL.

Returns:

    table|nil A table containing the action settings, or nil if not found.
APL:GetActionSetting (action)
Retrieves the setting for a specific action.

Parameters:

  • action table The action object.

Returns:

    any|nil The setting for the action, or nil if not found.
APL:GetSettings ()
Retrieves all settings for the current APL.

Returns:

    table|nil A table containing all settings, or nil if not found.
APL:GetSetting (name)
Retrieves a specific setting by name.

Parameters:

  • name string The name of the setting to retrieve.

Returns:

    any|nil The value of the setting, or nil if not found.
generated by LDoc 1.5.0 Last updated 2025-08-07 15:27:51