-
Notifications
You must be signed in to change notification settings - Fork 202
PluginPrototype
funkydude edited this page Sep 4, 2025
·
16 revisions
| Functions | |
|---|---|
| IsEnabled () | Module enabled check. |
| UnitName (unit[, trimServer]) | Get the full name of a unit. |
| UnitGUID (unit) | Get the Globally Unique Identifier of a unit. |
| IterateGroup ([noInstanceFilter]) | Iterate over your group. |
| GetRaidList () | Get raid group unit tokens. |
| GetPartyList () | Get party unit tokens. |
| PlaySoundFile (sound[, channel]) | Play a sound file. |
| SimpleTimer (func, delay) | Trigger a function after a specific delay |
| UpdateGUI () | Force the options panel to update. |
| GetColoredNameTable () | Get a table that colors player names based on class. |
| Sync (msg[, extra[, noResend]]) | Send an addon sync to other players. |
Module enabled check. A module is either enabled or disabled.
Returns:
- true or nil
Get the full name of a unit.
Parameters:
-
unit: [string] unit token or name -
trimServer: [bool] append * instead of the server name (optional)
Returns:
- unit name with the server appended if appropriate
Get the Globally Unique Identifier of a unit.
Parameters:
-
unit: [string] unit token or name
Returns:
- guid guid of the unit
Iterate over your group. Automatically uses "party" or "raid" tokens depending on your group type.
Parameters:
-
noInstanceFilter: [bool] If true then all group units are returned even if they are not in your instance (optional)
Returns:
- iterator
Get raid group unit tokens.
Returns:
- indexed table of raid unit tokens
Get party unit tokens.
Returns:
- indexed table of party unit tokens
Play a sound file.
Parameters:
-
sound: Either a FileID (number), or the path to a sound file (string) -
channel: [string] the channel the sound should play on, defaults to "Master" (optional)
Trigger a function after a specific delay
Parameters:
-
func: callback function to trigger after the delay -
delay: [number] how long to wait until triggering the function
Force the options panel to update.
Get a table that colors player names based on class.
Returns:
- list of names colored by class with server names trimmed
Send an addon sync to other players.
Parameters:
-
msg: the sync message/prefix -
extra: other optional value you want to send (optional) -
noResend: [bool] if true, no re-send will be attempted if the message fails to send (optional)
Usage:
self:Sync("pluginName", data)