API/Callbacks/plugins/Multi-Purpose Bars

Parameters in red are optional.

MPBExternal(event, id, func, anchorID, markers, icon)

Show a frame that is updated from an external function.

Parameters

  • id (string) A unique ID for the bar to interact with it later.
  • func (function) The function that returns the values, the function must return: current, max, name. Where name is the name showing up on the frame.
  • anchorID (string) The anchor that the frame should show up on, The default one will be selected if none passed or if not found.
  • markers (table) This table sets the markers on the bar, each marker in the table should be a number between 0-100 representing the percentage.
  • icon (string) Texture path to the icon to use, if none passed, no icon will be shown.

Usage

RW.Callbacks:Fire("MPBExternal", "SomeUpdater", function() return currentStacks, maxStacks, "Spell of Doom!" end, nil, nil, select(3, GetSpellInfo(35356)))


MPBExternalHide(event, id)

Hide a frame that is updated from external function.

Parameters

  • id (string) The unique ID set when showing the frame.

Usage

RW.Callbacks:Fire("MPBExternalHide", "SomeUpdater")


MPBHealthByID(event, id, anchorID, markers, icon)

Show a health frame that tracks CID, GUID or UID for its health status.

Parameters

  • id (numbe|string) The creature ID, global unique ID or Uint ID to track.
  • anchorID (string) The name of the anchor where the frame should show up. If said anchor does not exist the default one will be used.
  • markers (table) This table sets the markers on the bar, each marker in the table should be a number between 0-100 representing the percentage.
  • icon (string) Texture path to the icon to use, overrides 3D-model and unit texture.

Usage

RW.Callbacks:Fire("MPBHealthByID", "0xF130007F1E002489", nil, {75, 25})


MPBHealthHideByID(event, id)

Hide a health frame by ID.

Parameters

  • id (number|string) The CID, GUID or UID to the frame to hide.

Usage

RW.Callbacks:Fire("MPBHealthHideByID", "0xF130007F1E002489")


MPBPowerByID(event, id, anchorID, markers, icon)

Show a power farme that tracks CID, GUID or UID for its power status.

Parameters

  • id (numbe|string) The creature ID, global unique ID or Uint ID to track.
  • anchorID (string) The name of the anchor where the frame should show up. If said anchor does not exist the default one will be used.
  • markers (table) This table sets the markers on the bar, each marker in the table should be a number between 0-100 representing the percentage.
  • icon (string) Texture path to the icon to use, overrides 3D-model and unit texture.

Usage

RW.Callbacks:Fire("MPBPowerByID", "boss1", nil, {75, 25})


MPBPowerHideByID(event, id)

ide a power frame by ID.

Parameters

  • id (number|string) The CID, GUID or UID to the frame to hide.

Usage

RW.Callbacks:Fire("MPBPowerHideByID", "boss1")


MPBSpellStackAura(event, id, spell, maxStacks, anchorID, buffType, markers, icon)

Show a frame that tracks stacks by Aura.

Parameters

  • id (numbe|string) The creature ID, global unique ID or Uint ID to track.
  • spell (number) The spell to track stacks for.
  • maxStacks (number) The number of maximum stacks this spell can have, used for presentation.
  • anchorID (string) The anchor that the frame should show up on, The default one will be selected if none passed or if not found.
  • buffType (string) "HARMFULL" or "HELPFULL". "HARMFULL" is the default if non passed.
  • markers (table) This table sets the markers on the bar, each marker in the table should be a number between 0-100 representing the percentage.
  • icon (string) Texture path to the icon to use, if none passed the icon for the spell will be used.

Usage

RW.Callbacks:Fire("MPBSpellStackAura", "boss1", 22455, 10, nil, "HARMFULL")


MPBSpellStackCombat(event, id, spells, maxStacks, anchorID, markers, icon)

Show frame that tracks stacks by monitoring the combat log.

Parameters

  • id (numbe|string) The creature ID, global unique ID or Uint ID to track.
  • spells (number|table) The spell(s) to track stacks for. Pass several if its can be different spell IDs for the same spell (heroic and normal mode spells).
  • anchorID (string) The anchor that the frame should show up on, The default one will be selected if none passed or if not found.
  • markers (table) This table sets the markers on the bar, each marker in the table should be a number between 0-100 representing the percentage.
  • icon (string) Texture path to the icon to use, if none passed the icon for the spell will be used.

Usage

RW.Callbacks:Fire("MPBSpellStackCombat", "boss1", {24255, 24256}, 10, nil, {20, 80})


MPBSpellStackHide(event, id)

Hide a frame that is tracking spell stacks by aura or combat log.

Parameters

  • id (number|string) The CID, GUID or UID to the frame to hide.

Usage

RW.Callbacks:Fire("MPBSpellStackHide", "boss1")