Skip to content

Commit

Permalink
Aura: Fix custom visibility filters for temp enchants
Browse files Browse the repository at this point in the history
Fixes WH-1312
  • Loading branch information
nebularg committed Jan 15, 2021
1 parent 65d0140 commit e9f3737
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Modules/Aura/FilterTypes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1485,8 +1485,11 @@ PitBull4_Aura:RegisterFilterType('Self buff',L["Self buff"],self_buff_filter,fun
end)

local function has_custom_visibility_filter(self, entry, frame)
local state = UnitAffectingCombat("player") and "RAID_INCOMBAT" or "RAID_OUTOFCOMBAT"
local hasCustom = SpellGetVisibilityInfo(entry[15], state)
local hasCustom = false
if entry[15] then
local state = UnitAffectingCombat("player") and "RAID_INCOMBAT" or "RAID_OUTOFCOMBAT"
hasCustom = SpellGetVisibilityInfo(entry[15], state)
end
if PitBull4_Aura:GetFilterDB(self).custom_visibility then
return hasCustom
else
Expand Down Expand Up @@ -1517,9 +1520,12 @@ PitBull4_Aura:RegisterFilterType('Has custom visibility',L["Has custom visibilit
end)

local function should_show_filter(self, entry, frame)
local state = UnitAffectingCombat("player") and "RAID_INCOMBAT" or "RAID_OUTOFCOMBAT"
local hasCustom, alwaysShowMine, showForMySpec = SpellGetVisibilityInfo(entry[15], state)
local show = hasCustom and (showForMySpec or (alwaysShowMine and my_units[entry[12]]))
local show = false
if entry[15] then
local state = UnitAffectingCombat("player") and "RAID_INCOMBAT" or "RAID_OUTOFCOMBAT"
local hasCustom, alwaysShowMine, showForMySpec = SpellGetVisibilityInfo(entry[15], state)
show = hasCustom and (showForMySpec or (alwaysShowMine and my_units[entry[12]]))
end
if PitBull4_Aura:GetFilterDB(self).should_show then
return show
else
Expand Down

0 comments on commit e9f3737

Please sign in to comment.