Fix up spectraler sighter to not spam
This commit is contained in:
@@ -32,12 +32,22 @@ function(e)
|
||||
end
|
||||
--print(string.format("Target Name: %s", tostring(targetName)))
|
||||
|
||||
local pvp = UnitIsPVP("target")
|
||||
local pvp = UnitIsPVP("target")
|
||||
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
|
||||
|
Reference in New Issue
Block a user