Fix up sound notifications in stinky detector
This commit is contained in:
@@ -93,8 +93,9 @@ function(allstates, e, prefix, msg, ...)
|
||||
return false
|
||||
end
|
||||
|
||||
if not allstates[name] then
|
||||
if not aura_env.soundNotifyTimer[name] or aura_env.soundNotifyTimer[name] < GetTime() then
|
||||
PlaySoundFile("Interface\\Sounds\\Domination.ogg", "Master")
|
||||
aura_env.soundNotifyTimer[name] = GetTime() + aura_env.config.alertThrottle
|
||||
end
|
||||
|
||||
allstates[name] = {
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
---@type Message[]
|
||||
---@class aura_env
|
||||
---@field messageQueue Message[]
|
||||
---@field separator string
|
||||
---@field addonprefix string
|
||||
---@field config table<string, any>
|
||||
---@field stinkies Stinky[]
|
||||
---@field raceFactions table<string, string>
|
||||
---@field localStinkies table<string, Stinky>
|
||||
---@field soundNotifyTimer table<string, number>
|
||||
---@field GetZone fun(): string
|
||||
---@field RegisterKill fun(source: string, destination: string, spellName: string, overkill: number)
|
||||
---@field StinkyDetected fun(name: string)
|
||||
|
||||
aura_env.soundNotifyTimer = {}
|
||||
aura_env.messageQueue = {}
|
||||
aura_env.separator = "ž"
|
||||
aura_env.addonprefix = "STINKY_DETECTOR"
|
||||
@@ -22,7 +35,6 @@ local toNotify = StrSplit(aura_env.config.notify, ",")
|
||||
for i, part in ipairs(toNotify) do
|
||||
toNotify[i] = strtrim(part)
|
||||
end
|
||||
---@type Stinky[]
|
||||
aura_env.stinkies = {}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user