Core Concepts

Object Attributes

Complete reference guide to SYNQ object attributes

Attributes are keys within SYNQ objects that return values about the object's state and properties.

Key Features

  • Non-case-sensitive - object.enemy works, so does object.Enemy and object.isEnemy
  • Cached per tick - Values generated on first reference, cached until next tick
  • Fallback aliases - Many attributes have intuitive aliases

General Attributes

exists - Returns true if object exists

unit.exists : true | nil

dead - Returns true if unit is dead

unit.dead : true | false

class / class2 / classLiteral - Object's class (localized / uppercase)

unit.class : "Hunter" | nil
unit.class2 : "HUNTER" | nil

race - Object's race

unit.race : string | nil

covenant - Unit's covenant

unit.covenant : string | nil

spec - Unit's specialization (inspect-based, group/player only)

unit.spec : string | "Unknown"

combat - Returns true if unit is in combat

unit.combat : true | nil

enemy - Returns true if unit is an enemy

unit.enemy : true | false

friend / friendly - Returns true if unit is friendly

unit.friend : true | false

player - Returns true if unit is a player

unit.player : true | false

healer / isHealer - Returns true if unit is a healer

unit.healer : true | false

melee / isMelee - Returns true if unit is melee DPS

unit.melee : true | false

ranged / isRanged - Returns true if unit is ranged DPS

unit.ranged : true | false

pet / isPet - Returns true if unit is another player's pet

unit.pet : true | false

hp - Health percentage (0-100)

unit.hp : number | 0

health - Current health value

unit.health : number

healthMax - Maximum health value

unit.healthMax : number

absorbs - Amount of absorption (shields) remaining on unit

unit.absorbs : number | 0

name - Object's name

unit.name : string | nil

guid - Object's GUID

unit.guid : string | nil

id - Object ID (not for use on players)

unit.id : number | false

level - Object's level

unit.level : number

height - Object's height

unit.height : number | nil

role - Object's role: healer, melee, ranged, tank, or pet

unit.role : string | nil

target - Target of the object, returned as SYNQ object

unit.target : object | emptyObject

visible - True if unit is visible (within render range)

unit.visible : true | false

stealth / stealthed - Stealth or invisibility effect spell ID

unit.stealth : number | false

pointer - Pointer for use with non-SYNQ APIs

unit.pointer : pointer | nil

Power Attributes

Access any power type by replacing power with the power type name.

unit.power         -- Default power
unit.energy        -- Energy
unit.energyMax     -- Max energy
unit.energyPct     -- Energy percentage
unit.mana          -- Mana
unit.manaMax       -- Max mana
unit.manaPct       -- Mana percentage
unit.rage          -- Rage
unit.focus         -- Focus
unit.comboPoints   -- Combo points
unit.cp            -- Combo points (alias)
unit.astralPower   -- Astral power
unit.holyPower     -- Holy power
unit.chi           -- Chi
unit.insanity      -- Insanity
unit.maelstrom     -- Maelstrom

Buffs & Debuffs

buffCount - Number of buffs on unit

unit.buffCount : number | 0

buffs - Array of all buffs

unit.buffs : table | {}

buffDescriptions - Array of description text for each buff

unit.buffDescriptions : table | {}

debuffCount - Number of debuffs on unit

unit.debuffCount : number | 0

debuffs - Array of all debuffs

unit.debuffs : table | {}

debuffDescriptions - Array of description text for each debuff

unit.debuffDescriptions : table | {}

purgeCount - Number of purgeable buffs on unit

unit.purgeCount : number | 0

cds - True if object has offensive cooldowns active

unit.cds : true | false

charmed - True if object is charmed (mind control, etc.)

unit.charmed : true | false

dotted - True if target has active damage over time effect

unit.dotted : true | false

Casts & Channels

casting - Spell name if unit is casting

unit.casting : string | nil

castID - Spell ID of current cast

unit.castID : number | nil

castTarget - SYNQ object being targeted by the cast

unit.castTarget : object | nil

castRemains - Time remaining on cast (minus latency)

unit.castRemains : number | 0

castPct - Cast completion percentage

unit.castPct : number | 0

channeling / channel - Spell name if unit is channeling

unit.channel : string | nil

channelID - Spell ID of current channel

unit.channelID : number | nil

channelRemains - Time remaining on channel (minus latency)

unit.channelRemains : number | 0

gcdRemains - Time until unit's next GCD is available (players only)

unit.gcdRemains : number | 0

lastCast - Latest spell ID cast by the object (players only)

unit.lastCast : number | nil

Movement & Positioning

distance - Distance from player to object (accounts for combat reach)

unit.distance : number | 9999

distanceTo - Distance from object to another object

distanceLiteral - Distance without combat reach

combatReach - Combat reach of the object

unit.combatReach : number | 0

boundingRadius - Bounding radius of the object

unit.boundingRadius : number | 0

los - Line of sight from player to object

unit.los : true | false

losOf(object) - Line of sight between two objects

losLiteral - Line of sight without smoke bomb effects

meleeRange - True if player is in melee range

unit.meleeRange : true | false

meleeRangeOf(object) - Melee range check between two objects

moving - True if unit is moving (speed > 0)

unit.moving : true | false

speed - Current speed in yards/sec

