I'm sorry if these are dumb questions, I'm really trying. I'm not overly familiar with lua or any other programming language for that matter and I think I may be in over my head here.
Following (I hope) your advise I've gone to
Code:
local function UnitisAllowed(unit)
if not addon.CONFIG.allunits then
if UnitID == "target" or UnitID == "focus" or UnitID == "mouseover" then return true end
end
else
return false
end
Code:
if eventType == "SPELL_AURA_APPLIED" and addon.BUFF_SPELLS[spellname] and isEnemy(destFlags) and (addon.CONFIG.allunits or UnitisAllowed(destID)) then
???