You should be able to do something like changing:
Lua Code:
local function Mixin(baseFrame)
baseFrame.UnitFrame.BuffFrame.ShouldShowBuff = newShouldShowBuff
end
too:
Lua Code:
local function Mixin(baseFrame)
if not UnitIsEnemy(baseFrame.UnitFrame.unit, "player") then return end
baseFrame.UnitFrame.BuffFrame.ShouldShowBuff = newShouldShowBuff
end
So friendly units don't receive the filter. There may well be a better way.
For documentation,
WowPedia is probably the best other than asking questions here or one of the other WoW UI focused websites like the
WoW UI forum or
Discord