4 local format = string.format;
5 local ssub = string.sub;
6 local GetActionInfo, GetActionTexture = GetActionInfo, GetActionTexture;
7 local GetActionLossOfControlCooldown = GetActionLossOfControlCooldown;
8 local GetActionCooldown, GetActionCharges = GetActionCooldown, GetActionCharges;
9 local GetActionText, GetBindingKey = GetActionText, GetBindingKey;
10 local IsConsumableAction, IsStackableAction = IsConsumableAction, IsStackableAction;
11 local IsItemAction, GetActionCount = IsItemAction, GetActionCount;
12 local IsSpellOverlayed, GetMacroSpell = IsSpellOverlayed, GetMacroSpell;
13 local IsMounted = IsMounted;
14 local HasAction, IsUsableAction = HasAction, IsUsableAction;
15 local IsCurrentAction, IsAutoRepeatAction = IsCurrentAction, IsAutoRepeatAction;
16 local CreateFrame = CreateFrame;
17 local RegisterStateDriver = RegisterStateDriver;
18 local CooldownFrame_Set, CooldownFrame_Clear = CooldownFrame_Set, CooldownFrame_Clear;
19 local GameTooltip = GameTooltip;
20 local GameTooltip_SetDefaultAnchor = GameTooltip_SetDefaultAnchor;
21 local COOLDOWN_TYPE_LOSS_OF_CONTROL = COOLDOWN_TYPE_LOSS_OF_CONTROL;
22 local COOLDOWN_TYPE_NORMAL = COOLDOWN_TYPE_NORMAL;
23 local CDTexture = "Interface\\Cooldown\\edge";
24 local locCDTexture = "Interface\\Cooldown\\edge-LoC";
26 local BUTTONLOCK = true; -- change to lock button dragging
81 -- used as bonus bars for some classes
112 local usingBonusbars = {
113 --["WARRIOR"] = {[7]=true, [8]=true, [9]=true}, -- not using stance separated actionbars
114 ["DRUID"] = {[7]=true, [8]=true, [9]=true}, -- moonkin form page is usable anyway
115 --["DRUID"] = {[7]=true, [8]=true, [9]=true,[10]=true},
116 ["ROGUE"] = {[7]=true},
117 --["PRIEST"] = {[7]=true}, -- shadowform doesn't change abilities
122 ["Vildan"] = {1, 2, 3, 4,},
123 ["Gedren"] = {1, 2, 3, 4,},
124 ["Gazden"] = {1, 2, 3, 4,},
125 ["Gedran"] = {1, 2, 3, 4,},
130 local activeButtons = {};
132 local ActionBars = CreateFrame("Frame", "OmaActionBars", UIParent);
133 local inheritedFrames =
134 "SecureActionButtonTemplate,SecureHandlerDragTemplate,SecureHandlerStateTemplate";
136 local function showTooltip(secure)
137 GameTooltip_SetDefaultAnchor(GameTooltip, secure);
138 GameTooltip:SetAction(secure:GetAttribute("action"));
141 local function hideTooltip()
145 local numChargeCDs = 0;
146 local function createChargeCD(parent)
147 numChargeCDs = numChargeCDs + 1;
148 local frame = CreateFrame("Cooldown", "OmaChargeCD"..numChargeCDs, parent, "CooldownFrameTemplate");
149 frame:SetHideCountdownNumbers(false);
150 frame:SetDrawSwipe(false);
151 frame:SetAllPoints(parent);
152 frame:SetFrameStrata("TOOLTIP");
156 local function clearChargeCD(parent)
157 if parent.chargecd then CooldownFrame_Clear(parent.chargecd) end
160 local function startChargeCD(parent, start, duration, modrate)
162 return clearChargeCD(parent);
164 parent.chargecd = parent.chargecd or createChargeCD(parent);
165 CooldownFrame_Set(parent.chargecd, start, duration, true, true, modrate);
170 local function updateCooldown(button, slot)
171 -- CD update from FrameXML/ActionButton.lua
172 local locstart, locduration = GetActionLossOfControlCooldown(slot);
173 local start, duration, enable, modrate = GetActionCooldown(slot);
174 local charges, maxcharges, chargestart, chargeduration, chargemodrate = GetActionCharges(slot);
175 -- avoid as many updates as possible by checking if there's changes first
177 button.prev[1] == locstart and button.prev[2] == locduration and
178 button.prev[3] == start and button.prev[4] == duration and
179 button.prev[5] == enable and button.prev[6] == modrate and
180 button.prev[7] == charges and button.prev[8] == maxcharges and
181 button.prev[9] == chargestart and button.prev[10] == chargeduration and
182 button.prev[11] == chargemodrate then
185 button.prev = { locstart, locduration, start, duration, enable, modrate,
186 charges, maxcharges, chargestart, chargeduration, chargemodrate };
187 if (locstart + locduration) > (start + duration) then
188 if button.cd.currentCooldownType ~= COOLDOWN_TYPE_LOSS_OF_CONTROL then
189 button.cd:SetEdgeTexture(locCDTexture);
190 button.cd:SetSwipeColor(0.17, 0, 0);
191 button.cd:SetHideCountdownNumbers(true);
192 button.cd.currentCooldownType = COOLDOWN_TYPE_LOSS_OF_CONTROL;
195 CooldownFrame_Set(button.cd, locstart, locduration, true, true, modrate);
196 clearChargeCD(button);
198 if button.cd.currentCooldownType ~= COOLDOWN_TYPE_NORMAL then
199 button.cd:SetEdgeTexture(CDTexture);
200 button.cd:SetSwipeColor(0, 0, 0);
201 button.cd:SetHideCountdownNumbers(false);
202 button.cd.currentCooldownType = COOLDOWN_TYPE_NORMAL;
206 button.cd:SetScript("OnCooldownDone", redoCooldown);
208 if charges and maxcharges and maxcharges > 1 and charges < maxcharges then
209 startChargeCD(button, chargestart, chargeduration, chargemodrate);
211 clearChargeCD(button);
213 CooldownFrame_Set(button.cd, start, duration, enable, false, modrate);
217 local function redoCooldown(cd)
218 local button = cd:GetParent();
219 cd:SetScript("OnCooldownDone", nil);
220 updateCooldown(button, button.slot);
223 local function updateCount(button, slot)
224 if IsConsumableAction(slot) or IsStackableAction(slot) or
225 (not IsItemAction(slot) and GetActionCount(slot) > 0) then
226 local count = GetActionCount(slot);
228 button.count:SetText("*");
230 button.count:SetText(count);
234 local charges, maxcharges = GetActionCharges(slot);
235 if maxcharges > 1 then
236 button.count:SetText(charges);
244 local function updateUsable(button, slot)
245 local isUsable, noMana = IsUsableAction(slot);
247 button.icon:SetVertexColor(1, 1, 1);
249 button.icon:SetVertexColor(0, 0.5, 1);
251 button.icon:SetVertexColor(0.4, 0.4, 0.4);
255 local function updateState(button, slot)
256 button:SetChecked(IsCurrentAction(slot) or IsAutoRepeatAction(slot));
259 local function updateGlow(button, slot)
260 local stype, id, _ = GetActionInfo(slot);
261 if stype == "spell" and IsSpellOverlayed(id) then
263 elseif stype == "macro" then
264 local _, _, macroid = GetMacroSpell(id);
265 if macroid and IsSpellOverlayed(macroid) then
270 else -- TODO FlyoutHasSpell glow
275 local function startGlow(button, slot, spell)
276 local stype, id, _ = GetActionInfo(slot);
277 if stype == "spell" and id == spell then
279 elseif stype == "macro" then
280 local _, _, macroid = GetMacroSpell(id);
281 if macroid and macroid == spell then
285 -- TODO FlyoutHasSpell glow
288 local function stopGlow(button, slot, spell)
289 local stype, id, _ = GetActionInfo(slot);
290 if stype == "spell" and id == spell then
292 elseif stype == "macro" then
293 local _, _, macroid = GetMacroSpell(id);
294 if macroid and macroid == spell then
298 -- TODO FlyoutHasSpell glow
301 local function updateButton(button, slot)
302 if HasAction(slot) then
303 activeButtons[slot] = button;
305 button.icon:SetTexture(GetActionTexture(slot));
306 updateCooldown(button, slot);
307 updateUsable(button, slot);
308 updateState(button, slot);
309 updateCount(button, slot);
310 updateGlow(button, slot);
311 if not IsConsumableAction(slot) and not IsStackableAction(slot) then
312 button.text:SetText(ssub(GetActionText(slot) or "", 1, 4));
315 if button.hotkey.shown then button.hotkey:Show() end
317 activeButtons[slot] = nil;
318 if not button.grid then button.base:Hide() end
319 button.icon:SetTexture(nil);
322 button.hotkey:Hide();
325 button:SetChecked(false);
329 local function updateHotkeys(button)
330 local key = GetBindingKey(format("CLICK %s:LeftButton", button:GetName()));
331 if key and key ~= "" then
332 -- from LibKeyBound-1.0
334 key = key:gsub(" ", "");
335 key = key:gsub("ALT%-", "a");
336 key = key:gsub("CTRL%-", "c");
337 key = key:gsub("SHIFT%-", "s");
338 key = key:gsub("NUMPAD", "n");
339 button.hotkey:SetText(key);
340 button.hotkey.shown = true;
341 button.hotkey:Show();
343 button.hotkey.shown = nil;
344 button.hotkey:Hide();
348 local mainbartoggle = "[overridebar][possessbar][shapeshift]possess;";
349 mainbartoggle = mainbartoggle.."[bonusbar:1,stealth:1]bonusbar2;"; -- prowl
350 mainbartoggle = mainbartoggle.."[bonusbar:1]bonusbar1;[bonusbar:2]bonusbar2;"; -- cat form, unused
351 mainbartoggle = mainbartoggle.."[bonusbar:3]bonusbar3;[bonusbar:4]bonusbar4;"; -- bear form, moonkin form
352 mainbartoggle = mainbartoggle.."normal";
353 local function setupSnippets(secure, slot)
354 -- FrameXML/SecureHandlers.lua has arguments and return value
355 -- args: self, button, kind, value, ... (kind, value, ... from GetCursorInfo())
356 -- returns: kind, target, detail
357 -- or: "clear", kind, target, detail
358 -- used for Pickup* functions
359 -- some of these snippets based on LibActionButton-1.0
360 secure:SetAttribute("_ondragstart", [=[
361 return "action", self:GetAttribute("action");
363 secure:SetAttribute("_onreceivedrag", [=[
364 if not kind or not value then return nil end
365 return "action", self:GetAttribute("action");
367 -- pre-wrapper can pass a message to post-wrapper
368 secure:WrapScript(secure, "OnDragStart", [=[
369 local kind, value = GetActionInfo(self:GetAttribute("action"));
370 return "message", format("%s|%s", tostring(kind), tostring(value));
372 local kind, value = GetActionInfo(self:GetAttribute("action"));
373 if message ~= format("%s|%s", tostring(kind), tostring(value)) then
374 self:CallMethod("ActionChanged");
377 secure:WrapScript(secure, "OnReceiveDrag", [=[
378 local kind, value = GetActionInfo(self:GetAttribute("action"));
379 return "message", format("%s|%s", tostring(kind), tostring(value));
381 local kind, value = GetActionInfo(self:GetAttribute("action"));
382 if message ~= format("%s|%s", tostring(kind), tostring(value)) then
383 self:CallMethod("ActionChanged");
386 function secure:UpdateState()
387 return updateState(self, self.slot);
389 secure:WrapScript(secure, "OnClick", [=[
390 local kind, value = GetActionInfo(self:GetAttribute("action"));
391 return nil, format("%s|%s", tostring(kind), tostring(value));
393 local kind, value = GetActionInfo(self:GetAttribute("action"));
394 if message ~= format("%s|%s", tostring(kind), tostring(value)) then
395 self:CallMethod("ActionChanged");
397 self:CallMethod("UpdateState");
401 -- first action bar has possible states based on vehicle/possess etc.
402 secure:SetAttribute("origaction", slot);
403 secure:SetAttribute("_onstate-possess", [=[
404 local oldslot = self:GetAttribute("action");
405 if newstate == "possess" then
407 if HasVehicleActionBar() then
408 slot = (GetVehicleBarIndex()-1)*12+self:GetAttribute("origaction");
409 elseif HasOverrideActionBar() then
410 slot = (GetOverrideBarIndex()-1)*12+self:GetAttribute("origaction");
411 elseif HasTempShapeshiftActionBar() then
412 slot = (GetTempShapeshiftBarIndex()-1)*12+self:GetAttribute("origaction");
414 -- something wrong, just revert to normal
415 print("Possess bar index not found");
416 slot = self:GetAttribute("origaction");
418 self:SetAttribute("action", slot);
419 elseif newstate == "bonusbar1" then
420 self:SetAttribute("action", 72+self:GetAttribute("origaction"));
421 elseif newstate == "bonusbar2" then
422 self:SetAttribute("action", 84+self:GetAttribute("origaction"));
423 elseif newstate == "bonusbar3" then
424 self:SetAttribute("action", 96+self:GetAttribute("origaction"));
425 elseif newstate == "bonusbar4" then
426 --self:SetAttribute("action", 108+self:GetAttribute("origaction"));
427 -- moonkin form, don't change actionbar
428 self:SetAttribute("action", self:GetAttribute("origaction"));
430 self:SetAttribute("action", self:GetAttribute("origaction"));
432 self:CallMethod("ActionChanged", oldslot);
434 RegisterStateDriver(secure, "possess", mainbartoggle);
436 function secure:ShowButton() if HasAction(slot) then activeButtons[slot] = self end end
437 function secure:HideButton() activeButtons[slot] = nil end
438 -- all other action bar are hidden if with overridebar or vehicleui (not shapeshift, possessbar)
439 -- default Bartender4 options
440 secure:SetAttribute("_onstate-possess", [=[
441 if newstate == "possess" then
443 self:CallMethod("HideButton");
446 self:CallMethod("ShowButton");
449 RegisterStateDriver(secure, "possess", "[overridebar][vehicleui] possess; normal");
453 local function createActionBar(parent, config)
456 local bar = CreateFrame("Frame", "OmaBTBar"..config.bar, parent, "SecureFrameTemplate");
457 bar:SetPoint("TOPLEFT", parent, "BOTTOMLEFT", config.x, config.y);
460 if config.hidden then
463 for slot = config.start, config.start+config.length-1 do
464 local secure = CreateFrame("CheckButton", "OmaBT"..slot, bar, inheritedFrames);
466 if slot == config.start then
467 secure:SetPoint("TOPLEFT");
468 elseif config.columns and i % config.columns == 0 then
469 secure:SetPoint("TOPLEFT", _G["OmaBT"..(slot-config.columns)], "BOTTOMLEFT");
471 secure:SetPoint("TOPLEFT", prev, "TOPRIGHT");
473 secure:RegisterForClicks("AnyUp");
474 if not BUTTONLOCK then
475 secure:RegisterForDrag("LeftButton", "RightButton");
477 if config.nomouse then
478 secure:EnableMouse(false);
480 -- only show tooltips for bars with mouse interaction
481 secure:SetScript("OnEnter", showTooltip);
482 secure:SetScript("OnLeave", hideTooltip);
484 secure:SetWidth(config.size or 32);
485 secure:SetHeight(config.size or 32);
486 secure.base = secure:CreateTexture(nil, "BACKGROUND");
487 secure.base:SetAllPoints();
488 secure.base:SetColorTexture(0, 0, 0, 0.5);
489 secure.iconbase = secure:CreateTexture(nil, "BORDER");
490 secure.iconbase:SetPoint("TOPLEFT", secure.base, "TOPLEFT", 1, -1);
491 secure.iconbase:SetPoint("BOTTOMRIGHT", secure.base, "BOTTOMRIGHT", -1, 1);
492 secure.iconbase:SetColorTexture(0, 0, 0, 0.5);
493 secure.iconbase:Hide();
494 secure.icon = secure:CreateTexture(nil, "ARTWORK");
495 secure.icon:SetPoint("TOPLEFT", secure.iconbase, "TOPLEFT");
496 secure.icon:SetPoint("BOTTOMRIGHT", secure.iconbase, "BOTTOMRIGHT");
497 secure.icon:SetTexCoord(0.07, 0.93, 0.07, 0.93);
498 secure:SetCheckedTexture("Interface\\Buttons\\CheckButtonHilight");
499 secure.autocastable = secure:CreateTexture(nil, "OVERLAY");
500 secure.autocastable:SetPoint("CENTER");
501 secure.autocastable:SetWidth(58);
502 secure.autocastable:SetHeight(58);
503 secure.autocastable:SetTexture("Interface\\Buttons\\UI-AutoCastableOverlay");
504 secure.autocastable:Hide();
505 secure.glow = secure:CreateTexture(nil, "OVERLAY", nil, 1);
506 secure.glow:SetPoint("CENTER");
507 secure.glow:SetWidth(config.size and config.size+26 or 53);
508 secure.glow:SetHeight(config.size and config.size+26 or 53);
509 secure.glow:SetTexture("Interface\\SpellActivationOverlay\\IconAlert");
510 secure.glow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52634375);
512 secure.hotkey = secure:CreateFontString(nil, "OVERLAY", "NumberFontNormalGray");
513 secure.hotkey:SetPoint("TOPRIGHT", secure, "TOPRIGHT", 2, -1);
514 secure.count = secure:CreateFontString(nil, "OVERLAY", "NumberFontNormal");
515 secure.count:SetPoint("BOTTOMRIGHT", secure, "BOTTOMRIGHT", 2, -1);
516 secure.text = secure:CreateFontString(nil, "OVERLAY", "NumberFontNormal");
517 secure.text:SetPoint("BOTTOMLEFT", secure, "BOTTOMLEFT", 2, -1);
519 secure.cd = CreateFrame("Cooldown", "OmaBTCD"..slot, secure, "CooldownFrameTemplate");
520 secure.cd:SetAllPoints();
521 secure:SetAttribute("type", "action");
522 secure:SetAttribute("action", slot);
523 if config.flyout then
524 secure:SetAttribute("flyoutDirection", config.flyout);
526 function secure:ActionChanged(oldslot)
528 activeButtons[oldslot] = nil;
529 self.prev = nil; -- invalidate previous CD when slot changes
531 self.slot = self:GetAttribute("action");
532 return updateButton(self, self.slot);
534 secure:ActionChanged(); -- initial update
535 setupSnippets(secure, slot);
536 updateHotkeys(secure);
537 buttons[slot] = secure;
543 local function initialize()
544 local _, class = UnitClass("player");
545 local name, realm = UnitFullName("player");
546 ActionBars:SetFrameStrata("LOW");
547 ActionBars:SetPoint("BOTTOMLEFT");
548 ActionBars:SetWidth(1);
549 ActionBars:SetHeight(1);
550 for _, config in pairs(settings) do
551 if (not usingBonusbars[class] or not usingBonusbars[class][config.bar]) and
552 (not chars[realm] or not chars[realm][name] or chars[realm][name][config.bar]) then
553 createActionBar(ActionBars, config);
558 local function setupBindings()
559 _G["BINDING_HEADER_OmaAB"] = "Oma Action Bar";
561 _G["BINDING_HEADER_OMAABBLANK"..i] = "Bar "..i;
563 _G[format("BINDING_NAME_CLICK OmaBT%d:LeftButton", (i-1)*12+j)] = format("Bar %d Button %d", i, j);
568 local mounted = false;
571 ["ACTIONBAR_UPDATE_COOLDOWN"] = function()
572 for _, button in pairs(activeButtons) do
573 updateCooldown(button, button.slot);
576 ["SPELL_UPDATE_CHARGES"] = function()
577 for _, button in pairs(activeButtons) do
578 updateCount(button, button.slot);
581 ["ACTIONBAR_SLOT_CHANGED"] = function(slot)
582 if buttons[slot] then buttons[slot]:ActionChanged() end
584 ["ACTIONBAR_SHOWGRID"] = function()
585 for _, button in pairs(buttons) do
587 button.iconbase:Show();
588 if not activeButtons[button.slot] then button.base:Show() end
591 ["ACTIONBAR_HIDEGRID"] = function()
592 for _, button in pairs(buttons) do
594 button.iconbase:Hide();
595 if not activeButtons[button.slot] then button.base:Hide() end
598 ["ACTIONBAR_UPDATE_STATE"] = function()
599 for _, button in pairs(activeButtons) do
600 updateState(button, button.slot);
603 ["ACTIONBAR_UPDATE_USABLE"] = function()
604 for _, button in pairs(activeButtons) do
605 updateUsable(button, button.slot);
608 ["UPDATE_OVERRIDE_ACTIONBAR"] = function()
609 if buttons[1] then -- called before PLAYER_LOGIN
610 for _, button in pairs(buttons) do
611 updateButton(button, button.slot);
615 ["START_AUTOREPEAT_SPELL"] = function()
616 for _, button in pairs(activeButtons) do
617 if IsAutoRepeatAction(button.slot) then
618 button.autorepeating = true;
619 button.icon:SetVertexColor(0, 1, 0.5);
623 ["STOP_AUTOREPEAT_SPELL"] = function()
624 for _, button in pairs(activeButtons) do
625 if button.autorepeating then
626 button.autorepeating = nil;
627 updateUsable(button, button.slot);
631 ["SPELL_ACTIVATION_OVERLAY_GLOW_SHOW"] = function(spell)
632 -- TODO create mapping from spellIDs to buttons
633 for _, button in pairs(activeButtons) do
634 startGlow(button, button.slot, spell);
637 ["SPELL_ACTIVATION_OVERLAY_GLOW_HIDE"] = function(spell)
638 -- TODO create mapping from spellIDs to buttons
639 for _, button in pairs(activeButtons) do
640 stopGlow(button, button.slot, spell);
643 ["UPDATE_BINDINGS"] = function()
644 for _, button in pairs(buttons) do
645 updateHotkeys(button);
648 ["UNIT_AURA"] = function(unit)
649 -- using UNIT_AURA instead of COMPANION_UPDATE to not update every time
650 -- someone mounts, tracking player mount status with COMPANION_UPDATE is
652 if (not mounted and IsMounted()) or (mounted and not IsMounted()) then
653 mounted = not mounted;
654 for _, button in pairs(activeButtons) do
655 updateState(button, button.slot);
659 ["UPDATE_ALL_BUTTONS"] = function()
660 for _, button in pairs(buttons) do
661 updateButton(button, button.slot);
664 ["PLAYER_LOGIN"] = function()
665 GameTooltip = _G["GameTooltip"];
668 ["ADDON_LOADED"] = function(addon)
669 if addon == "OmaAB" then
671 ActionBars:UnregisterEvent("ADDON_LOADED");
675 events["LOSS_OF_CONTROL_ADDED"] = events["ACTIONBAR_UPDATE_COOLDOWN"];
676 events["LOSS_OF_CONTROL_UPDATE"] = events["ACTIONBAR_UPDATE_COOLDOWN"]; -- TODO might change once tooltips are in
677 events["PLAYER_MOUNT_DISPLAY_CHANGED"] = events["ACTIONBAR_UPDATE_USABLE"];
678 events["TRADE_SKILL_SHOW"] = events["ACTIONBAR_UPDATE_STATE"];
679 events["TRADE_SKILL_CLOSE"] = events["ACTIONBAR_UPDATE_STATE"];
680 events["ARCHAEOLOGY_CLOSED"] = events["ACTIONBAR_UPDATE_STATE"];
681 events["PLAYER_ENTERING_WORLD"] = events["UPDATE_ALL_BUTTONS"];
682 events["UPDATE_VEHICLE_ACTIONBAR"] = events["UPDATE_ALL_BUTTONS"];
683 events["UPDATE_SHAPESHIFT_FORM"] = events["UPDATE_ALL_BUTTONS"];
684 events["SPELL_UPDATE_ICON"] = events["UPDATE_ALL_BUTTONS"];
685 events["PET_STABLE_UPDATE"] = events["UPDATE_ALL_BUTTONS"];
686 events["PET_STABLE_SHOW"] = events["UPDATE_ALL_BUTTONS"];
687 events["PLAYER_SPECIALIZATION_CHANGED"] = events["UPDATE_ALL_BUTTONS"];
688 events["UNIT_ENTERED_VEHICLE"] = function(unit)
689 if unit == "player" then events["ACTIONBAR_UPDATE_STATE"]() end
691 events["UNIT_EXITED_VEHICLE"] = events["UNIT_ENTERED_VEHICLE"];
693 ActionBars:RegisterEvent("ADDON_LOADED");
694 ActionBars:RegisterEvent("PLAYER_LOGIN");
695 ActionBars:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN");
696 ActionBars:RegisterEvent("ACTIONBAR_UPDATE_USABLE");
697 ActionBars:RegisterEvent("ACTIONBAR_UPDATE_STATE");
698 ActionBars:RegisterEvent("ACTIONBAR_SLOT_CHANGED");
699 ActionBars:RegisterEvent("ACTIONBAR_SHOWGRID");
700 ActionBars:RegisterEvent("ACTIONBAR_HIDEGRID");
701 ActionBars:RegisterEvent("SPELL_UPDATE_ICON");
702 ActionBars:RegisterEvent("SPELL_UPDATE_CHARGES");
703 ActionBars:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_SHOW");
704 ActionBars:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_HIDE");
705 ActionBars:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR");
706 ActionBars:RegisterEvent("UPDATE_OVERRIDE_ACTIONBAR");
707 ActionBars:RegisterEvent("PLAYER_MOUNT_DISPLAY_CHANGED");
708 ActionBars:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED");
709 ActionBars:RegisterEvent("UNIT_ENTERED_VEHICLE");
710 ActionBars:RegisterEvent("UNIT_EXITED_VEHICLE");
711 ActionBars:RegisterEvent("PET_STABLE_UPDATE");
712 ActionBars:RegisterEvent("PET_STABLE_SHOW");
713 ActionBars:RegisterEvent("UPDATE_BINDINGS");
714 ActionBars:RegisterUnitEvent("UNIT_AURA", "player");
715 ActionBars:SetScript("OnEvent", function(self, event, arg1)