From 4268283e6fff8f942b452738263ff6c33cca8fef Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Mon, 14 Oct 2024 16:17:49 +0200 Subject: [PATCH] Cleanup --- FreshShit/StinkyDetector/event3.lua | 7 ++++--- FreshShit/StinkyDetector/trigger.lua | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 FreshShit/StinkyDetector/trigger.lua diff --git a/FreshShit/StinkyDetector/event3.lua b/FreshShit/StinkyDetector/event3.lua index be4fc7e..c39d625 100644 --- a/FreshShit/StinkyDetector/event3.lua +++ b/FreshShit/StinkyDetector/event3.lua @@ -53,14 +53,15 @@ function(allstates, e, prefix, msg, ...) if not prefix or prefix ~= aura_env.addonprefix then return end local name, threat, note = string.split(aura_env.separator, msg) + threat = tonumber(threat) if not name then if aura_env.config.debug then print("Could not get name for " .. msg) end return - end + end - if threat < aura_env.config.threatThreshold then + if threat < aura_env.config.threatThreshold then if aura_env.config.debug then print(string.format("Skipping notify due to low threat (%d < %d)", threat, aura_env.config.threatThreshold)) end @@ -81,4 +82,4 @@ function(allstates, e, prefix, msg, ...) PlaySoundFile("Interface\\Sounds\\Domination.ogg", "Master") return true -end \ No newline at end of file +end diff --git a/FreshShit/StinkyDetector/trigger.lua b/FreshShit/StinkyDetector/trigger.lua new file mode 100644 index 0000000..4a9a664 --- /dev/null +++ b/FreshShit/StinkyDetector/trigger.lua @@ -0,0 +1,3 @@ +function(t) + return t[3] +end \ No newline at end of file