Bossmod triggers show timers regardless of bossmod settings
This commit is contained in:
@@ -72,6 +72,7 @@ globals = {
|
||||
"APIDocumentation",
|
||||
"APIDocumentation_LoadUI",
|
||||
"BigWigs",
|
||||
"BigWigsAPI",
|
||||
"BigWigsLoader",
|
||||
"CUSTOM_CLASS_COLORS",
|
||||
"DBM",
|
||||
|
||||
+109
-43
@@ -32,6 +32,7 @@ Private.ExecEnv.BossMods.DBM = {
|
||||
state.dbmType = bar.dbmType
|
||||
state.dbmColor = bar.dbmColor
|
||||
state.extend = extendTimer
|
||||
state.isBarEnabled = bar.isBarEnabled
|
||||
if extendTimer ~= 0 then
|
||||
state.autoHide = true
|
||||
end
|
||||
@@ -39,7 +40,7 @@ Private.ExecEnv.BossMods.DBM = {
|
||||
state.remaining = bar.remaining
|
||||
end,
|
||||
|
||||
TimerMatches = function(self, timerId, message, operator, spellId, counter, triggerId, dbmType, noCastBar)
|
||||
TimerMatches = function(self, timerId, message, operator, spellId, counter, triggerId, dbmType, noCastBar, isBarEnabled)
|
||||
if not self.bars[timerId] then
|
||||
return false
|
||||
end
|
||||
@@ -51,6 +52,9 @@ Private.ExecEnv.BossMods.DBM = {
|
||||
if spellId and spellId ~= "" and spellId ~= v.spellId then
|
||||
return false
|
||||
end
|
||||
if isBarEnabled ~= nil and isBarEnabled ~= v.isBarEnabled then
|
||||
return false
|
||||
end
|
||||
if message and message ~= "" and operator then
|
||||
if operator == "==" then
|
||||
if v.message ~= message then
|
||||
@@ -83,8 +87,8 @@ Private.ExecEnv.BossMods.DBM = {
|
||||
return true
|
||||
end,
|
||||
|
||||
TimerMatchesGeneric = function(self, timerId, message, operator, spellId, counter)
|
||||
return self:TimerMatches(timerId, message, operator, spellId, counter, nil, nil, true)
|
||||
TimerMatchesGeneric = function(self, timerId, message, operator, spellId, counter, isBarEnabled)
|
||||
return self:TimerMatches(timerId, message, operator, spellId, counter, nil, nil, true, isBarEnabled)
|
||||
end,
|
||||
|
||||
GetStage = function()
|
||||
@@ -102,10 +106,10 @@ Private.ExecEnv.BossMods.DBM = {
|
||||
return self.bars[timerId]
|
||||
end,
|
||||
|
||||
GetTimer = function(self, message, operator, spellId, extendTimer, count, triggerId, dbmType, noCastBar)
|
||||
GetTimer = function(self, message, operator, spellId, extendTimer, count, triggerId, dbmType, noCastBar, isBarEnabled)
|
||||
local bestMatch
|
||||
for timerId, bar in pairs(self.bars) do
|
||||
if self:TimerMatches(timerId, message, operator, spellId, count, triggerId, dbmType, noCastBar)
|
||||
if self:TimerMatches(timerId, message, operator, spellId, count, triggerId, dbmType, noCastBar, isBarEnabled)
|
||||
and (bestMatch == nil or bar.expirationTime < bestMatch.expirationTime)
|
||||
and bar.expirationTime + extendTimer > GetTime()
|
||||
then
|
||||
@@ -115,8 +119,8 @@ Private.ExecEnv.BossMods.DBM = {
|
||||
return bestMatch
|
||||
end,
|
||||
|
||||
GetTimerGeneric = function(self, message, operator, spellId, extendTimer, count)
|
||||
return self:GetTimer(message, operator, spellId, extendTimer, count, nil, nil, true)
|
||||
GetTimerGeneric = function(self, message, operator, spellId, extendTimer, count, isBarEnabled)
|
||||
return self:GetTimer(message, operator, spellId, extendTimer, count, nil, nil, true, isBarEnabled)
|
||||
end,
|
||||
|
||||
RecheckTimers = function(self)
|
||||
@@ -161,8 +165,8 @@ Private.ExecEnv.BossMods.DBM = {
|
||||
count = count and tostring(count) or "0"
|
||||
Private.ScanEvents("BossMod_Announce", spellId, message, icon, count)
|
||||
end
|
||||
elseif event == "DBM_TimerStart" then
|
||||
local timerId, msg, duration, icon, timerType, spellId, dbmType, _, _, _, _, _, timerCount = ...
|
||||
elseif event == "DBM_TimerBegin" then
|
||||
local timerId, msg, duration, icon, timerType, spellId, dbmType, _, _, _, _, _, timerCount, _, _, _, _, isBarEnabled = ...
|
||||
local now = GetTime()
|
||||
local expirationTime = now + duration
|
||||
self.bars[timerId] = self.bars[timerId] or {}
|
||||
@@ -176,6 +180,7 @@ Private.ExecEnv.BossMods.DBM = {
|
||||
bar.count = timerCount and tostring(timerCount) or "0"
|
||||
bar.dbmType = dbmType
|
||||
bar.expired = nil
|
||||
bar.isBarEnabled = isBarEnabled
|
||||
|
||||
local r, g, b = 0, 0, 0
|
||||
if DBT.GetColorForType then
|
||||
@@ -318,7 +323,7 @@ Private.ExecEnv.BossMods.DBM = {
|
||||
end,
|
||||
|
||||
RegisterTimer = function(self)
|
||||
self:RegisterCallback("DBM_TimerStart")
|
||||
self:RegisterCallback("DBM_TimerBegin")
|
||||
self:RegisterCallback("DBM_TimerStop")
|
||||
self:RegisterCallback("DBM_TimerPause")
|
||||
self:RegisterCallback("DBM_TimerResume")
|
||||
@@ -478,6 +483,7 @@ Private.event_prototypes["DBM Timer"] = {
|
||||
local triggerUseRemaining = %s
|
||||
local triggerRemaining = %s
|
||||
local triggerDbmType = %s
|
||||
local isBarEnabled = %s
|
||||
local cloneId = useClone and timerId or ""
|
||||
local state = states[cloneId]
|
||||
local counter = counter
|
||||
@@ -527,7 +533,7 @@ Private.event_prototypes["DBM Timer"] = {
|
||||
or event == "DBM_TimerPause"
|
||||
or event == "DBM_TimerResume"
|
||||
then
|
||||
if Private.ExecEnv.BossMods.DBM:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerId, triggerDbmType) then
|
||||
if Private.ExecEnv.BossMods.DBM:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerId, triggerDbmType, isBarEnabled) then
|
||||
local bar = Private.ExecEnv.BossMods.DBM:GetTimerById(timerId)
|
||||
if bar then
|
||||
return copyOrSchedule(bar, cloneId)
|
||||
@@ -543,7 +549,7 @@ Private.event_prototypes["DBM Timer"] = {
|
||||
elseif event == "DBM_TimerUpdate" or event == "DBM_TimerUpdateIcon" then
|
||||
local changed
|
||||
for timerId, bar in pairs(Private.ExecEnv.BossMods.DBM:GetAllTimers()) do
|
||||
if Private.ExecEnv.BossMods.DBM:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerId, triggerDbmType) then
|
||||
if Private.ExecEnv.BossMods.DBM:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerId, triggerDbmType, isBarEnabled) then
|
||||
changed = copyOrSchedule(bar, timerId) or changed
|
||||
else
|
||||
local state = states[timerId]
|
||||
@@ -566,7 +572,7 @@ Private.event_prototypes["DBM Timer"] = {
|
||||
changed = true
|
||||
end
|
||||
for timerId, bar in pairs(Private.ExecEnv.BossMods.DBM:GetAllTimers()) do
|
||||
if Private.ExecEnv.BossMods.DBM:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerId, triggerDbmType) then
|
||||
if Private.ExecEnv.BossMods.DBM:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerId, triggerDbmType, isBarEnabled) then
|
||||
changed = copyOrSchedule(bar, timerId) or changed
|
||||
end
|
||||
end
|
||||
@@ -575,13 +581,13 @@ Private.event_prototypes["DBM Timer"] = {
|
||||
else
|
||||
if event == "DBM_TimerStart" or event == "DBM_TimerUpdate" then
|
||||
if extendTimer ~= 0 then
|
||||
if Private.ExecEnv.BossMods.DBM:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerId, triggerDbmType) then
|
||||
if Private.ExecEnv.BossMods.DBM:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerId, triggerDbmType, isBarEnabled) then
|
||||
local bar = Private.ExecEnv.BossMods.DBM:GetTimerById(timerId)
|
||||
Private.ExecEnv.BossMods.DBM:ScheduleCheck(bar.expirationTime + extendTimer)
|
||||
end
|
||||
end
|
||||
end
|
||||
local bar = Private.ExecEnv.BossMods.DBM:GetTimer(triggerText, triggerTextOperator, triggerSpellId, extendTimer, counter, triggerId, triggerDbmType)
|
||||
local bar = Private.ExecEnv.BossMods.DBM:GetTimer(triggerText, triggerTextOperator, triggerSpellId, extendTimer, counter, triggerId, triggerDbmType, isBarEnabled)
|
||||
if bar then
|
||||
if extendTimer == 0
|
||||
or not (state and state.show)
|
||||
@@ -614,6 +620,7 @@ Private.event_prototypes["DBM Timer"] = {
|
||||
trigger.use_remaining and "true" or "false",
|
||||
trigger.remaining and tonumber(trigger.remaining or 0) or 0,
|
||||
trigger.use_dbmType and trigger.dbmType or "nil",
|
||||
trigger.use_isBarEnabled == nil and "nil" or trigger.use_isBarEnabled and "true" or "false",
|
||||
trigger.remaining_operator or "<"
|
||||
)
|
||||
end,
|
||||
@@ -665,6 +672,15 @@ Private.event_prototypes["DBM Timer"] = {
|
||||
conditionType = "select",
|
||||
test = "true"
|
||||
},
|
||||
{
|
||||
name = "isBarEnabled",
|
||||
display = L["Bar enabled in DBM settings"],
|
||||
desc = L["Test if bar is enabled in DBM settings"],
|
||||
type = "tristate",
|
||||
test = "true",
|
||||
init = "false",
|
||||
conditionType = "bool"
|
||||
},
|
||||
{
|
||||
name = "cloneId",
|
||||
display = L["Clone per Event"],
|
||||
@@ -710,9 +726,10 @@ Private.ExecEnv.BossMods.BigWigs = {
|
||||
state.paused = bar.paused
|
||||
state.remaining = bar.remaining
|
||||
state.isCooldown = bar.isCooldown
|
||||
state.isBarEnabled = bar.isBarEnabled
|
||||
end,
|
||||
|
||||
TimerMatches = function(self, timerId, message, operator, spellId, counter, cast, cooldown)
|
||||
TimerMatches = function(self, timerId, message, operator, spellId, counter, cast, cooldown, isBarEnabled)
|
||||
if not self.bars[timerId] then
|
||||
return false
|
||||
end
|
||||
@@ -721,6 +738,9 @@ Private.ExecEnv.BossMods.BigWigs = {
|
||||
if spellId and spellId ~= "" and spellId ~= v.spellId then
|
||||
return false
|
||||
end
|
||||
if isBarEnabled ~= nil and isBarEnabled ~= v.isBarEnabled then
|
||||
return false
|
||||
end
|
||||
if message and message ~= "" and operator then
|
||||
if operator == "==" then
|
||||
if v.text ~= message then
|
||||
@@ -751,8 +771,8 @@ Private.ExecEnv.BossMods.BigWigs = {
|
||||
return true
|
||||
end,
|
||||
|
||||
TimerMatchesGeneric = function(self, timerId, message, operator, spellId, counter)
|
||||
return self:TimerMatches(timerId, message, operator, spellId, counter, false, nil)
|
||||
TimerMatchesGeneric = function(self, timerId, message, operator, spellId, counter, isBarEnabled)
|
||||
return self:TimerMatches(timerId, message, operator, spellId, counter, false, nil, isBarEnabled)
|
||||
end,
|
||||
|
||||
GetStage = function(self)
|
||||
@@ -767,10 +787,10 @@ Private.ExecEnv.BossMods.BigWigs = {
|
||||
return self.bars[timerId]
|
||||
end,
|
||||
|
||||
GetTimer = function(self, text, operator, spellId, extendTimer, counter, cast, cooldown)
|
||||
GetTimer = function(self, text, operator, spellId, extendTimer, counter, cast, cooldown, isBarEnabled)
|
||||
local bestMatch
|
||||
for timerId, bar in pairs(self.bars) do
|
||||
if self:TimerMatches(timerId, text, operator, spellId, counter, cast, cooldown)
|
||||
if self:TimerMatches(timerId, text, operator, spellId, counter, cast, cooldown, isBarEnabled)
|
||||
and (bestMatch == nil or bar.expirationTime < bestMatch.expirationTime)
|
||||
and bar.expirationTime + extendTimer > GetTime()
|
||||
then
|
||||
@@ -780,8 +800,8 @@ Private.ExecEnv.BossMods.BigWigs = {
|
||||
return bestMatch
|
||||
end,
|
||||
|
||||
GetTimerGeneric = function(self, text, operator, spellId, extendTimer, counter)
|
||||
return self:GetTimer(text, operator, spellId, extendTimer, counter, false, nil)
|
||||
GetTimerGeneric = function(self, text, operator, spellId, extendTimer, counter, isBarEnabled)
|
||||
return self:GetTimer(text, operator, spellId, extendTimer, counter, false, nil, isBarEnabled)
|
||||
end,
|
||||
|
||||
RecheckTimers = function(self)
|
||||
@@ -827,8 +847,28 @@ 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_StartBar" then
|
||||
local addon, spellId, text, duration, icon, isCD = ...
|
||||
elseif event == "BigWigs_Timer"
|
||||
or event == "BigWigs_TargetTimer"
|
||||
or event == "BigWigs_CastTimer"
|
||||
or event == "BigWigs_StartBreak"
|
||||
or event == "BigWigs_StartPull"
|
||||
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" or event == "BigWigs_StartPull" then
|
||||
addon, duration = ...
|
||||
local BwLocale = BigWigsAPI:GetLocale("BigWigs")
|
||||
text = event == "BigWigs_StartBreak" and BwLocale.breakBar or BwLocale.pull
|
||||
spellId = 0
|
||||
count = 0
|
||||
icon = 136116
|
||||
isCooldown = false
|
||||
isBarEnabled = true
|
||||
end
|
||||
local now = GetTime()
|
||||
local expirationTime = now + duration
|
||||
|
||||
@@ -841,14 +881,15 @@ Private.ExecEnv.BossMods.BigWigs = {
|
||||
bar.duration = duration
|
||||
bar.expirationTime = expirationTime
|
||||
bar.icon = icon
|
||||
bar.isCooldown = isCD or false
|
||||
bar.isCooldown = isCooldown or false
|
||||
bar.expired = nil
|
||||
local BWColorModule = BigWigs:GetPlugin("Colors")
|
||||
bar.bwBarColor = BWColorModule:GetColorTable("barColor", addon, spellId)
|
||||
bar.bwTextColor = BWColorModule:GetColorTable("barText", addon, spellId)
|
||||
bar.bwBackgroundColor = BWColorModule:GetColorTable("barBackground", addon, spellId)
|
||||
bar.count = text:match("%((%d+)%)") or text:match("((%d+))") or "0"
|
||||
bar.cast = not(text:match("^[^<]") and true)
|
||||
bar.count = count or 0
|
||||
bar.isBarEnabled = isBarEnabled
|
||||
bar.cast = event == "BigWigs_CastTimer"
|
||||
|
||||
Private.ScanEvents("BigWigs_StartBar", text)
|
||||
if self.isGeneric then
|
||||
@@ -961,12 +1002,16 @@ Private.ExecEnv.BossMods.BigWigs = {
|
||||
end,
|
||||
|
||||
RegisterTimer = function(self)
|
||||
self:RegisterCallback("BigWigs_StartBar")
|
||||
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")
|
||||
self:RegisterCallback("BigWigs_PauseBar")
|
||||
self:RegisterCallback("BigWigs_ResumeBar")
|
||||
self:RegisterCallback("BigWigs_StartPull")
|
||||
end,
|
||||
|
||||
RegisterMessage = function(self)
|
||||
@@ -1118,6 +1163,7 @@ Private.event_prototypes["BigWigs Timer"] = {
|
||||
local triggerRemaining = %s
|
||||
local triggerCast = %s
|
||||
local triggerIsCooldown = %s
|
||||
local isBarEnabled = %s
|
||||
local cloneId = useClone and timerId or ""
|
||||
local state = states[cloneId]
|
||||
local counter = counter
|
||||
@@ -1167,7 +1213,7 @@ Private.event_prototypes["BigWigs Timer"] = {
|
||||
or event == "BigWigs_PauseBar"
|
||||
or event == "BigWigs_ResumeBar"
|
||||
then
|
||||
if Private.ExecEnv.BossMods.BigWigs:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerCast, triggerIsCooldown) then
|
||||
if Private.ExecEnv.BossMods.BigWigs:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerCast, triggerIsCooldown, isBarEnabled) then
|
||||
local bar = Private.ExecEnv.BossMods.BigWigs:GetTimerById(timerId)
|
||||
if bar then
|
||||
return copyOrSchedule(bar, cloneId)
|
||||
@@ -1183,7 +1229,7 @@ Private.event_prototypes["BigWigs Timer"] = {
|
||||
elseif event == "BigWigs_Timer_Update" then
|
||||
local changed
|
||||
for timerId, bar in pairs(Private.ExecEnv.BossMods.BigWigs:GetAllTimers()) do
|
||||
if Private.ExecEnv.BossMods.BigWigs:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerCast, triggerIsCooldown) then
|
||||
if Private.ExecEnv.BossMods.BigWigs:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerCast, triggerIsCooldown, isBarEnabled) then
|
||||
changed = copyOrSchedule(bar, timerId) or changed
|
||||
end
|
||||
end
|
||||
@@ -1196,7 +1242,7 @@ Private.event_prototypes["BigWigs Timer"] = {
|
||||
changed = true
|
||||
end
|
||||
for timerId, bar in pairs(Private.ExecEnv.BossMods.BigWigs:GetAllTimers()) do
|
||||
if Private.ExecEnv.BossMods.BigWigs:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerCast, triggerIsCooldown) then
|
||||
if Private.ExecEnv.BossMods.BigWigs:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerCast, triggerIsCooldown, isBarEnabled) then
|
||||
changed = copyOrSchedule(bar, timerId) or changed
|
||||
end
|
||||
end
|
||||
@@ -1205,13 +1251,13 @@ Private.event_prototypes["BigWigs Timer"] = {
|
||||
else
|
||||
if event == "BigWigs_StartBar" then
|
||||
if extendTimer ~= 0 then
|
||||
if Private.ExecEnv.BossMods.BigWigs:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerCast, triggerIsCooldown) then
|
||||
if Private.ExecEnv.BossMods.BigWigs:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerCast, triggerIsCooldown, isBarEnabled) then
|
||||
local bar = Private.ExecEnv.BossMods.BigWigs:GetTimerById(timerId)
|
||||
Private.ExecEnv.BossMods.BigWigs:ScheduleCheck(bar.expirationTime + extendTimer)
|
||||
end
|
||||
end
|
||||
end
|
||||
local bar = Private.ExecEnv.BossMods.BigWigs:GetTimer(triggerText, triggerTextOperator, triggerSpellId, extendTimer, counter, triggerCast, triggerIsCooldown)
|
||||
local bar = Private.ExecEnv.BossMods.BigWigs:GetTimer(triggerText, triggerTextOperator, triggerSpellId, extendTimer, counter, triggerCast, triggerIsCooldown, isBarEnabled)
|
||||
if bar then
|
||||
if extendTimer == 0
|
||||
or not (state and state.show)
|
||||
@@ -1243,6 +1289,7 @@ Private.event_prototypes["BigWigs Timer"] = {
|
||||
trigger.remaining and tonumber(trigger.remaining or 0) or 0,
|
||||
trigger.use_cast == nil and "nil" or trigger.use_cast and "true" or "false",
|
||||
trigger.use_isCooldown == nil and "nil" or trigger.use_isCooldown and "true" or "false",
|
||||
trigger.use_isBarEnabled == nil and "nil" or trigger.use_isBarEnabled and "true" or "false",
|
||||
trigger.remaining_operator or "<"
|
||||
)
|
||||
end,
|
||||
@@ -1300,6 +1347,15 @@ Private.event_prototypes["BigWigs Timer"] = {
|
||||
init = "false",
|
||||
conditionType = "bool"
|
||||
},
|
||||
{
|
||||
name = "isBarEnabled",
|
||||
display = L["Bar enabled in BigWigs settings"],
|
||||
desc = L["Test if bar is enabled in BigWigs settings"],
|
||||
type = "tristate",
|
||||
test = "true",
|
||||
init = "false",
|
||||
conditionType = "bool"
|
||||
},
|
||||
{
|
||||
name = "cloneId",
|
||||
display = L["Clone per Event"],
|
||||
@@ -1429,7 +1485,6 @@ Private.event_prototypes["Boss Mod Announce"] = {
|
||||
conditionType = "string",
|
||||
noValidation = true,
|
||||
showExactOption = false,
|
||||
negativeIsEJ = true
|
||||
},
|
||||
{
|
||||
name = "message",
|
||||
@@ -1517,6 +1572,7 @@ Private.event_prototypes["Boss Mod Timer"] = {
|
||||
local extendTimer = %s
|
||||
local triggerUseRemaining = %s
|
||||
local triggerRemaining = %s
|
||||
local isBarEnabled = %s
|
||||
local cloneId = useClone and timerId or ""
|
||||
local state = states[cloneId]
|
||||
local counter = counter
|
||||
@@ -1566,7 +1622,7 @@ Private.event_prototypes["Boss Mod Timer"] = {
|
||||
or event == "BossMod_TimerPause"
|
||||
or event == "BossMod_TimerResume"
|
||||
then
|
||||
if Private.ExecEnv.BossMods.Generic:TimerMatchesGeneric(timerId, triggerText, triggerTextOperator, triggerSpellId, counter) then
|
||||
if Private.ExecEnv.BossMods.Generic:TimerMatchesGeneric(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, isBarEnabled) then
|
||||
local bar = Private.ExecEnv.BossMods.Generic:GetTimerById(timerId)
|
||||
if bar then
|
||||
return copyOrSchedule(bar, cloneId)
|
||||
@@ -1582,7 +1638,7 @@ Private.event_prototypes["Boss Mod Timer"] = {
|
||||
elseif event == "BossMod_TimerUpdate" or event == "BossMod_TimerUpdateIcon" then
|
||||
local changed
|
||||
for timerId, bar in pairs(Private.ExecEnv.BossMods.Generic:GetAllTimers()) do
|
||||
if Private.ExecEnv.BossMods.Generic:TimerMatchesGeneric(timerId, triggerText, triggerTextOperator, triggerSpellId, counter) then
|
||||
if Private.ExecEnv.BossMods.Generic:TimerMatchesGeneric(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, isBarEnabled) then
|
||||
changed = copyOrSchedule(bar, timerId) or changed
|
||||
else
|
||||
local state = states[timerId]
|
||||
@@ -1605,7 +1661,7 @@ Private.event_prototypes["Boss Mod Timer"] = {
|
||||
changed = true
|
||||
end
|
||||
for timerId, bar in pairs(Private.ExecEnv.BossMods.Generic:GetAllTimers()) do
|
||||
if Private.ExecEnv.BossMods.Generic:TimerMatchesGeneric(timerId, triggerText, triggerTextOperator, triggerSpellId, counter) then
|
||||
if Private.ExecEnv.BossMods.Generic:TimerMatchesGeneric(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, isBarEnabled) then
|
||||
changed = copyOrSchedule(bar, timerId) or changed
|
||||
end
|
||||
end
|
||||
@@ -1614,13 +1670,13 @@ Private.event_prototypes["Boss Mod Timer"] = {
|
||||
else
|
||||
if event == "BossMod_TimerStart" or event == "BossMod_TimerUpdate" then
|
||||
if extendTimer ~= 0 then
|
||||
if Private.ExecEnv.BossMods.Generic:TimerMatchesGeneric(timerId, triggerText, triggerTextOperator, triggerSpellId, counter) then
|
||||
if Private.ExecEnv.BossMods.Generic:TimerMatchesGeneric(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, isBarEnabled) then
|
||||
local bar = Private.ExecEnv.BossMods.Generic:GetTimerById(timerId)
|
||||
Private.ExecEnv.BossMods.Generic:ScheduleCheck(bar.expirationTime + extendTimer)
|
||||
end
|
||||
end
|
||||
end
|
||||
local bar = Private.ExecEnv.BossMods.Generic:GetTimerGeneric(triggerText, triggerTextOperator, triggerSpellId, extendTimer, counter)
|
||||
local bar = Private.ExecEnv.BossMods.Generic:GetTimerGeneric(triggerText, triggerTextOperator, triggerSpellId, extendTimer, counter, isBarEnabled)
|
||||
if bar then
|
||||
if extendTimer == 0
|
||||
or not (state and state.show)
|
||||
@@ -1651,6 +1707,7 @@ Private.event_prototypes["Boss Mod Timer"] = {
|
||||
trigger.use_extend and tonumber(trigger.extend or 0) or 0,
|
||||
trigger.use_remaining and "true" or "false",
|
||||
trigger.remaining and tonumber(trigger.remaining or 0) or 0,
|
||||
trigger.use_isBarEnabled == nil and "nil" or trigger.use_isBarEnabled and "true" or "false",
|
||||
trigger.remaining_operator or "<"
|
||||
)
|
||||
end,
|
||||
@@ -1664,7 +1721,6 @@ Private.event_prototypes["Boss Mod Timer"] = {
|
||||
conditionType = "string",
|
||||
noValidation = true,
|
||||
showExactOption = false,
|
||||
negativeIsEJ = true
|
||||
},
|
||||
{
|
||||
name = "message",
|
||||
@@ -1690,6 +1746,15 @@ Private.event_prototypes["Boss Mod Timer"] = {
|
||||
type = "string",
|
||||
conditionType = "string",
|
||||
},
|
||||
{
|
||||
name = "isBarEnabled",
|
||||
display = L["Bar enabled in Boss Mod addon settings"],
|
||||
desc = L["Test if bar is enabled in Boss Mod addon settings"],
|
||||
type = "tristate",
|
||||
test = "true",
|
||||
init = "false",
|
||||
conditionType = "bool",
|
||||
},
|
||||
{
|
||||
name = "cloneId",
|
||||
display = L["Clone per Event"],
|
||||
@@ -1707,11 +1772,12 @@ Private.event_prototypes["Boss Mod Timer"] = {
|
||||
Private.category_event_prototype.addons["Boss Mod Timer"] = L["Boss Mod Timer"]
|
||||
|
||||
-- Disable DBM for users with an outdated DBM version and always disable BigWigs triggers
|
||||
-- Only disable DBM triggers if the DBM version is older than 2025-Feb-09
|
||||
-- Only disable DBM triggers if the DBM version is older than 2025-Feb-09 and 2025-Mar-12
|
||||
-- References:
|
||||
-- Commit: https://github.com/Zidras/DBM-Warmane/commit/5791dac460a07225c5d617d0252a88ce1e210618
|
||||
-- Commit: https://github.com/Zidras/DBM-Warmane/commit/5791dac460a07225c5d617d0252a88ce1e210618 - 20250209000000
|
||||
-- Commit2: https://github.com/Zidras/DBM-Warmane/commit/b6804570cab39a1c0412f964d1f2c15a63b96eed - 20250312000000
|
||||
-- Download: https://github.com/Zidras/DBM-Warmane/archive/refs/heads/main.zip
|
||||
if not (DBM and type(DBM.Revision) == "number" and DBM.Revision >= 20250209000000) then
|
||||
if not (DBM and type(DBM.Revision) == "number" and DBM.Revision >= 20250312000000) then
|
||||
local dbm_trigger = {
|
||||
"DBM Stage",
|
||||
"DBM Announce",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
local AddonName, Private = ...
|
||||
|
||||
local internalVersion = 83.25
|
||||
local internalVersion = 84
|
||||
|
||||
-- Lua APIs
|
||||
local insert = table.insert
|
||||
|
||||
Reference in New Issue
Block a user