Fix issues with announcer
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
aura_env.debug = false
|
||||
aura_env.debug = true
|
||||
|
||||
---@class BaseCooldown
|
||||
---@field name string
|
||||
@@ -20,12 +20,14 @@ BaseCooldown = {
|
||||
self.name = name
|
||||
name = string.gsub(name, " ", "_")
|
||||
name = string.gsub(name, "'", "")
|
||||
name = string.lower(name)
|
||||
self.filename = name
|
||||
if playbackSpeed ~= nil then
|
||||
if playbackSpeed == nil then
|
||||
self.filename = string.format("1x\\%s", self.filename)
|
||||
else
|
||||
self.filename = string.format("%dx\\%s", playbackSpeed, self.filename)
|
||||
end
|
||||
if aura_env.debug then print(string.format("Created BaseCooldown with filename %s", self.filename)) end
|
||||
self.isOnCooldown = false
|
||||
self.announced = false
|
||||
self.remaining = 0
|
||||
@@ -132,6 +134,7 @@ Buff = {
|
||||
local isActive = true
|
||||
if duration == nil or expiry == nil then
|
||||
isActive = false
|
||||
expiry = 0
|
||||
end
|
||||
local remaining = expiry - GetTime()
|
||||
|
||||
@@ -149,14 +152,14 @@ Buff = {
|
||||
end,
|
||||
---@param self Buff
|
||||
playComplete = function(self)
|
||||
local soundFile = string.format("Interface\\Sounds\\alerts\\%s_expired.ogg", self.name)
|
||||
if aura_env.debug then print(string.format("%s expired, playing sound file at %s", self.name, soundFile)) end
|
||||
local soundFile = string.format("Interface\\Sounds\\alerts\\%s_expired.ogg", self.filename)
|
||||
if aura_env.debug then print(string.format("%s expired, playing sound file at %s", self.filename, soundFile)) end
|
||||
WeakAuras.ScanEvents("PLAY_SOUND", soundFile)
|
||||
end,
|
||||
---@param self Buff
|
||||
playSoon = function(self)
|
||||
local soundFile = string.format("Interface\\Sounds\\alerts\\%s_expiring.ogg", self.name)
|
||||
if aura_env.debug then print(string.format("%s expiring, playing sound file at %s", self.name, soundFile)) end
|
||||
local soundFile = string.format("Interface\\Sounds\\alerts\\%s_expiring.ogg", self.filename)
|
||||
if aura_env.debug then print(string.format("%s expiring, playing sound file at %s", self.filename, soundFile)) end
|
||||
WeakAuras.ScanEvents("PLAY_SOUND", soundFile)
|
||||
end
|
||||
}
|
||||
@@ -168,8 +171,8 @@ ActiveSet = nil
|
||||
Spells = {
|
||||
["Warrior"] = {
|
||||
Spell.new(107574, "Avatar"),
|
||||
Spell.new(1719, "BattleCry"),
|
||||
Spell.new(205545, "OdynsFury"),
|
||||
Spell.new(1719, "Battle Cry"),
|
||||
Spell.new(205545, "Odyns Fury"),
|
||||
Spell.new(26297, "Berserking"),
|
||||
Spell.new(12292, "Bloodbath"),
|
||||
},
|
||||
@@ -178,6 +181,6 @@ Spells = {
|
||||
Spell.new(104773, "Unending Resolve"),
|
||||
Spell.new(196098, "Soul Harvest"),
|
||||
Item.new(5512, "Healthstone"),
|
||||
Buff.new(207472, "Xavaric's Magnum Opus"),
|
||||
Buff.new(0, "Deadwind Harvester"),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user