From a97cb708a1af36dd7e6c8589a3d56bd076a755eb Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Wed, 30 Oct 2024 20:58:11 +0100 Subject: [PATCH] Fix death reporting with stinky --- FreshShit/StinkyDetector/init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FreshShit/StinkyDetector/init.lua b/FreshShit/StinkyDetector/init.lua index 81bd157..96fe8cb 100644 --- a/FreshShit/StinkyDetector/init.lua +++ b/FreshShit/StinkyDetector/init.lua @@ -36,6 +36,7 @@ for i, part in ipairs(toNotify) do toNotify[i] = strtrim(part) end WeakAurasSaved.Cyka.stinkies = {} +if not WeakAurasSaved.Cyka.PlayerFactionCache then WeakAurasSaved.Cyka.PlayerFactionCache = {} end ---@class Message @@ -140,7 +141,7 @@ Message = { if not aura_env.config.killNotifyGuild then return end if aura_env.config.debug then print("Queueing notify guild:") end local text = string.format("%s %s убил %s с помощью %s", faction, source, destination, spellName) - local message = Message.new(text, nil, "GUILD", true) + local message = Message.new(text, nil, "GUILD") if aura_env.config.debug then DevTools_Dump(message) end table.insert(aura_env.messageQueue, message) end, @@ -153,7 +154,7 @@ Message = { if aura_env.config.debug then print("Queueing notify whisper:") end local text = string.format("%s %s убил %s с помощью %s", faction, source, destination, spellName) for _, to in ipairs(toNotify) do - local message = Message.new(text, to, "WHISPER", true) + local message = Message.new(text, to, "WHISPER") if aura_env.config.debug then DevTools_Dump(message) end table.insert(aura_env.messageQueue, message) end @@ -229,6 +230,7 @@ local recentlyKilled = {} aura_env.RegisterKill = function(source, destination, spellName, overkill) if recentlyKilled[source] and recentlyKilled[source] > GetTime() - killSpamTime then print("Death already reported") + return end if overkill <= 0 then return end