Stripes

Stripes

19.2k Downloads

[FR] Add filter for whitelisted auras to only show your own

Pingumania opened this issue ยท 3 comments

commented

Is your feature request related to a problem? Please describe.
Currently when I whitelist some auras, I see them from all players.

Describe the solution you'd like
Option to only show my own debuffs. Like the custom tab.

commented

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

commented

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
commented

I ran a few dungeons and it worked.