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