Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Basic globals:
- Development.Documentation
- Provide documentation on items in the addon environment. Called with no parameters, it returns a table listing all documentation. Can provide both human-readable and computer-readable documentation.
- documentables = Development.Documentation() -- table <- void
- documentation = Development.Documentation(item) -- string <- variant
- documentation = Development.Documentation(item, parseable = false) -- string <- variant, boolean
- documentationTable = Development.Documentation(item, parseable = true) -- table <- variant, boolean
- Parameters:
- parseable: Whether to return in a computer-readable format, as opposed to the normal human-readable format.
- item: The item to get documentation on. May be either the item itself or a string identifier.
- Results:
- documentables: List of all items that documentation can be retrieved for. In {["itemname"] = true} format.
- documentationTable: Computer-readable documentation for the requested item. Format may change without warning.
- documentation: Documentation for the requested item.
- UI.CreateContext
- Creates a new UI context. A UI context must be created in order to create any frames.
- context = UI.CreateContext(name) -- Context <- string
- Parameters:
- name: A descriptive name for this element. Used for error reports and performance information. May be shown to end-users.
- Results:
- context: A new context. Contexts are guaranteed to have at least the capabilities of a Frame.
- UI.CreateFrame
- Creates a new frame. Frames are the blocks that all addon UIs are made out of. Since all frames must have a parent, you'll need to create a Context before any frames. See UI.CreateContext.
- frame = UI.CreateFrame(type, name, parent) -- Frame <- string, string, Frame
- Parameters:
- type: The type of your new frame. Current supported types: Frame, Text, Texture.
- name: A descriptive name for this element. Used for error reports and performance information. May be shown to end-users.
- parent: The new parent for this frame.
- Results:
- frame: Your new frame.
- Utility.Serialize.Inline
- Serializes a single parameter. Results in a string suitable for use as a parameter in Lua code. If the input is a table, it must not contain table cycles or non-tree structures.
- serialized = Utility.Serialize.Inline(element) -- string <- variant
- Parameters:
- element: Element to serialize.
- Results:
- serialized: String containing serialized output. May be nil if there was an error with the input.
- _VERSION
- assert
- bit.arshift
- bit.band
- bit.bnot
- bit.bor
- bit.bswap
- bit.bxor
- bit.lshift
- bit.rol
- bit.ror
- bit.rshift
- bit.tobit
- bit.tohex
- collectgarbage
- coroutine.create
- coroutine.resume
- coroutine.running
- coroutine.status
- coroutine.wrap
- coroutine.yield
- debug.traceback
- dump
- Debug utility function. Similar to print(), but serializes any table parameters before outputting.
- dump(...) -- ...
- Parameters:
- ...: Takes any number of any parameter type.
- error
- gcinfo
- getfenv
- getmetatable
- ipairs
- load
- loadstring
- math.abs
- math.acos
- math.asin
- math.atan
- math.atan2
- math.ceil
- math.cos
- math.cosh
- math.deg
- math.exp
- math.floor
- math.fmod
- math.frexp
- math.huge
- math.ldexp
- math.log
- math.log10
- math.max
- math.min
- math.mod
- math.modf
- math.pi
- math.pow
- math.rad
- math.random
- math.randomseed
- math.sin
- math.sinh
- math.sqrt
- math.tan
- math.tanh
- newproxy
- next
- pairs
- pcall
- print
- print_console
- rawequal
- rawget
- rawset
- select
- setfenv
- setmetatable
- string.byte
- string.char
- string.find
- string.format
- string.gfind
- string.gmatch
- string.gsub
- string.len
- string.lower
- string.match
- string.rep
- string.reverse
- string.sub
- string.upper
- table.concat
- table.foreach
- table.foreachi
- table.getn
- table.insert
- table.maxn
- table.remove
- table.sort
- tonumber
- tostring
- type
- unpack
- xpcall
- Inspectors:
- Inspect.Ability.Detail
- Provides detailed information about abilities.
- detail = Inspect.Ability.Detail(ability) -- table <- ability
- details = Inspect.Ability.Detail(abilities) -- table <- table
- Parameters:
- ability: The identifier of the ability to retrieve detail for.
- abilities: A lookup table of identifiers of abilities to retrieve detail for.
- Results:
- detail: Detail table for a single ability. May include members: name, icon, castingTime, channeled, continuous, autoattack, stealthRequired, rangeMin, rangeMax, cooldown, currentCooldown, currentCooldownExpired, currentCooldownRemaining, racial, passive, positioned, target, outOfRange, unusable, costPlanarCharge, costPower, costMana, costEnergy, costCharge, gainCharge, weapon.
- details: Detail tables for all requested abilities. The key is the ability ID, the value is the ability's detail table.
- Inspect.Ability.List
- List available abilities.
- abilities = Inspect.Ability.List() -- table <- void
- Results:
- abilities: A lookup table of IDs of the available abilities.
- Inspect.Addon.Cpu
- Returns recent CPU usage information. This is calculated using an exponential-falloff method.
- data = Inspect.Addon.Cpu() -- table <- void
- Results:
- data: Recent CPU usage. This takes the format { AddonIdentifier = { SubIdentifier = cpu_used_as_a_fraction_of_one } }. SubIdentifiers are generated by Rift and the format may change without notice.
- Inspect.Addon.Current
- Returns the current addon. This information is used internally for counting CPU usage and determining frame ownership.
- addonIdentifier = Inspect.Addon.Current() -- string <- void
- Results:
- addonIdentifier: The addon's identifier, as written in its TOC file.
- Inspect.Buff.Detail
- Provides detailed information about the buffs on a unit.
- detail = Inspect.Buff.Detail(unit, buff) -- table <- unit, buff
- details = Inspect.Buff.Detail(unit, buffs) -- table <- unit, table
- Parameters:
- buff: An identifier for the buff to retrieve detail for.
- buffs: A lookup table containing buff identifiers to retrieve details for.
- unit: The unit to inspect.
- Results:
- detail: Detail table for a single buff. May include members: name, buff, debuff, noncancelable, duration, remaining, expired, stack, caster, icon, poison, curse, disease.
- details: Detail tables for all requested buffs. The key is the buff ID, the value is the buff's detail table.
- Inspect.Buff.List
- List buffs on a unit.
- buffs = Inspect.Buff.List(unit) -- table <- unit
- Parameters:
- unit: The unit to inspect.
- Results:
- buffs: A lookup table of the IDs of the buffs on the unit.
- Inspect.System.Time
- A high-resolution timer.
- time = Inspect.System.Time() -- number <- void
- Results:
- time: Time in seconds. Counted from an arbitrary point in the past. Guaranteed to be non-negative.
- Inspect.Unit.Detail
- Provides detailed information about a unit.
- detail = Inspect.Unit.Detail(unit) -- table <- unit
- details = Inspect.Unit.Detail(units) -- table <- table
- Parameters:
- unit: A unit, in either unit ID or unit specifier format.
- units: A lookup table containing units to inspect.
- Results:
- detail: Detail table for a single buff. May include members: name, nameSecondary, guild, titlePrefix, titleSuffix, player, relation, level, unavailable, offline, afk, ready, health, healthMax, calling, mana, manaMax, charge, chargeMax, energy, energyMax, combo, comboUnit, comboMax, power, powerMax, loot, pvp, guaranteedLoot, mark, vitality, planar.
- details: Detail tables for all requested units. The key is the unit ID or unit specifier, the value is the unit's detail table.
- Inspect.Unit.List
- Lists all the units that the client can see.
- list = Inspect.Unit.List() -- table <- void
- Results:
- list: Map of unit ID to unit specifier. Units with multiple valid specs will have one chosen at random.
- Inspect.Unit.Lookup
- Converts unit IDs to unit specifiers and vice-versa.
- unit = Inspect.Unit.Lookup(unit) -- unit <- unit
- units = Inspect.Unit.Lookup(units) -- table <- table
- Parameters:
- unit: A single unit ID or unit specifier.
- units: A lookup table containing unit IDs and unit specifiers.
- Results:
- unit: A unit ID or unit specifier, whichever is the opposite of the parameter given. May be nil.
- units: A lookup table of unit IDs and unit specifiers. The key is the input, the value is the result. Invalid inputs will not result in output entries.
- Commands:
- Command.Buff.Cancel
- Cancels a buff on the player. Not all buffs are cancelable.
- Command.Buff.Cancel(buff) -- buff
- Parameters:
- buff: The ID of the buff to cancel.
- Command.Slash.Register
- Registers a new chat slash command, inserts a new event table into the Event.Slash hierarchy, and returns that table. If called multiple times with the same slash command, will return the same table each time.
- eventTable = Command.Slash.Register(slashCommand) -- table <- string
- Parameters:
- slashCommand: The name of the slash command to register.
- Results:
- eventTable: The event table for your slash command. nil if the slash command could not be registered (usually because it conflicts with a built-in slash command.)
- Events:
- Event.Ability.Add
- Signals the addition of a player ability.
- Ability.Add(abilities)
- Parameters:
- abilities: Lists the abilities that were added. Lookup table from ability ID to "true".
- Event.Ability.Cooldown.Begin
- Signals the start of an ability's cooldown.
- Ability.Cooldown.Begin(cooldowns)
- Parameters:
- cooldowns: The abilities whose cooldown has been changed. The key is the ability ID, the value is the new cooldown. 0 indicates that the cooldown has finished.
- Event.Ability.Cooldown.End
- Signals the end of an ability's cooldown. All the values in the "cooldown" parameter will be 0.
- Ability.Cooldown.End(cooldowns)
- Parameters:
- cooldowns: The abilities whose cooldown has been changed. The key is the ability ID, the value is the new cooldown. 0 indicates that the cooldown has finished.
- Event.Ability.Range.False
- Signals a player ability exiting range from its current target.
- Ability.Range.False(abilities)
- Parameters:
- abilities: The abilities that have entered or exited range. The key is the ability ID, the value is whether they are currently in range.
- Event.Ability.Range.True
- Signals a player ability entering range from its current target.
- Ability.Range.True(abilities)
- Parameters:
- abilities: The abilities that have entered or exited range. The key is the ability ID, the value is whether they are currently in range.
- Event.Ability.Remove
- Signals the removal of a player ability.
- Ability.Remove(abilities)
- Parameters:
- abilities: Lists the abilities that were removed. Lookup table from ability ID to "false".
- Event.Ability.Target
- Signals a player ability changing its current target.
- Ability.Target(abilities)
- Parameters:
- abilities: The abilities whose target has changed. The key is the ability ID, the value is the new target.
- Event.Ability.Usable.False
- Signals a player ability becoming unusable.
- Ability.Usable.False(abilities)
- Parameters:
- abilities: The abilities whose usability has changed. The key is the ability ID, the value is the new usability.
- Event.Ability.Usable.True
- Signals a player ability becoming usable.
- Ability.Usable.True(abilities)
- Parameters:
- abilities: The abilities whose usability has changed. The key is the ability ID, the value is the new usability.
- Event.Addon.Load.Begin
- Signals the beginning of an addon's loading sequence.
- Addon.Load.Begin(addonidentifier)
- Parameters:
- addonidentifier: The addon's identifier.
- Event.Addon.Load.End
- Signals the end of an addon's loading sequence. At this point, that addon is fully loaded and initialized.
- Addon.Load.End(addonidentifier)
- Parameters:
- addonidentifier: The addon's identifier.
- Event.Addon.SavedVariables.Load.Begin
- Signals the beginning of an addon's saved variable loading.
- Addon.SavedVariables.Load.Begin(addonidentifier)
- Parameters:
- addonidentifier: The addon's identifier.
- Event.Addon.SavedVariables.Load.End
- Signals the end of an addon's saved variable load.
- Addon.SavedVariables.Load.End(addonidentifier)
- Parameters:
- addonidentifier: The addon's identifier.
- (1 handler)
- Event.Addon.SavedVariables.Save.Begin
- Signals the beginning of an addon's saved variable saving.
- Addon.SavedVariables.Save.Begin(addonidentifier)
- Parameters:
- addonidentifier: The addon's identifier.
- Event.Addon.SavedVariables.Save.End
- Signals the end of an addon's saved variable saving.
- Addon.SavedVariables.Save.End(addonidentifier)
- Parameters:
- addonidentifier: The addon's identifier.
- Event.Addon.Shutdown.Begin
- Signals the beginning of the shutdown sequence.
- Addon.Shutdown.Begin()
- Event.Addon.Shutdown.End
- Signals the end of the shutdown sequence. This is the last event that will be sent.
- Addon.Shutdown.End()
- Event.Addon.Startup.End
- Signals the end of the startup sequence. At this point, all addons are fully loaded and initialized.
- Addon.Startup.End()
- Event.Buff.Add
- Signals new buffs on a unit.
- Buff.Add(unit, buffs)
- Parameters:
- unit: The Unit ID of the unit involved.
- buffs: A lookup table containing the buffs involved.
- Event.Buff.Change
- Signals a change in existing buffs on a unit.
- Buff.Change(unit, buffs)
- Parameters:
- unit: The Unit ID of the unit involved.
- buffs: A lookup table containing the buffs involved.
- Event.Buff.Remove
- Signals removal of buffs from a unit.
- Buff.Remove(unit, buffs)
- Parameters:
- unit: The Unit ID of the unit involved.
- buffs: A lookup table containing the buffs involved.
- Event.Slash (category for dynamically-created events)
- Event.Slash.dump
- (Slash event documentation TBI)
- (1 handler)
- Event.Slash.eventlog
- (Slash event documentation TBI)
- Event.System.Error
- Signals that an addon error has occured. To prevent infinite loops, errors in handlers for this event may not result in further events being triggered.
- System.Error(error)
- Parameters:
- error: Table containing error data. Includes member "type". May also include error, stacktrace, event, addon, info, frame, script, file. Possible values for type: event (error, stacktrace, event, addon, info), frameEvent (error, stacktrace, event, addon, frame), script (error, stacktrace, script), internal (event), fileNotFound (addon, file), fileLoad (addon, file, error), fileRun (error, stacktrace, addon, file).
- (1 handler)
- Event.System.Update.Begin
- Signals the beginning of a frame render. This is your last chance to make UI changes for this frame.
- System.Update.Begin()
- Event.System.Update.End
- Signals the end of a frame render.
- System.Update.End()
- (1 handler)
- Event.Unit.Add
- Signals the addition of units to unit specifiers. Always preceded by Event.Unit.Change.Remove. Triggers for unit IDs that have been removed from the specifier tree, but may not trigger for any children of those units. You may want to use LibUnitChange instead of this event.
- Unit.Add(units)
- Parameters:
- units: Table of the units changed. Key is the unit ID, value is the unit specifier, or "false" if the unit now has no specifier.
- Event.Unit.Remove
- Signals the removal of units from unit specifiers. Always followed by Event.Unit.Change.Add. Triggers for unit IDs that have been removed from the specifier tree, but may not trigger for any children of those units. You may want to use LibUnitChange instead of this event.
- Unit.Remove(units)
- Parameters:
- units: Table of the units changed. Key is the unit ID, value is the unit specifier, or "false" if the unit now has no specifier.
- UI:
- Layout:
- Members:
- GetBottom
- Retrieves the Y position of the bottom edge of this element.
- bottom = Layout:GetBottom() -- number <- void
- Results:
- bottom: The Y position of the bottom edge of this element.
- GetBounds
- Retrieves the complete bounds of this element.
- left, top, right, bottom = Layout:GetBounds() -- number, number, number, number <- void
- Results:
- right: The X position of the right edge of this element.
- left: The X position of the left edge of this element.
- bottom: The Y position of the bottom edge of this element.
- top: The Y position of the top edge of this element.
- GetEventTable
- Retrieves the event table of this element. By default, this value is also stored in "this.Event".
- eventTable = Layout:GetEventTable() -- table <- void
- Results:
- eventTable: The event table of this element.
- GetHeight
- Retrieves the height of this element.
- height = Layout:GetHeight() -- number <- void
- Results:
- height: The height of this element.
- GetLeft
- Retrieves the X position of the left edge of this element.
- left = Layout:GetLeft() -- number <- void
- Results:
- left: The X position of the left edge of this element.
- GetName
- Retrieves the name of this element.
- name = Layout:GetName() -- string <- void
- Results:
- name: The name of this element, as provided by the addon that created it.
- GetOwner
- Retrieves the owner of this element.
- owner = Layout:GetOwner() -- string <- void
- Results:
- owner: The owner of this element. Given as an addon identifier.
- GetRight
- Retrieves the X position of the right edge of this element.
- right = Layout:GetRight() -- number <- void
- Results:
- right: The X position of the right edge of this element.
- GetTop
- Retrieves the Y position of the top edge of this element.
- top = Layout:GetTop() -- number <- void
- Results:
- top: The Y position of the top edge of this element.
- GetWidth
- Retrieves the width of this element.
- width = Layout:GetWidth() -- number <- void
- Results:
- width: The width of this element.
- Events:
- Move
- Size
- Frame: Inherits from Layout
- Members:
- GetAlpha
- Gets the alpha multiplier of this frame.
- alpha = Frame:GetAlpha() -- number <- void
- Results:
- alpha: The alpha multiplier of this frame. 1 is fully opaque, 0 is fully transparent. This does not include multiplied alphas from this frame's parent - it's the exact value passed to SetAlpha.
- GetBackgroundColor
- Retrieves the background color of this frame.
- r, g, b, a = Frame:GetBackgroundColor() -- number, number, number, number <- void
- Results:
- b: Blue.
- r: Red.
- a: Alpha. 1 is fully opaque, 0 is fully transparent.
- g: Green.
- GetLayer
- Gets the frame's layer order.
- layer = Frame:GetLayer() -- number <- void
- Results:
- layer: The render layer of this frame. See Frame:SetLayer for details.
- GetParent
- Gets the parent of this frame.
- parent = Frame:GetParent() -- Frame <- void
- Results:
- parent: The parent element of this frame.
- GetVisible
- Gets the visibility flag for this frame.
- visible = Frame:GetVisible() -- boolean <- void
- Results:
- visible: This frame's visibility flag, as set by SetVisible. Does not check the visibility flags of the frame's parents.
- SetAllPoints
- Pins all the edges of this frame to the edges of a different frame.
- Frame:SetAllPoints(target) -- Layout
- Parameters:
- target: Target Layout to pin this frame's edges to.
- SetAlpha
- Sets the alpha transparency multiplier for this frame and its children.
- Frame:SetAlpha(alpha) -- number
- Parameters:
- alpha: The new alpha multiplier. 1 is fully opaque, 0 is fully transparent.
- SetBackgroundColor
- Sets the background color of this frame.
- Frame:SetBackgroundColor(r, g, b) -- number, number, number
- Frame:SetBackgroundColor(r, g, b, a) -- number, number, number, number
- Parameters:
- b: Blue.
- r: Red.
- a: Alpha. 1 is fully opaque, 0 is fully transparent. Defaults to 1.
- g: Green.
- SetHeight
- Sets the height of this frame. Undefined results if the frame already has two pinned Y coordinates.
- Frame:SetHeight(height) -- number
- Parameters:
- height: The new height of this frame.
- SetLayer
- Sets the frame layer for this frame. This can be any number. Frames are drawn in ascending order. If two frames have the same layer number, then the order of those frames is undefined, but stable during a single play session. Frames are always drawn after their parents.
- Frame:SetLayer(layer) -- number
- Parameters:
- layer: The new layer for this frame.
- SetParent
- Sets the parent of this frame. Circular dependencies result in undefined behavior.
- Frame:SetParent(parent) -- Frame
- Parameters:
- parent: The new parent for this frame.
- SetPoint
- Pins a point on this frame to a location on another frame. This is a rather complex function and you should look at examples to see how to use it. Better documentation will be forthcoming.
- Frame:SetPoint(...) -- ...
- Parameters:
- ...: This function's parameters are complicated. More details will be forthcoming.
- SetVisible
- Sets the frame's visibility flag. If set to false, then this frame and all its children will not be rendered or accept mouse input.
- Frame:SetVisible(visible) -- boolean
- Parameters:
- visible: The new visibility flag.
- SetWidth
- Sets the width of this frame. Undefined results if the frame already has two pinned X coordinates.
- Frame:SetWidth(width) -- number
- Parameters:
- width: The new width of this frame.
- Events:
- LeftDown
- LeftUp
- Context: Inherits from Frame
- Members:
- (No extra members)
- Events:
- (No extra events)
- Text: Inherits from Frame
- Members:
- GetFont
- Gets the current font used for this element.
- source, font = Text:GetFont() -- string, string <- void
- Results:
- font: The actual font identifier. Either a resource identifier or a filename.
- source: The source of the resource. "Rift" will take the resource from Rift's internal data. Anything else will take the resource from the addon with that identifier.
- GetFontColor
- Gets the current font color for this element.
- r, g, b, a = Text:GetFontColor() -- number, number, number, number <- void
- Results:
- b: Blue.
- r: Red.
- a: Alpha. 1 is fully opaque, 0 is fully transparent.
- g: Green.
- GetFontSize
- Gets the font size of the current element.
- fontsize = Text:GetFontSize() -- number <- void
- Results:
- fontsize: The current font size of this element.
- GetFullHeight
- Get the height that would be required for this element to display all lines of text.
- height = Text:GetFullHeight() -- number <- void
- Results:
- height: The element height needed to display all lines of text.
- GetFullWidth
- Get the width that would be required for this element to avoid word wrapping or truncation.
- width = Text:GetFullWidth() -- number <- void
- Results:
- width: The element width needed to avoid word wrapping or truncation.
- GetText
- Get the current text for this element.
- text = Text:GetText() -- string <- void
- Results:
- text: The current text of the element.
- GetWordwrap
- Gets the wordwrap flag for this element.
- wordwrap = Text:GetWordwrap() -- boolean <- void
- Results:
- wordwrap: The current wordwrap flag for this element. If false, long lines will be truncated. Defaults to false.
- ResizeToText
- Sets the element's width and height to display all text without wordwrapping or truncation.
- Text:ResizeToText() -- void
- SetFont
- Sets the current font used for this element.
- Text:SetFont(source, font) -- string, string
- Parameters:
- font: The actual font identifier. Either a resource identifier or a filename.
- source: The source of the resource. "Rift" will take the resource from Rift's internal data. Anything else will take the resource from the addon with that identifier.
- SetFontColor
- Sets the current font color for this element.
- Text:SetFontColor(r, g, b) -- number, number, number
- Text:SetFontColor(r, g, b, a) -- number, number, number, number
- Parameters:
- b: Blue.
- r: Red.
- a: Alpha. 1 is fully opaque, 0 is fully transparent. Defaults to 1.
- g: Green.
- SetFontSize
- Sets the current font size of this element.
- Text:SetFontSize(fontsize) -- number
- Parameters:
- fontsize: The new font size of this element.
- SetText
- Sets the current text for this element.
- Text:SetText(text) -- string
- Parameters:
- text: The new text for the element.
- SetWordwrap
- Sets the wordwrap flag for this element.
- Text:SetWordwrap(wordwrap) -- boolean
- Parameters:
- wordwrap: The new wordwrap flag for this element. If false, long lines will be truncated. Defaults to false.
- Events:
- (No extra events)
- Texture: Inherits from Frame
- Members:
- GetTexture
- Gets the current texture used for this element.
- source, texture = Texture:GetTexture() -- string, string <- void
- Results:
- source: The source of the resource. "Rift" will take the resource from Rift's internal data. Anything else will take the resource from the addon with that identifier.
- texture: The actual texture identifier. Either a resource identifier or a filename.
- GetTextureHeight
- Returns the actual pixel height of the current texture.
- height = Texture:GetTextureHeight() -- number <- void
- Results:
- height: The height of the current texture in pixels.
- GetTextureWidth
- Returns the actual pixel width of the current texture.
- width = Texture:GetTextureWidth() -- number <- void
- Results:
- width: The width of the current texture in pixels.
- ResizeToTexture
- Sets the element's width and height to the exact pixel size of the texture.
- Texture:ResizeToTexture() -- void
- SetTexture
- Sets the current texture used for this element.
- Texture:SetTexture(source, texture) -- string, string
- Parameters:
- source: The source of the resource. "Rift" will take the resource from Rift's internal data. Anything else will take the resource from the addon with that identifier.
- texture: The actual texture identifier. Either a resource identifier or a filename.
- Events:
- (No extra events)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement