mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
fix @unitid fallback as it shouldnt
This commit is contained in:
@@ -2290,6 +2290,9 @@ function CleveRoids.DoTarget(msg)
|
||||
-- Save original target GUID for potential restoration (SuperWoW returns GUID as 2nd value)
|
||||
local _, originalTargetGuid = UnitExists("target")
|
||||
|
||||
-- Track if an explicit target was specified via @unit syntax
|
||||
local explicitTarget = conditionals.target
|
||||
|
||||
do
|
||||
local unitTok = conditionals.target
|
||||
|
||||
@@ -2316,6 +2319,13 @@ function CleveRoids.DoTarget(msg)
|
||||
TargetUnit(unitTok)
|
||||
return true
|
||||
end
|
||||
|
||||
-- If an explicit target was specified via @unit syntax but doesn't exist or isn't valid,
|
||||
-- return false instead of falling through to candidate search.
|
||||
-- This ensures "/target [@mouseover,harm,alive]" does nothing when mouse is over empty ground.
|
||||
if explicitTarget then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
if UnitExists("target") and IsGuidValid("target", conditionals) then
|
||||
|
||||
Reference in New Issue
Block a user