From ed410c536de5d672eb147255b34dbaf549aaaf76 Mon Sep 17 00:00:00 2001 From: pepopo978 Date: Mon, 27 May 2024 17:28:03 -0700 Subject: [PATCH] add raid mark filter and fix casting on unmarked units --- commands.lua | 2 +- filter.lua | 4 ++++ settings.lua | 13 +++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/commands.lua b/commands.lua index b8ed7e6..559eb8d 100644 --- a/commands.lua +++ b/commands.lua @@ -131,7 +131,7 @@ end local function pickTarget(selectedPriority, spellNameNoRank, checkRange) -- Curse the target that best matches the selected priority - local highestPriorityValue = 0 + local highestPriorityValue = -1 local targetedGuid = nil local _, currentTargetGuid = UnitExists("target") diff --git a/filter.lua b/filter.lua index f927883..2ff3370 100644 --- a/filter.lua +++ b/filter.lua @@ -86,5 +86,9 @@ function Cursive:ShouldDisplayGuid(guid) shouldDisplay = shouldDisplay and filter.range(guid) end + if Cursive.db.profile.filterraidmark then + shouldDisplay = shouldDisplay and filter.range(guid) + end + return shouldDisplay end diff --git a/settings.lua b/settings.lua index 4aab9d6..f76a690 100644 --- a/settings.lua +++ b/settings.lua @@ -28,6 +28,7 @@ Cursive:RegisterDefaults("profile", { filterhostile = true, filterattackable = true, filterrange = false, + filterraidmark = false, }) local barOptions = { @@ -208,6 +209,18 @@ local mobFilters = { Cursive.db.profile.filterrange = v end, }, + ["raidmark"] = { + type = "toggle", + name = "Has Raid Mark", + desc = "Has Raid Mark", + order = 5, + get = function() + return Cursive.db.profile.filterraidmark + end, + set = function(v) + Cursive.db.profile.filterraidmark = v + end, + }, } Cursive.cmdtable = {