add filter for mobs that have curses

This commit is contained in:
pepopo978
2024-06-25 19:00:56 -07:00
parent cbfc7f1bfc
commit cd65ee960a
3 changed files with 28 additions and 0 deletions
+8
View File
@@ -12,6 +12,10 @@ filter.infight = function(unit)
return UnitAffectingCombat(unit) and true or false
end
filter.hascurse = function(unit)
return Cursive.curses:HasAnyCurse(unit) and true or false
end
filter.alive = function(unit)
return not UnitIsDead(unit) and true or false
end
@@ -74,6 +78,10 @@ function Cursive:ShouldDisplayGuid(guid)
shouldDisplay = shouldDisplay and filter.infight(guid)
end
if Cursive.db.profile.filterhascurse then
shouldDisplay = shouldDisplay and filter.hascurse(guid)
end
if Cursive.db.profile.filterhostile then
shouldDisplay = shouldDisplay and filter.hostile(guid)
end