unit.speed : number | 0
unit.speed2 : number | 0  -- Run speed

movingDirection / direction - Moving direction as angle in radians

unit.direction : number | nil

rotation - Facing direction in radians

unit.rotation : number | nil

playerFacing - True if player is facing object

unit.playerFacing : true | false
unit.playerFacing45 : true | false  -- Facing at 45 degrees

movementFlags - Movement flags as integer

unit.movementFlags : number | 0

Combat & Threat

threat - Player's threat status for the unit

unit.threat : number | -1

aggro - True if player has aggro (threat >= 2)

unit.aggro : true | false

v2attackers() - Number of attackers and their combined cooldown usage

local total, melee, ranged, cooldowns = unit.v2attackers()

Crowd Control

bcc - Breakable crowd control debuff ID

unit.bcc : number | nil

bccRemains - Remaining time of breakable CC effects

unit.bccRemains : number | 0

cc - Crowd control debuff ID

unit.cc : number | nil

ccRemains - Remaining time of crowd control effects

unit.ccRemains : number | 0

ccInfo - Detailed info about longest remaining CC effect

unit.ccInfo : table | {}
-- { debuffID, debuffName, debuffRemains, drCategory, castSource }

stunned / stun - Stun debuff ID

unit.stunned : number | nil

stunRemains - Remaining time of stun effects

unit.stunRemains : number | 0

stunInfo - Detailed info about stun effect

unit.stunInfo : table | {}

rooted / root - Root debuff ID

unit.rooted : number | nil

rootRemains - Remaining time of root effects

unit.rootRemains : number | 0

rootInfo - Detailed info about root effect

unit.rootInfo : table | {}

silenced / silence - Silence debuff ID

unit.silenced : number | nil

silenceRemains - Remaining time of silence effects

unit.silenceRemains : number | 0

silenceInfo - Detailed info about silence effect

unit.silenceInfo : table | {}

disarmed / disarm - Disarm debuff ID

unit.disarm : number | false

disorient - Disorient debuff ID

unit.disorient : number | nil

disorientRemains - Remaining time of disorient effects

unit.disorientRemains : number | 0

disorientInfo - Detailed info about disorient effect

unit.disorientInfo : table | {}

incap / incapacitated - Incapacitate debuff ID

unit.incap : number | nil

incapRemains / incapacitateRemains - Remaining time of incapacitate effects

unit.incapRemains : number | 0

incapacitateInfo - Detailed info about incapacitate effect

unit.incapacitateInfo : table | {}

slowed - Slow debuff ID

unit.slowed : number | nil

Diminishing Returns

stunDR / sdr - Stun DR value (0.25 = quarter, 0.5 = half, 1 = full)

unit.stunDR : number | 1

stunDRRemains - Time remaining before stun DR resets

unit.stunDRRemains : number | 18

incapacitateDR / incapDR / idr - Incapacitate DR value

unit.incapDR : number | 1

incapacitateDRRemains - Time remaining before incapacitate DR resets

unit.incapacitateDRRemains : number | 18

disorientDR / ddr - Disorient DR value

unit.disorientDR : number | 1

disorientDRRemains - Time remaining before disorient DR resets

unit.disorientDRRemains : number | 18

rootDR / rdr - Root DR value

unit.rootDR : number | 1

rootDRRemains - Time remaining before root DR resets

unit.rootDRRemains : number | 18

silenceDR - Silence DR value

unit.silenceDR : number | 1

silenceDRRemains - Time remaining before silence DR resets

unit.silenceDRRemains : number | 18

Immunities

Spell Objects handle immunity checking automatically based on traits. These are for manual checks.

immuneCC - True if immune to crowd control

unit.immuneCC : true | false

ccImmunityRemains - Remaining duration of CC immunity effects

unit.ccImmunityRemains : number | 0

immuneHealing - True if immune to healing

unit.immuneHealing : true | false

healingImmunityRemains - Remaining duration of healing immunity

unit.healingImmunityRemains : number | 0

immuneMagic - True if immune to magic damage or effects

unit.immuneMagic : true | false

immuneMagicDamage - True if immune to magic damage

unit.immuneMagicDamage : true | false

immuneMagicEffects - True if immune to magic effects

unit.immuneMagicEffects : true | false

magicDamageImmunityRemains - Remaining duration of magic damage immunity

unit.magicDamageImmunityRemains : number | 0

magicEffectImmunityRemains - Remaining duration of magic effect immunity

unit.magicEffectImmunityRemains : number | 0

immunePhysical - True if immune to physical damage or effects

unit.immunePhysical : true | false

immunePhysicalDamage - True if immune to physical damage

unit.immunePhysicalDamage : true | false

immunePhysicalEffects - True if immune to physical effects

unit.immunePhysicalEffects : true | false

physicalDamageImmunityRemains - Remaining duration of physical damage immunity

unit.physicalDamageImmunityRemains : number | 0

physicalEffectImmunityRemains - Remaining duration of physical effect immunity

unit.physicalEffectImmunityRemains : number | 0

immuneSlows - True if immune to slows/snares

unit.immuneSlows : true | false

immuneStuns - True if immune to stuns

unit.immuneStuns : true | false

beast / immuneSheep / sheepImmune - True if immune to polymorph

unit.beast : true | false

Next: Learn about Object Functions for performing operations and calculations.