You may want to do some tests with:
Lua Code:
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, canStealOrPurge, shouldConsolidate, spellId, canApplyAura, isBossDebuff, points1, points2, points3, isCastByPlayer = UnitAura(unit, index, filter)
local hasCustom, alwaysShowMine, showForMySpec = SpellGetVisibilityInfo(spellId, "ENEMY_TARGET") -- "RAID_INCOMBAT" or "RAID_OUTOFCOMBAT"
And I hope you'll share your thought. =)