API
Functions
lib:GetDuration( spellID[, srcGUID[, dstGUID]] )
API to get spell duration of a spellID.
With srcGUID included, duration will be more accurate based on if we've seen that source cast a spell with a abnormal duration (they've speced/gyphed into something).
With dstGUID included, duration will be more accurate based on if there's diminishing returns on that dstGUID.
if dstGUID is a player, PvP duration will be used.
Arguments
- spellID: ID of a spell.
- srcGUID (optional): GUID of the caster.
- dstGUID (optional): GUID of the receiver.
Return value:
number: Duration of a spell, or nil of not found.
lib:GetDebuffType( spellID )
API to get debuff type of a spellID.
Arguments
- spellID: ID of a spell.
Return value:
string: Magic / Disease / Poison / Curse / none or nil if not found.
As to not waste resources, LibAuraInfo won't track auras on GUIDs unless a callback is registered. Register one of the events here or a bogus event name to get the following API to work.
lib:GetGUIDInfo( GUID )
API to get name and flags from a GUID.
Arguments
- GUID: ID from UnitGUID() or combatlog.
Return value:
- Name: Name of the GUID. (includes servername if not on your server)
- flags
lib:GUIDAuraID( GUID, spellID[, srcGUID] )
API to get aura info of a spellID on a dstGUID.
Arguments
- GUID: ID from UnitGUID() or combatlog.
- spellID: spellID of the aura.
- srcGUID: caster GUID. Including this helps with multible instances of the same aura on a GUID.
Return value:
- auraFound: true / false
- stackCount: 1+
- debuffType: Magic / Disease / Poison / Curse / none
- duration: 0+
- expires: Time at which aura expires. time using GetTime()
- isDebuff: true / false
- srcGUID: GUID of the player/npc that cast applied the aura.
lib:GetNumGUIDAuras( GUID )
API to get total number of auras on a GUID.
Arguments
- GUID: ID from UnitGUID() or combatlog.
Return value:
number: 0+
lib:GUIDAura( GUID, index )
API to get aura info on a GUID by index.
Arguments
- GUID: ID from UnitGUID() or combatlog.
- index: index of the spell in a table. See lib:GetNumGUIDAuras(GUID)
Return value:
- auraFound: true / false
- stackCount: 1+
- debuffType: Magic / Disease / Poison / Curse / none
- duration: 0+
- expires: Time at which aura expires. time using GetTime()
- isDebuff: true / false
- srcGUID: GUID of the player/npc that cast applied the aura.
lib:HasDREffect(dstGUID, spellID)
See if a spellID has a diminished return on a dstGUID.
Note: GetDuration and GUIDAura already takes DR into account when returning duration value.
Arguments
- dstGUID: GUID of the receiver.
- spellID: ID of the spell.
Return value:
- true / false
- DR modifier: 1 / 0.5 / 0.25 / 0. (spell duration * modifier)
Comments