debuff

Returns true if the unit has the debuff for the spellID sent or false.

debuff(spell, [unit]) : boolean
  1. SpellID from the class spellbooks.

  2. See Wowpedia for more information on WoW Unit IDs.

  3. Use of object is also supported for unit / unit.

Example

Check for a debuff and cast if the condition is met.

if not debuff(WeakendSoul, 'player') and not buff(PowerWordShield, 'player') then
cast(PowerWordShield, 'player')
end

Note

Spell ID's and Debuff ID's for the same spell are not the same. If you find yourself spam caasting something, that is probably the reason.