Legend
Required parameter - normal text
Optional parameter - italic text
General helper functions
local specName = MaxDps:SpecName()Returns Specialization name
MaxDps:CheckTalents()Checks player talents and stores them in:
MaxDps.PlayerTalentsArray where key is the Spell ID (not Talent ID) and value equals true. It is always executed at the initialization process so there is no need to check them manually.
local targetPh = MaxDps:TargetPercentHealth()Target Percent HP
Returns:
- targetPh - float (from 0 - 1)
local gcd = MaxDps:GlobalCooldown()Calculate player global cooldown.
Returns:
- gcd - float
local attackSpeed = MaxDps:AttackHaste()Calculate player global attack speed
Returns:
- attackSpeed - float
local hasAura, stackCount = MaxDps:PersistentAura(name)Used to check for player auras that does not expire in time.
Parameters:
- name - Name or ID of Aura
- hasAura - boolean
- stackCount - integer
local hasAura, stackCount, timeLeft = MaxDps:Aura(name, timeShift, filter)Used to check for player auras that does expire in time.
Parameters:
- name - Name or ID of Aura
- timeShift - float
- filter - Custom filter for UnitAura
- hasAura - boolean
- stackCount - integer
- timeLeft - float
local hasAura, stackCount = MaxDps:UnitAura(name, timeShift, unit)Used to check for aura on specific target.
Parameters:
- name - Name or ID of Aura
- timeShift - float
- unit - UnitID
- hasAura - boolean
- stackCount - integer
local hasAura, stackCount = MaxDps:TargetAura(name, timeShift)Used to check for aura on player target.
Parameters:
- name - Name or ID of Aura
- timeShift - float
- hasAura - boolean
- timeLeft - float
local timeShift, spell, gcd = MaxDps:EndCast(target)Get information about target current casting info.
Parameters:
- target - Unit ID (player by default)
- timeShift - float (how much time till finish of current cast)
- spell - string (name of the spell)
- gcd - float (global cooldown)
local isSame = MaxDps:SameSpell(spell1, spell2)Compares two spells
Parameters:
- spell1 - ID or Name of a spell
- spell2 - ID or Name of a spell
- isSame - boolean
local cd, currentCharges, maxCharges = MaxDps:SpellCharges(spell, timeShift)Get information about specific spell charges and cooldown
Parameters:
- spell - Spell Name or ID
- timeShift - float
- cd - float (spell cooldown)
- currentCharges - float (Current spell changes in fractional form ex. 1.5 for one whole stack and cooldown halfway thru)
- maxCharges - integer (Maximum charges)
local isAvailable, cd = MaxDps:SpellAvailable(spell, timeShift)Checks if spell is available to cast.
Parameters:
- spell - Spell Name or ID
- timeShift - float
- isAvailable - boolean
- cd - float (Current spell cooldown)
local cd = MaxDps:Cooldown(spell, timeShift)Checks spell cooldown
Parameters:
- spell - Spell Name or ID
- timeShift - float
- cd - float (Current spell cooldown)
Resources helpers
local manaPercent, mana = MaxDps:Mana(minus, timeShift)Player mana and percentage mana
Parameters:
- minus - integer (Amount of mana to subtract)
- timeShift - float
- manaPercent - float (Mana percentage from 0 to 1)
- mana - integer (Current Mana)
Range helpers
local inRange = MaxDps:IsSpellInRange(spell, unit)Checks if spell is in range of unit.
Parameters:
- spell - Spell Name or ID
- unit - UnitID (target by default)
- inRange - boolean
local count = MaxDps:TargetsInRange(spell)Counts the number of targets within specific spell range (AOE detection)
Parameters:
- spell - Spell Name or ID
- count - integer (how many targets are in range)