Skip to content

Commit

Permalink
Add more bigwigs events
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbuds committed Mar 3, 2025
1 parent b1a2202 commit 0f8a591
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions WeakAuras/BossMods.lua
Original file line number Diff line number Diff line change
Expand Up @@ -854,8 +854,25 @@ Private.ExecEnv.BossMods.BigWigs = {
local count = text and text:match("%((%d+)%)") or text:match("((%d+))") or "0"
Private.ScanEvents("BossMod_Announce", spellId, text, icon, count)
end
elseif event == "BigWigs_Timer" then
local addon, spellId, duration, _, text, count, icon, isCooldown, isBarEnabled = ...
elseif event == "BigWigs_Timer"
or event == "BigWigs_TargetTimer"
or event == "BigWigs_CastTimer"
or event == "BigWigs_StartBreak"
then
local addon, spellId, duration, _, text, count, icon, isCooldown, isBarEnabled
if event == "BigWigs_Timer" then
addon, spellId, duration, _, text, count, icon, isCooldown, isBarEnabled = ...
elseif event == "BigWigs_TargetTimer" or event == "BigWigs_CastTimer" then
addon, spellId, duration, _, text, count, icon, _, isBarEnabled = ...
isCooldown = false
elseif event == "BigWigs_StartBreak" then
addon, duration = ...
text = L["Break"]
spellId = 0
count = 0
isCooldown = false
isBarEnabled = true
end
local now = GetTime()
local expirationTime = now + duration

Expand All @@ -876,7 +893,7 @@ Private.ExecEnv.BossMods.BigWigs = {
bar.bwBackgroundColor = BWColorModule:GetColorTable("barBackground", addon, spellId)
bar.count = count or 0
bar.isBarEnabled = isBarEnabled
bar.cast = not(text:match("^[^<]") and true)
bar.cast = event == "BigWigs_CastTimer"

Private.ScanEvents("BigWigs_StartBar", text)
if self.isGeneric then
Expand Down Expand Up @@ -990,6 +1007,9 @@ Private.ExecEnv.BossMods.BigWigs = {

RegisterTimer = function(self)
self:RegisterCallback("BigWigs_Timer")
self:RegisterCallback("BigWigs_TargetTimer")
self:RegisterCallback("BigWigs_StartBreak")
self:RegisterCallback("BigWigs_CastTimer")
self:RegisterCallback("BigWigs_StopBar")
self:RegisterCallback("BigWigs_StopBars")
self:RegisterCallback("BigWigs_OnBossDisable")
Expand Down

0 comments on commit 0f8a591

Please sign in to comment.