Fix up spectraler sighter to not spam

This commit is contained in:
2025-05-04 18:18:35 +02:00
parent 7a5d868694
commit be83442897

View File

@@ -36,8 +36,18 @@ function(e)
local pvpState = pvp == true and "ON" or "OFF"
local low, high = WeakAuras.GetRange("target")
local key = string.format("%s-%s-%s-%s", unitUuid, targetName, low, high)
--print(string.format("Key: %s", tostring(key)))
--print(string.format("Previous Key: %s", tostring(aura_env.previousTarget)))
if not aura_env.previousTarget then aura_env.previousTarget = key end
if aura_env.previousTarget == key then
--print(string.format("Target same as previous target: %s", tostring(key)))
return
end
local message = string.format("I see %s in stealth with pvp %s between %d and %d yards away", targetName, pvpState, low, high)
local message =
string.format("I see %s in stealth with pvp %s between %d and %d yards away", targetName, pvpState, low, high)
--print(string.format("Sending message: %s", tostring(message)))
SendChatMessage(message, "RAID")
aura_env.previousTarget = key
end