[FR] Add filter for whitelisted auras to only show your own
Pingumania opened this issue ยท 3 comments
The problem is that as soon as "Whitelist" is selected there is no check for who is the caster of the aura.
https://github.com/Voopie/Stripes/blob/main/Modules/Auras/Auras.lua#L280
Hey!
Could you try this?
You will need to replace the entire FilterShouldShowBuff function
local function FilterShouldShowBuff(name, spellId, caster, nameplateShowPersonal, nameplateShowAll, isSelf)
if not name then
return false;
end
if XLIST_MODE == 2 then -- BLACKLIST
if blacklistAurasNameCache[name] then
return false;
elseif O.db.auras_blacklist[name] and O.db.auras_blacklist[name].enabled then
blacklistAurasNameCache[name] = spellId;
return false;
elseif spellId and O.db.auras_blacklist[spellId] and O.db.auras_blacklist[spellId].enabled then
blacklistAurasNameCache[name] = spellId;
return false;
end
elseif XLIST_MODE == 3 then -- WHITELIST
if whitelistAurasNameCache[name] then
return units[caster];
elseif O.db.auras_whitelist[name] and O.db.auras_whitelist[name].enabled then
whitelistAurasNameCache[name] = spellId;
return units[caster];
elseif spellId and O.db.auras_whitelist[spellId] and O.db.auras_whitelist[spellId].enabled then
whitelistAurasNameCache[name] = spellId;
return units[caster];
end
return false;
end
if FILTER_PLAYER_ENABLED and not isSelf then
return units[caster];
else
return nameplateShowAll or (nameplateShowPersonal and units[caster]);
end
end