22-- Module Declaration
33--
44
5- local mod = BigWigs :NewBoss (" Nullaeus" , 2966 )
5+ local mod , CL = BigWigs :NewBoss (" Nullaeus" , 2966 )
66if not mod then return end
7- mod :SetEncounterID ({3372 , 3430 })
7+ mod :SetEncounterID ({3372 , 3430 }) -- Tier 8, Tier 11
88mod :SetAllowWin (true )
9- -- TODO private auras, EncounterEvents
9+ mod :SetRespawnTime (15 )
10+ mod :SetPrivateAuraSounds ({
11+ {1256045 , sound = " underyou" }, -- Null Zone
12+ {1256167 , sound = " underyou" }, -- Void Hole
13+ {1256358 , sound = " none" }, -- Devouring Essence
14+ {1256366 , sound = " none" }, -- Jagged Rip
15+ {1256518 , sound = " none" }, -- Poisonous Spit
16+ {1256526 , sound = " info" }, -- Curse of Hesitation
17+ })
18+
19+ ---- ----------------------------------------------------------------------------
20+ -- Locals
21+ --
22+
23+ local emptinessOfTheVoidCount = 1
24+ local implodingStrikeCount = 1
25+ local devouringEssenceCount = 1
26+ local addsCount = 1
27+ local activeBars = {}
1028
1129---- ----------------------------------------------------------------------------
1230-- Localization
@@ -15,6 +33,7 @@ mod:SetAllowWin(true)
1533local L = mod :GetLocale ()
1634if L then
1735 L .nullaeus = " Nullaeus"
36+ L .adds_icon = " inv_babyvoidwalker_silver"
1837end
1938
2039---- ----------------------------------------------------------------------------
2746
2847function mod :GetOptions ()
2948 return {
49+ 1280086 , -- Emptiness of the Void
50+ 1280087 , -- Imploding Strike
51+ 1280088 , -- Devouring Essence
52+ " adds" ,
53+ {1256045 , " PRIVATE" }, -- Null Zone
54+ {1256167 , " PRIVATE" }, -- Void Hole
55+ -- {1256358, "PRIVATE"}, -- Devouring Essence
56+ {1256366 , " PRIVATE" }, -- Jagged Rip
57+ {1256518 , " PRIVATE" }, -- Poisonous Spit
58+ {1256526 , " PRIVATE" }, -- Curse of Hesitation
3059 }
3160end
61+
62+ mod :UseCustomTimers (true )
63+ function mod :OnEncounterStart ()
64+ emptinessOfTheVoidCount = 1
65+ implodingStrikeCount = 1
66+ devouringEssenceCount = 1
67+ addsCount = 1
68+ activeBars = {}
69+ if self :ShouldShowBars () then
70+ self :RegisterEvent (" ENCOUNTER_TIMELINE_EVENT_ADDED" )
71+ self :RegisterEvent (" ENCOUNTER_TIMELINE_EVENT_STATE_CHANGED" )
72+ self :RegisterEvent (" ENCOUNTER_TIMELINE_EVENT_REMOVED" )
73+ end
74+ end
75+
76+ ---- ----------------------------------------------------------------------------
77+ -- Timeline Event Handlers
78+ --
79+
80+ function mod :ENCOUNTER_TIMELINE_EVENT_ADDED (_ , eventInfo )
81+ if eventInfo .source ~= 0 then return end -- Enum.EncounterTimelineEventSource.Encounter
82+ local duration = self :RoundNumber (eventInfo .duration , 1 )
83+ local barInfo
84+ if duration == 7 or duration == 21 or duration == 21.3 then -- Emptiness of the Void
85+ barInfo = self :EmptinessOfTheVoidTimeline (eventInfo )
86+ elseif duration == 12 or duration == 15.5 or duration == 15.8 then -- Imploding Strike
87+ -- this is only cast if a tank is the leader
88+ barInfo = self :ImplodingStrikeTimeline (eventInfo )
89+ elseif duration == 16 or duration == 18.5 or duration == 18.8 then -- Devouring Essence
90+ barInfo = self :DevouringEssenceTimeline (eventInfo )
91+ elseif not self :IsWiping () then
92+ self :ErrorForTimelineEvent (eventInfo )
93+ end
94+ if barInfo then
95+ activeBars [eventInfo .id ] = barInfo
96+ end
97+ end
98+
99+ function mod :ENCOUNTER_TIMELINE_EVENT_STATE_CHANGED (_ , eventID )
100+ local barInfo = activeBars [eventID ]
101+ if barInfo then
102+ local state = C_EncounterTimeline .GetEventState (eventID )
103+ if state == 0 then -- Active
104+ self :ResumeBar (barInfo .key , barInfo .msg )
105+ elseif state == 1 then -- Paused
106+ -- bars pausing means adds are spawning (and also just stop the bars)
107+ self :StopBar (barInfo .msg )
108+ self :Adds ()
109+ elseif state == 2 then -- Finished
110+ self :StopBar (barInfo .msg )
111+ if barInfo .callback then
112+ barInfo .callback ()
113+ end
114+ activeBars [eventID ] = nil
115+ elseif state == 3 then -- Canceled
116+ self :StopBar (barInfo .msg )
117+ activeBars [eventID ] = nil
118+ end
119+ end
120+ end
121+
122+ function mod :ENCOUNTER_TIMELINE_EVENT_REMOVED (_ , eventID )
123+ local barInfo = activeBars [eventID ]
124+ if barInfo then
125+ self :StopBar (barInfo .msg )
126+ activeBars [eventID ] = nil
127+ end
128+ end
129+
130+ ---- ----------------------------------------------------------------------------
131+ -- Timeline Ability Handlers
132+ --
133+
134+ function mod :EmptinessOfTheVoidTimeline (eventInfo )
135+ local barText = CL .count :format (self :SpellName (1280086 ), emptinessOfTheVoidCount )
136+ self :CDBar (1280086 , eventInfo .duration , barText , nil , eventInfo .id )
137+ if emptinessOfTheVoidCount > 1 then
138+ self :Message (1280086 , " red" , CL .casting :format (CL .count :format (self :SpellName (1280086 ), emptinessOfTheVoidCount - 1 )))
139+ self :PlaySound (1280086 , " warning" )
140+ end
141+ emptinessOfTheVoidCount = emptinessOfTheVoidCount + 1
142+ return {
143+ msg = barText ,
144+ key = 1280086 ,
145+ }
146+ end
147+
148+ function mod :ImplodingStrikeTimeline (eventInfo )
149+ local barText = CL .count :format (self :SpellName (1280087 ), implodingStrikeCount )
150+ self :CDBar (1280087 , eventInfo .duration , barText , nil , eventInfo .id )
151+ if implodingStrikeCount > 1 then
152+ self :Message (1280087 , " orange" , CL .count :format (self :SpellName (1280087 ), implodingStrikeCount - 1 ))
153+ self :PlaySound (1280087 , " alarm" )
154+ end
155+ implodingStrikeCount = implodingStrikeCount + 1
156+ return {
157+ msg = barText ,
158+ key = 1280087
159+ }
160+ end
161+
162+ function mod :DevouringEssenceTimeline (eventInfo )
163+ local barText = CL .count :format (self :SpellName (1280088 ), devouringEssenceCount )
164+ self :CDBar (1280088 , eventInfo .duration , barText , nil , eventInfo .id )
165+ if devouringEssenceCount > 1 then
166+ self :Message (1280088 , " yellow" , CL .count :format (self :SpellName (1280088 ), devouringEssenceCount - 1 ))
167+ self :PlaySound (1280088 , " info" )
168+ end
169+ devouringEssenceCount = devouringEssenceCount + 1
170+ return {
171+ msg = barText ,
172+ key = 1280088 ,
173+ }
174+ end
175+
176+ do
177+ local prev = 0
178+ function mod :Adds ()
179+ if GetTime () - prev > 2 then
180+ prev = GetTime ()
181+ self :Message (" adds" , " cyan" , CL .count_amount :format (CL .adds_spawning , addsCount , 3 ), L .adds_icon )
182+ addsCount = addsCount + 1
183+ self :PlaySound (" adds" , " long" )
184+ end
185+ end
186+ end
0 commit comments