@@ -212,12 +212,6 @@ function AB:HandleZoneAbility()
212
212
if not ZoneAbilityFrame then return end
213
213
214
214
if not extraHooked [ZoneAbilityFrame ] then
215
- ZoneAbilityHolder = CreateFrame (' Frame' , nil , E .UIParent )
216
- ZoneAbilityHolder :Point (' BOTTOM' , E .UIParent , ' BOTTOM' , 150 , 300 )
217
- E .FrameLocks [ZoneAbilityHolder ] = true
218
-
219
- E :CreateMover (ZoneAbilityHolder , ' ZoneAbility' , L [" Zone Ability" ], nil , nil , nil , ' ALL,ACTIONBARS' , nil , ' actionbar,extraButtons,extraActionButton' )
220
-
221
215
ZoneAbilityFrame .SpellButtonContainer .holder = ZoneAbilityHolder
222
216
ZoneAbilityFrame .SpellButtonContainer :HookScript (' OnEnter' , AB .ExtraButtons_OnEnter )
223
217
ZoneAbilityFrame .SpellButtonContainer :HookScript (' OnLeave' , AB .ExtraButtons_OnLeave )
@@ -233,21 +227,16 @@ function AB:HandleZoneAbility()
233
227
ZoneAbilityFrame :SetAllPoints ()
234
228
ZoneAbilityFrame .ignoreInLayout = true
235
229
236
- -- Spawn the mover before its available.
237
- ZoneAbilityHolder :Size (52 * E .db .actionbar .zoneActionButton .scale )
230
+ if ZoneAbilityHolder then
231
+ ZoneAbilityHolder :Size (52 * E .db .actionbar .zoneActionButton .scale )
232
+ end
238
233
end
239
234
240
235
function AB :HandleExtraAbility ()
241
236
local ExtraAbilityContainer = _G .ExtraAbilityContainer
242
237
if not ExtraAbilityContainer then return end
243
238
244
239
if not extraHooked [ExtraAbilityContainer ] then
245
- ExtraActionBarHolder = CreateFrame (' Frame' , nil , E .UIParent )
246
- ExtraActionBarHolder :Point (' BOTTOM' , E .UIParent , ' BOTTOM' , - 150 , 300 )
247
- E .FrameLocks [ExtraActionBarHolder ] = true
248
-
249
- E :CreateMover (ExtraActionBarHolder , ' BossButton' , L [" Boss Button" ], nil , nil , nil , ' ALL,ACTIONBARS' , nil , ' actionbar,extraButtons,extraActionButton' )
250
-
251
240
-- try to shutdown the container movement and taints
252
241
ExtraAbilityContainer :KillEditMode ()
253
242
ExtraAbilityContainer :SetScript (' OnShow' , nil )
@@ -261,7 +250,27 @@ function AB:HandleExtraAbility()
261
250
end
262
251
end
263
252
253
+ function AB :CreateExtraHolders ()
254
+ if not ExtraActionBarHolder then
255
+ ExtraActionBarHolder = CreateFrame (' Frame' , nil , E .UIParent )
256
+ ExtraActionBarHolder :Point (' BOTTOM' , E .UIParent , ' BOTTOM' , - 150 , 300 )
257
+ E .FrameLocks [ExtraActionBarHolder ] = true
258
+
259
+ E :CreateMover (ExtraActionBarHolder , ' BossButton' , L [" Boss Button" ], nil , nil , nil , ' ALL,ACTIONBARS' , nil , ' actionbar,extraButtons,extraActionButton' )
260
+ end
261
+
262
+ if not ZoneAbilityHolder then
263
+ ZoneAbilityHolder = CreateFrame (' Frame' , nil , E .UIParent )
264
+ ZoneAbilityHolder :Point (' BOTTOM' , E .UIParent , ' BOTTOM' , 150 , 300 )
265
+ E .FrameLocks [ZoneAbilityHolder ] = true
266
+
267
+ E :CreateMover (ZoneAbilityHolder , ' ZoneAbility' , L [" Zone Ability" ], nil , nil , nil , ' ALL,ACTIONBARS' , nil , ' actionbar,extraButtons,extraActionButton' )
268
+ end
269
+ end
270
+
264
271
function AB :SetupExtraButton ()
272
+ AB :CreateExtraHolders ()
273
+
265
274
if _G .ZoneAbilityFrame then
266
275
AB :HandleZoneAbility ()
267
276
end
@@ -286,6 +295,7 @@ function AB:UpdateExtraBindings()
286
295
287
296
for _ , button in pairs (extraBtns ) do
288
297
button .HotKey :SetText (GetBindingKey (button .commandName ))
298
+
289
299
AB :FixKeybindText (button )
290
300
AB :FixKeybindColor (button )
291
301
end
0 commit comments