Move notification and validation to event3
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---@type Message[]
|
||||
aura_env.messageQueue = {}
|
||||
aura_env.separator = "\\"
|
||||
aura_env.separator = "ž"
|
||||
aura_env.addonprefix = "STINKY_DETECTOR"
|
||||
RegisterAddonMessagePrefix(aura_env.addonprefix)
|
||||
|
||||
@@ -38,14 +38,6 @@ Message = {
|
||||
---@param stinky Stinky
|
||||
QueueNotifyGuild = function(stinky)
|
||||
if not aura_env.config.stinkyNotifyGuild then return end
|
||||
if stinky.threat < aura_env.config.threatThreshold then
|
||||
if aura_env.config.debug then
|
||||
print(string.format("Skipping notify guild due to low threat (%d < %d)",
|
||||
stinky.threat, aura_env.config.threatThreshold))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if aura_env.config.debug then print("Queueing notify guild:") end
|
||||
local message = Message.new(stinky:FormMessage(), nil, "GUILD")
|
||||
if aura_env.config.debug then DevTools_Dump(message) end
|
||||
@@ -54,14 +46,6 @@ Message = {
|
||||
---@param stinky Stinky
|
||||
QueueNotifyWhisper = function(stinky)
|
||||
if not aura_env.config.stinkyNotifyWhisper then return end
|
||||
if stinky.threat < aura_env.config.threatThreshold then
|
||||
if aura_env.config.debug then
|
||||
print(string.format("Skipping notify whisper due to low threat (%d < %d)",
|
||||
stinky.threat, aura_env.config.threatThreshold))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if aura_env.config.debug then print("Queueing notify whisper:") end
|
||||
local text = stinky:FormMessage()
|
||||
for _, to in ipairs(toNotify) do
|
||||
@@ -74,14 +58,6 @@ Message = {
|
||||
---@param stinky Stinky
|
||||
QueueNotifyAddonGuild = function(stinky)
|
||||
if not aura_env.config.stinkyNotifyAddonGuild then return end
|
||||
if stinky.threat < aura_env.config.threatThreshold then
|
||||
if aura_env.config.debug then
|
||||
print(string.format("Skipping notify addon guild due to low threat (%d < %d)",
|
||||
stinky.threat, aura_env.config.threatThreshold))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if aura_env.config.debug then print("Queueing notify addon guild:") end
|
||||
local message = Message.new(stinky:FormAddonMessage(), nil, "GUILD", true)
|
||||
if aura_env.config.debug then DevTools_Dump(message) end
|
||||
@@ -90,14 +66,6 @@ Message = {
|
||||
---@param stinky Stinky
|
||||
QueueNotifyAddonWhisper = function(stinky)
|
||||
if not aura_env.config.stinkyNotifyAddonWhisper then return end
|
||||
if stinky.threat < aura_env.config.threatThreshold then
|
||||
if aura_env.config.debug then
|
||||
print(string.format("Skipping notify addon whisper due to low threat (%d < %d)",
|
||||
stinky.threat, aura_env.config.threatThreshold))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if aura_env.config.debug then print("Queueing notify addon whisper:") end
|
||||
local text = stinky:FormMessage()
|
||||
for _, to in ipairs(toNotify) do
|
||||
@@ -285,7 +253,6 @@ aura_env.StinkyDetected = function(name)
|
||||
if not aura_env.localStinkies[name] or aura_env.localStinkies[name] <
|
||||
GetTime() - 60 then
|
||||
local stinky = aura_env.stinkies[name]
|
||||
PlaySoundFile("Interface\\Sounds\\Domination.ogg", "Master")
|
||||
Message.QueueNotifyGuild(stinky)
|
||||
Message.QueueNotifyWhisper(stinky)
|
||||
Message.QueueNotifyAddonGuild(stinky)
|
||||
|
||||
Reference in New Issue
Block a user