Add DBM Phase triggers

- Callback can be used by external addons like Weakauras in its triggers.
- Fire stage callback on variable recovery
- Added public facing stage api, that allows for mods or Weakauras request current stage a mod is in (if applicable) for either specific mod by mod id OR by simply doing request without modId, and having DBM just give a return for first mod in combat table
- Boss modules migrated to use newly added SetStage function

Custom DBM commits with appropriate ReleaseRevision bump to 7005 to ensure DBM is compatible:

https://github.com/Zidras/DBM-Icecrown/commit/ff3a3a27502c73ed5686029bcca3be3afd8a459f

https://github.com/Barsoomx/DBM-wowcircle/commit/6388338048ad1916f2753995f02057889d3fc20b
This commit is contained in:
Zidras
2021-07-12 20:20:26 +01:00
committed by Bunny67
parent 5ad8c48622
commit 34ec6828c0
2 changed files with 37 additions and 1 deletions
+9
View File
@@ -2453,6 +2453,7 @@ do
local bars = {}
local nextExpire -- time of next expiring timer
local recheckTimer -- handle of timer
local currentStage = 0
local function dbmRecheckTimers()
local now = GetTime()
@@ -2542,6 +2543,10 @@ do
end
end
WeakAuras.ScanEvents("DBM_TimerUpdate", id)
elseif event == "DBM_SetStage" then
local mod, modId, stage = ...
currentStage = stage
WeakAuras.ScanEvents("DBM_SetStage", ...)
else -- DBM_Announce
WeakAuras.ScanEvents(event, ...)
end
@@ -2583,6 +2588,10 @@ do
return true
end
function WeakAuras.GetDBMStage()
return currentStage
end
function WeakAuras.GetDBMTimerById(id)
return bars[id]
end