buff
Returns true if the unit has the buff for the spellID sent or false.
buff(spell, [unit]) : boolean
- SpellID from the class spellbooks
- See Wowpedia for more information on WoW Unit IDs.
- Use of object is also supported for unit / unit.
Example
Cast Renew on your focus target if it does not have the buff.
if not buff(Renew, 'focus') then cast(Renew, 'focus')end
Note
Spell ID's and Buff ID's for the same spell are not the same. If you find yourself spam caasting something, that is probably the reason.