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
Functions here returns a table with following format:
aura = { name = '', -- Aura name up = true, -- Is active count = 0, -- stack count expirationTime = 0, -- expiration time in seconds remains = 0, -- how many seconds remains refreshable = remains < 0.3 * duration, -- is refreshable returns true if aura can be safely reapplied to not loose dps (pandemic 30% of original duration) }
local aura = MaxDps:IntUnitAura(unit, nameOrId, filter, timeShift)Used to check for auras on specific target, any valid target works ex boss1, player, pet, target etc.
Parameters:
- unit - Unit to check for
- name - Name or ID of Aura
- filter - Custom filter for UnitAura
- timeShift - float
- aura - table (AURA type)
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)
Cooldowns are now consolidated and returns following format (COOLDOWN type)
{ ready = remains <= 0, remains = remains, fullRecharge = fullRecharge, partialRecharge = partialRecharge, charges = charges, maxCharges = maxCharges }
local cooldown = MaxDps:CooldownConsolidated(spellId, timeShift)Checks if spell is available to cast and returns more information about it.
Parameters:
- spell - Spell Name or ID
- timeShift - float
- cooldown - table (COOLDOWN type)
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 targets = MaxDps:SmartAoe(itemId)This function checks number of targets according to instance type you are in.
Parameters:
- itemId - Optional item Id
- count - number of targets in range
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)