Skip to content

Commit 424d35f

Browse files
committed
Bars: Midnight updates
1 parent 2196315 commit 424d35f

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.luacheckrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ files["Plugins/AutoReply.lua"].ignore = {
112112
}
113113
files["Plugins/Bars.lua"].ignore = {
114114
"113/C_Spell",
115+
"113/C_EncounterTimeline",
115116
}
116117
files["Plugins/BattleRes.lua"].ignore = {
117118
"113/C_ClassColor",

Plugins/Bars.lua

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,28 +1629,29 @@ end)
16291629
-- 12.0 Midnight
16301630
--
16311631

1632-
function plugin:ENCOUNTER_TIMELINE_EVENT_ADDED(_, eventInfo, initialState)
1632+
function plugin:ENCOUNTER_TIMELINE_EVENT_ADDED(_, eventInfo)
16331633
-- Not Secrets
16341634
local eventID = eventInfo.id
16351635
local duration = eventInfo.duration
16361636
local source = eventInfo.source
1637-
local state = initialState -- 0 = Running, 1 = Paused
1637+
local state = C_EncounterTimeline.GetEventState(eventID) -- 0 = Running, 1 = Paused
16381638

16391639
-- Secrets
1640-
local spellId = eventInfo.tooltipSpellID
1641-
local spellName = C_Spell.GetSpellName(spellId)
1640+
local spellId = eventInfo.spellID
1641+
local spellName = eventInfo.spellName
16421642
local iconId = eventInfo.iconFileID
1643-
local dispelType = eventInfo.dispelType
1644-
local role = eventInfo.role
1645-
local priority = eventInfo.priority
1643+
-- local dispelType = eventInfo.dispelType
1644+
-- local role = eventInfo.role
1645+
-- local priority = eventInfo.priority
16461646
self:BigWigs_StartBar(nil, nil, eventID, spellName, duration, iconId, nil, nil, true)
16471647

16481648
if state == 1 then -- Starting Paused
16491649
self:PauseSecretBar(eventID)
16501650
end
16511651
end
16521652

1653-
function plugin:ENCOUNTER_TIMELINE_EVENT_STATE_CHANGED(_, eventID, newState)
1653+
function plugin:ENCOUNTER_TIMELINE_EVENT_STATE_CHANGED(_, eventID)
1654+
local newState = C_EncounterTimeline.GetEventState(eventID) -- 0 = Running, 1 = Paused
16541655
if newState == 0 then -- Resumed
16551656
self:ResumeSecretBar(eventID)
16561657
elseif newState == 1 then -- Paused

0 commit comments

Comments
 (0)