main/API

LibAuraTracker:New()

Creates and returns a new aura tracker.
Even if you do not set this new tracker to track any auras, it can be used to interact with auras already being tracked by the library due to another tracker.

Return value

New tracker

Usage

Tracker = LibAuraTracker:New()


Tracker:AuraPandemic(unit, aura, source, filter)

Attempts to check the total pandemic duration of an aura if it is already being tracked, and if not, starts tracking it.

Parameters

unit
Unit to check
aura
Either name or id of the aura
source
Optional source unitID or GUID to filter results
filter
Optional filter to limit by

Return value

Total pandemic calculation duration of an aura

Usage

-- Get the pandemic calculation duration of your Rip on the target
RipPandemic = Tracker:AuraPandemic("target", "Rip", nil, "PLAYER HARMFUL")
RipPandemic = Tracker:AuraPandemic("target", "Rip", "player")


Tracker:AuraPercent(unit, aura, source, filter)

Attempts to check the remaining percentage of an aura if it is already being tracked, and if not, starts tracking it.

Parameters

unit
Unit to check
aura
Either name or id of the aura
source
Optional source unitID or GUID to filter results
filter
Optional filter to limit by

Return value

Percent of the pandemic calculation duration that remains of an aura

Usage

-- Get the percent ramaining of your Rip on the target
RipPercent = Tracker:AuraPercent("target", "Rip", nil, "PLAYER HARMFUL")
RipPercent = Tracker:AuraPercent("target", "Rip", "player")


Tracker:GetInfo(unit, aura, source, filter, getAll)

Attempts to find information about an aura or list of auras, if tracked

Parameters

unit
unitID or GUID to check
aura
Name(s) or id(s) of the aura or auras to be tracked
source
Optional source unitID or GUID to filter results
filter
Optional filter to limit by
getAll
Boolean to set to true for all results, not just the first Will be in the form of a table in the following format: Auras[destGUID][sourceGUID][spellID]

Return value

Current tracked aura information, if any

Usage

-- Get the aura information for your Rip on the target
RipInfo = Tracker:GetInfo("target", "Rip", "player")
-- Get the aura information for your Rip and Rake on the target
BleedInfo = Tracker:GetInfo("target", {"Rip", 155722}, "player")
-- Get the aura information for any Rip and Rake on the target
BleedInfo = Tracker:GetInfo("target", {"Rip", 155722})
-- Get the aura information for any Rip and Rake debuff on the target
BleedInfo = Tracker:GetInfo("target", {"Rip", 155722}, nil, "HARMFUL")


Tracker:SetInfo(unit, aura, info, source, filter)

Updates tracked aura info

Parameters

unit
Unit to check
aura
Name(s) or id(s) of the aura or auras to be tracked
info
Table of key value pairs to set for the aura.
source
Optional source unitID or GUID to filter results
filter
Optional filter to limit by

Usage

-- Set some variable information for the Rip on your target
Tracker:SetInfo("target", "Rip", {variable=7, othervariable=8} "PLAYER HARMFUL")
-- Set some variable information for your Rip and Rake on the target
Tracker:SetInfo("target", {"Rip", 155722}, {variable=7, othervariable=8} "PLAYER HARMFUL")


Tracker:Track(aura, filter)

Tells the tracker to start tracking an aura or auras

Parameters

aura
Name(s) or id(s) of the aura or auras to be tracked
filter
Optional filter to use when calling the UnitAura function

Return value

self to allow for chaining tracking in a single line

Usage

-- Start tracking Rip
Tracker:Track("Rip", "PLAYER HARMFUL")
-- Start tracking Rip and the DOT portion of Rake
Tracker:Track({ "Rip", 155722 }, "PLAYER HARMFUL")
-- Start tracking Rip and Berserk
Tracker:Track("Rip", "PLAYER HARMFUL"):Track("Berserk", "PLAYER HELPFUL")


Tracker:Tracked(aura, filter)

Checks if the tracker is currently tracking an aura or all in a list of auras

Parameters

aura
Name(s) or id(s) of the aura or auras to be tracked
filter
Optional filter to compare against existing filter, if any

Return value

Whether an aura or list of auras are all tracked

Usage

-- Looks for any auras with the name Rip are being tracked
RipTracked = Tracker:Tracked("Rip", "PLAYER HARMFUL")
-- Looks for the spellID for the DOT portion of Rake
-- If that isn't found, checks to see if all auras named Rake are tracked.
-- If that is true, then this aura is being tracked
RakeTracked = Tracker:Tracked(155722, "PLAYER HARMFUL")
-- Looks for both Rip and the DOT portion of Rake
BleedsTracked = Tracker:Tracked({ "Rip", 155722 }, "PLAYER HARMFUL")


Tracker:TrackedAny(aura, filter)

Checks if the tracker is currently tracking an aura or any in a list of auras

Parameters

aura
Name(s) or id(s) of the aura or auras to be tracked
filter
Optional filter to compare against existing filter, if any

Return value

Whether an aura or any in a list of auras are tracked

Usage

-- Looks for either Rip or the DOT portion of Rake
AnyBleedsTracked = Tracker:TrackedAny({ "Rip", 155722 }, "PLAYER HARMFUL")


Tracker:Untrack(aura)

Tells the tracker to stop tracking an aura or auras

Parameters

aura
Name(s) or id(s) of the aura or auras to be tracked

Usage

-- Stop tracking Rip
Tracker:Untrack("Rip")
-- Stop tracking Rip and the DOT portion of Rake and Berserk
Tracker:Untrack({ "Rip", 155722, "Berserk" })


Tracker:Wipe()

Tells the tracker to stop tracking all auras

Usage

Tracker:Wipe()



Comments

Posts Quoted:
Reply
Clear All Quotes