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
80 -- used as bonus bars for some classes
111 local usingBonusbars = {
112 --["WARRIOR"] = {[7]=true, [8]=true, [9]=true}, -- not using stance separated actionbars
113 ["DRUID"] = {[7]=true, [8]=true, [9]=true}, -- moonkin form page is usable anyway
114 --["DRUID"] = {[7]=true, [8]=true, [9]=true,[10]=true},
115 ["ROGUE"] = {[7]=true},
116 --["PRIEST"] = {[7]=true}, -- shadowform doesn't change abilities
121 ["Vildana"] = {1, 2, 3, 4,},
124 ["Vildan"] = {1, 2, 3, 4,},
125 ["Gedren"] = {1, 2, 3, 4,},
126 ["Gazden"] = {1, 2, 3, 4,},
127 ["Gedran"] = {1, 2, 3, 4,},
128 ["Iled"] = {1, 2, 3, 4,},
129 ["Gilden"] = {1, 2, 3, 4,},
130 ["Gran"] = {1, 2, 3, 4,},
131 ["Gedrin"] = {1, 2, 3, 4,},
136 local activeButtons = {};
138 local ActionBars = CreateFrame("Frame", "OmaActionBars", UIParent);
139 local inheritedFrames =
140 "SecureActionButtonTemplate,SecureHandlerDragTemplate,SecureHandlerStateTemplate";
142 local function showTooltip(secure)
143 GameTooltip_SetDefaultAnchor(GameTooltip, secure);
144 GameTooltip:SetAction(secure:GetAttribute("action"));
147 local function hideTooltip()
151 local numChargeCDs = 0;
152 local function createChargeCD(parent)
153 numChargeCDs = numChargeCDs + 1;
154 local frame = CreateFrame("Cooldown", "OmaChargeCD"..numChargeCDs, parent, "CooldownFrameTemplate");
155 frame:SetHideCountdownNumbers(false);
156 frame:SetDrawSwipe(false);
157 frame:SetAllPoints(parent);
158 frame:SetFrameStrata("TOOLTIP");
162 local function clearChargeCD(parent)
163 if parent.chargecd then CooldownFrame_Clear(parent.chargecd) end
166 local function startChargeCD(parent, start, duration, modrate)
168 return clearChargeCD(parent);
170 parent.chargecd = parent.chargecd or createChargeCD(parent);
171 CooldownFrame_Set(parent.chargecd, start, duration, true, true, modrate);
176 local function updateCooldown(button, slot)
177 -- CD update from FrameXML/ActionButton.lua
178 local locstart, locduration = GetActionLossOfControlCooldown(slot);
179 local start, duration, enable, modrate = GetActionCooldown(slot);
180 local charges, maxcharges, chargestart, chargeduration, chargemodrate = GetActionCharges(slot);
181 -- avoid as many updates as possible by checking if there's changes first
183 button.prev[1] == locstart and button.prev[2] == locduration and
184 button.prev[3] == start and button.prev[4] == duration and
185 button.prev[5] == enable and button.prev[6] == modrate and
186 button.prev[7] == charges and button.prev[8] == maxcharges and
187 button.prev[9] == chargestart and button.prev[10] == chargeduration and
188 button.prev[11] == chargemodrate then
191 button.prev = { locstart, locduration, start, duration, enable, modrate,
192 charges, maxcharges, chargestart, chargeduration, chargemodrate };
193 if (locstart + locduration) > (start + duration) then
194 if button.cd.currentCooldownType ~= COOLDOWN_TYPE_LOSS_OF_CONTROL then
195 button.cd:SetEdgeTexture(locCDTexture);
196 button.cd:SetSwipeColor(0.17, 0, 0);
197 button.cd:SetHideCountdownNumbers(true);
198 button.cd.currentCooldownType = COOLDOWN_TYPE_LOSS_OF_CONTROL;
201 CooldownFrame_Set(button.cd, locstart, locduration, true, true, modrate);
202 clearChargeCD(button);
204 if button.cd.currentCooldownType ~= COOLDOWN_TYPE_NORMAL then
205 button.cd:SetEdgeTexture(CDTexture);
206 button.cd:SetSwipeColor(0, 0, 0);
207 button.cd:SetHideCountdownNumbers(false);
208 button.cd.currentCooldownType = COOLDOWN_TYPE_NORMAL;
212 button.cd:SetScript("OnCooldownDone", redoCooldown);
214 if charges and maxcharges and maxcharges > 1 and charges < maxcharges then
215 startChargeCD(button, chargestart, chargeduration, chargemodrate);
217 clearChargeCD(button);
219 CooldownFrame_Set(button.cd, start, duration, enable, false, modrate);
223 local function redoCooldown(cd)
224 local button = cd:GetParent();
225 cd:SetScript("OnCooldownDone", nil);
226 updateCooldown(button, button.slot);
229 local function updateCount(button, slot)
230 if IsConsumableAction(slot) or IsStackableAction(slot) or
231 (not IsItemAction(slot) and GetActionCount(slot) > 0) then
232 local count = GetActionCount(slot);
234 button.count:SetText("*");
236 button.count:SetText(count);
240 local charges, maxcharges = GetActionCharges(slot);
241 if maxcharges > 1 then
242 button.count:SetText(charges);
250 local function updateUsable(button, slot)
251 local isUsable, noMana = IsUsableAction(slot);
253 button.icon:SetVertexColor(1, 1, 1);
255 button.icon:SetVertexColor(0, 0.5, 1);
257 button.icon:SetVertexColor(0.4, 0.4, 0.4);
261 local function updateState(button, slot)
262 button:SetChecked(IsCurrentAction(slot) or IsAutoRepeatAction(slot));
265 local function updateGlow(button, slot)
266 local stype, id = GetActionInfo(slot);
267 if stype == "spell" and IsSpellOverlayed(id) then
269 elseif stype == "macro" then
270 local macroid = GetMacroSpell(id);
271 if macroid and IsSpellOverlayed(macroid) then
276 else -- TODO FlyoutHasSpell glow
281 local function startGlow(button, slot, spell)
282 local stype, id = GetActionInfo(slot);
283 if stype == "spell" and id == spell then
285 elseif stype == "macro" then
286 local macroid = GetMacroSpell(id);
287 if macroid and macroid == spell then
291 -- TODO FlyoutHasSpell glow
294 local function stopGlow(button, slot, spell)
295 local stype, id = GetActionInfo(slot);
296 if stype == "spell" and id == spell then
298 elseif stype == "macro" then
299 local macroid = GetMacroSpell(id);
300 if macroid and macroid == spell then
304 -- TODO FlyoutHasSpell glow
307 local function updateButton(button, slot)
308 if HasAction(slot) then
309 activeButtons[slot] = button;
311 button.icon:SetTexture(GetActionTexture(slot));
312 updateCooldown(button, slot);
313 updateUsable(button, slot);
314 updateState(button, slot);
315 updateCount(button, slot);
316 updateGlow(button, slot);
317 if not IsConsumableAction(slot) and not IsStackableAction(slot) then
318 button.text:SetText(ssub(GetActionText(slot) or "", 1, 4));
321 if button.hotkey.shown then button.hotkey:Show() end
323 activeButtons[slot] = nil;
324 if not button.grid then button.base:Hide() end
325 button.icon:SetTexture(nil);
328 button.hotkey:Hide();
331 button:SetChecked(false);
335 local function updateHotkeys(button)
336 local key = GetBindingKey(format("CLICK %s:LeftButton", button:GetName()));
337 if key and key ~= "" then
338 -- from LibKeyBound-1.0
340 key = key:gsub(" ", "");
341 key = key:gsub("ALT%-", "a");
342 key = key:gsub("CTRL%-", "c");
343 key = key:gsub("SHIFT%-", "s");
344 key = key:gsub("NUMPAD", "n");
345 button.hotkey:SetText(key);
346 button.hotkey.shown = true;
347 button.hotkey:Show();
349 button.hotkey.shown = nil;
350 button.hotkey:Hide();
354 local mainbartoggle = "[overridebar][possessbar][shapeshift]possess;";
355 mainbartoggle = mainbartoggle.."[bonusbar:1,stealth:1]bonusbar2;"; -- prowl
356 mainbartoggle = mainbartoggle.."[bonusbar:1]bonusbar1;[bonusbar:2]bonusbar2;"; -- cat form, unused
357 mainbartoggle = mainbartoggle.."[bonusbar:3]bonusbar3;[bonusbar:4]bonusbar4;"; -- bear form, moonkin form
358 mainbartoggle = mainbartoggle.."normal";
359 local function setupSnippets(secure, slot)
360 -- FrameXML/SecureHandlers.lua has arguments and return value
361 -- args: self, button, kind, value, ... (kind, value, ... from GetCursorInfo())
362 -- returns: kind, target, detail
363 -- or: "clear", kind, target, detail
364 -- used for Pickup* functions
365 -- some of these snippets based on LibActionButton-1.0
366 secure:SetAttribute("_ondragstart", [=[
367 return "action", self:GetAttribute("action");
369 secure:SetAttribute("_onreceivedrag", [=[
370 if not kind or not value then return nil end
371 return "action", self:GetAttribute("action");
373 -- pre-wrapper can pass a message to post-wrapper
374 secure:WrapScript(secure, "OnDragStart", [=[
375 local kind, value = GetActionInfo(self:GetAttribute("action"));
376 return "message", format("%s|%s", tostring(kind), tostring(value));
378 local kind, value = GetActionInfo(self:GetAttribute("action"));
379 if message ~= format("%s|%s", tostring(kind), tostring(value)) then
380 self:CallMethod("ActionChanged");
383 secure:WrapScript(secure, "OnReceiveDrag", [=[
384 local kind, value = GetActionInfo(self:GetAttribute("action"));
385 return "message", format("%s|%s", tostring(kind), tostring(value));
387 local kind, value = GetActionInfo(self:GetAttribute("action"));
388 if message ~= format("%s|%s", tostring(kind), tostring(value)) then
389 self:CallMethod("ActionChanged");
392 function secure:UpdateState()
393 return updateState(self, self.slot);
395 secure:WrapScript(secure, "OnClick", [=[
396 local kind, value = GetActionInfo(self:GetAttribute("action"));
397 return nil, format("%s|%s", tostring(kind), tostring(value));
399 local kind, value = GetActionInfo(self:GetAttribute("action"));
400 if message ~= format("%s|%s", tostring(kind), tostring(value)) then
401 self:CallMethod("ActionChanged");
403 self:CallMethod("UpdateState");
407 -- first action bar has possible states based on vehicle/possess etc.
408 secure:SetAttribute("origaction", slot);
409 secure:SetAttribute("_onstate-possess", [=[
410 local oldslot = self:GetAttribute("action");
411 if newstate == "possess" then
413 if HasVehicleActionBar() then
414 slot = (GetVehicleBarIndex()-1)*12+self:GetAttribute("origaction");
415 elseif HasOverrideActionBar() then
416 slot = (GetOverrideBarIndex()-1)*12+self:GetAttribute("origaction");
417 elseif HasTempShapeshiftActionBar() then
418 slot = (GetTempShapeshiftBarIndex()-1)*12+self:GetAttribute("origaction");
420 -- something wrong, just revert to normal
421 print("Possess bar index not found");
422 slot = self:GetAttribute("origaction");
424 self:SetAttribute("action", slot);
425 elseif newstate == "bonusbar1" then
426 self:SetAttribute("action", 72+self:GetAttribute("origaction"));
427 elseif newstate == "bonusbar2" then
428 self:SetAttribute("action", 84+self:GetAttribute("origaction"));
429 elseif newstate == "bonusbar3" then
430 self:SetAttribute("action", 96+self:GetAttribute("origaction"));
431 elseif newstate == "bonusbar4" then
432 --self:SetAttribute("action", 108+self:GetAttribute("origaction"));
433 -- moonkin form, don't change actionbar
434 self:SetAttribute("action", self:GetAttribute("origaction"));
436 self:SetAttribute("action", self:GetAttribute("origaction"));
438 self:CallMethod("ActionChanged", oldslot);
440 RegisterStateDriver(secure, "possess", mainbartoggle);
442 function secure:ShowButton() if HasAction(slot) then activeButtons[slot] = self end end
443 function secure:HideButton() activeButtons[slot] = nil end
444 -- all other action bar are hidden if with overridebar or vehicleui (not shapeshift, possessbar)
445 -- default Bartender4 options
446 secure:SetAttribute("_onstate-possess", [=[
447 if newstate == "possess" then
449 self:CallMethod("HideButton");
452 self:CallMethod("ShowButton");
455 RegisterStateDriver(secure, "possess", "[overridebar][vehicleui] possess; normal");
459 local function createActionBar(parent, config)
462 local bar = CreateFrame("Frame", "OmaBTBar"..config.bar, parent, "SecureFrameTemplate");
463 bar:SetPoint("TOPLEFT", parent, "BOTTOMLEFT", config.x, config.y);
466 if config.hidden then
469 for slot = config.start, config.start+config.length-1 do
470 local secure = CreateFrame("CheckButton", "OmaBT"..slot, bar, inheritedFrames);
472 if slot == config.start then
473 secure:SetPoint("TOPLEFT");
474 elseif config.columns and i % config.columns == 0 then
475 secure:SetPoint("TOPLEFT", _G["OmaBT"..(slot-config.columns)], "BOTTOMLEFT");
477 secure:SetPoint("TOPLEFT", prev, "TOPRIGHT");
479 secure:RegisterForClicks("AnyUp");
480 if not BUTTONLOCK then
481 secure:RegisterForDrag("LeftButton", "RightButton");
483 if config.nomouse then
484 secure:EnableMouse(false);
486 -- only show tooltips for bars with mouse interaction
487 secure:SetScript("OnEnter", showTooltip);
488 secure:SetScript("OnLeave", hideTooltip);
490 secure:SetWidth(config.size or 32);
491 secure:SetHeight(config.size or 32);
492 secure.base = secure:CreateTexture(nil, "BACKGROUND");
493 secure.base:SetAllPoints();
494 secure.base:SetColorTexture(0, 0, 0, 0.5);
495 secure.iconbase = secure:CreateTexture(nil, "BORDER");
496 secure.iconbase:SetPoint("TOPLEFT", secure.base, "TOPLEFT", 1, -1);
497 secure.iconbase:SetPoint("BOTTOMRIGHT", secure.base, "BOTTOMRIGHT", -1, 1);
498 secure.iconbase:SetColorTexture(0, 0, 0, 0.5);
499 secure.iconbase:Hide();
500 secure.icon = secure:CreateTexture(nil, "ARTWORK");
501 secure.icon:SetPoint("TOPLEFT", secure.iconbase, "TOPLEFT");
502 secure.icon:SetPoint("BOTTOMRIGHT", secure.iconbase, "BOTTOMRIGHT");
503 secure.icon:SetTexCoord(0.07, 0.93, 0.07, 0.93);
504 secure:SetCheckedTexture("Interface\\Buttons\\CheckButtonHilight");
505 secure.autocastable = secure:CreateTexture(nil, "OVERLAY");
506 secure.autocastable:SetPoint("CENTER");
507 secure.autocastable:SetWidth(58);
508 secure.autocastable:SetHeight(58);
509 secure.autocastable:SetTexture("Interface\\Buttons\\UI-AutoCastableOverlay");
510 secure.autocastable:Hide();
511 secure.glow = secure:CreateTexture(nil, "OVERLAY", nil, 1);
512 secure.glow:SetPoint("CENTER");
513 secure.glow:SetWidth(config.size and config.size+26 or 53);
514 secure.glow:SetHeight(config.size and config.size+26 or 53);
515 secure.glow:SetTexture("Interface\\SpellActivationOverlay\\IconAlert");
516 secure.glow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52634375);
518 secure.hotkey = secure:CreateFontString(nil, "OVERLAY", "NumberFontNormalGray");
519 secure.hotkey:SetPoint("TOPRIGHT", secure, "TOPRIGHT", 2, -1);
520 secure.count = secure:CreateFontString(nil, "OVERLAY", "NumberFontNormal");
521 secure.count:SetPoint("BOTTOMRIGHT", secure, "BOTTOMRIGHT", 2, -1);
522 secure.text = secure:CreateFontString(nil, "OVERLAY", "NumberFontNormal");
523 secure.text:SetPoint("BOTTOMLEFT", secure, "BOTTOMLEFT", 2, -1);
525 secure.cd = CreateFrame("Cooldown", "OmaBTCD"..slot, secure, "CooldownFrameTemplate");
526 secure.cd:SetAllPoints();
527 secure:SetAttribute("type", "action");
528 secure:SetAttribute("action", slot);
529 if config.flyout then
530 secure:SetAttribute("flyoutDirection", config.flyout);
532 function secure:ActionChanged(oldslot)
534 activeButtons[oldslot] = nil;
535 self.prev = nil; -- invalidate previous CD when slot changes
537 self.slot = self:GetAttribute("action");
538 return updateButton(self, self.slot);
540 secure:ActionChanged(); -- initial update
541 setupSnippets(secure, slot);
542 updateHotkeys(secure);
543 buttons[slot] = secure;
549 local function initialize()
550 local _, class = UnitClass("player");
551 local name, realm = UnitFullName("player");
552 ActionBars:SetFrameStrata("LOW");
553 ActionBars:SetPoint("BOTTOMLEFT");
554 ActionBars:SetWidth(1);
555 ActionBars:SetHeight(1);
556 for _, config in pairs(settings) do
557 if (not usingBonusbars[class] or not usingBonusbars[class][config.bar]) and
558 (not chars[realm] or not chars[realm][name] or chars[realm][name][config.bar]) then
559 createActionBar(ActionBars, config);
564 local function setupBindings()
565 _G["BINDING_HEADER_OmaAB"] = "Oma Action Bar";
567 _G["BINDING_HEADER_OMAABBLANK"..i] = "Bar "..i;
569 _G[format("BINDING_NAME_CLICK OmaBT%d:LeftButton", (i-1)*12+j)] = format("Bar %d Button %d", i, j);
574 local mounted = false;
577 ["ACTIONBAR_UPDATE_COOLDOWN"] = function()
578 for _, button in pairs(activeButtons) do
579 updateCooldown(button, button.slot);
582 ["SPELL_UPDATE_CHARGES"] = function()
583 for _, button in pairs(activeButtons) do
584 updateCount(button, button.slot);
587 ["ACTIONBAR_SLOT_CHANGED"] = function(slot)
588 if buttons[slot] then buttons[slot]:ActionChanged() end
590 ["ACTIONBAR_SHOWGRID"] = function()
591 for _, button in pairs(buttons) do
593 button.iconbase:Show();
594 if not activeButtons[button.slot] then button.base:Show() end
597 ["ACTIONBAR_HIDEGRID"] = function()
598 for _, button in pairs(buttons) do
600 button.iconbase:Hide();
601 if not activeButtons[button.slot] then button.base:Hide() end
604 ["ACTIONBAR_UPDATE_STATE"] = function()
605 for _, button in pairs(activeButtons) do
606 updateState(button, button.slot);
609 ["ACTIONBAR_UPDATE_USABLE"] = function()
610 for _, button in pairs(activeButtons) do
611 updateUsable(button, button.slot);
614 ["UPDATE_OVERRIDE_ACTIONBAR"] = function()
615 if buttons[1] then -- called before PLAYER_LOGIN
616 for _, button in pairs(buttons) do
617 updateButton(button, button.slot);
621 ["START_AUTOREPEAT_SPELL"] = function()
622 for _, button in pairs(activeButtons) do
623 if IsAutoRepeatAction(button.slot) then
624 button.autorepeating = true;
625 button.icon:SetVertexColor(0, 1, 0.5);
629 ["STOP_AUTOREPEAT_SPELL"] = function()
630 for _, button in pairs(activeButtons) do
631 if button.autorepeating then
632 button.autorepeating = nil;
633 updateUsable(button, button.slot);
637 ["SPELL_ACTIVATION_OVERLAY_GLOW_SHOW"] = function(spell)
638 -- TODO create mapping from spellIDs to buttons
639 for _, button in pairs(activeButtons) do
640 startGlow(button, button.slot, spell);
643 ["SPELL_ACTIVATION_OVERLAY_GLOW_HIDE"] = function(spell)
644 -- TODO create mapping from spellIDs to buttons
645 for _, button in pairs(activeButtons) do
646 stopGlow(button, button.slot, spell);
649 ["UPDATE_BINDINGS"] = function()
650 for _, button in pairs(buttons) do
651 updateHotkeys(button);
654 ["UNIT_AURA"] = function(unit)
655 -- using UNIT_AURA instead of COMPANION_UPDATE to not update every time
656 -- someone mounts, tracking player mount status with COMPANION_UPDATE is
658 if (not mounted and IsMounted()) or (mounted and not IsMounted()) then
659 mounted = not mounted;
660 for _, button in pairs(activeButtons) do
661 updateState(button, button.slot);
665 ["UPDATE_ALL_BUTTONS"] = function()
666 for _, button in pairs(buttons) do
667 updateButton(button, button.slot);
670 ["PLAYER_LOGIN"] = function()
673 ["ADDON_LOADED"] = function(addon)
674 if addon == "OmaAB" then
676 ActionBars:UnregisterEvent("ADDON_LOADED");
680 events["LOSS_OF_CONTROL_ADDED"] = events["ACTIONBAR_UPDATE_COOLDOWN"];
681 events["LOSS_OF_CONTROL_UPDATE"] = events["ACTIONBAR_UPDATE_COOLDOWN"];
682 events["PLAYER_MOUNT_DISPLAY_CHANGED"] = events["ACTIONBAR_UPDATE_USABLE"];
683 events["TRADE_SKILL_SHOW"] = events["ACTIONBAR_UPDATE_STATE"];
684 events["TRADE_SKILL_CLOSE"] = events["ACTIONBAR_UPDATE_STATE"];
685 events["ARCHAEOLOGY_CLOSED"] = events["ACTIONBAR_UPDATE_STATE"];
686 events["PLAYER_ENTERING_WORLD"] = events["UPDATE_ALL_BUTTONS"];
687 events["UPDATE_VEHICLE_ACTIONBAR"] = events["UPDATE_ALL_BUTTONS"];
688 events["UPDATE_SHAPESHIFT_FORM"] = events["UPDATE_ALL_BUTTONS"];
689 events["SPELL_UPDATE_ICON"] = events["UPDATE_ALL_BUTTONS"];
690 events["PET_STABLE_UPDATE"] = events["UPDATE_ALL_BUTTONS"];
691 events["PET_STABLE_SHOW"] = events["UPDATE_ALL_BUTTONS"];
692 events["PLAYER_SPECIALIZATION_CHANGED"] = events["UPDATE_ALL_BUTTONS"];
693 events["UNIT_ENTERED_VEHICLE"] = function(unit)
694 if unit == "player" then events["ACTIONBAR_UPDATE_STATE"]() end
696 events["UNIT_EXITED_VEHICLE"] = events["UNIT_ENTERED_VEHICLE"];
698 ActionBars:RegisterEvent("ADDON_LOADED");
699 ActionBars:RegisterEvent("PLAYER_LOGIN");
700 ActionBars:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN");
701 ActionBars:RegisterEvent("ACTIONBAR_UPDATE_USABLE");
702 ActionBars:RegisterEvent("ACTIONBAR_UPDATE_STATE");
703 ActionBars:RegisterEvent("ACTIONBAR_SLOT_CHANGED");
704 ActionBars:RegisterEvent("ACTIONBAR_SHOWGRID");
705 ActionBars:RegisterEvent("ACTIONBAR_HIDEGRID");
706 ActionBars:RegisterEvent("SPELL_UPDATE_ICON");
707 ActionBars:RegisterEvent("SPELL_UPDATE_CHARGES");
708 ActionBars:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_SHOW");
709 ActionBars:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_HIDE");
710 ActionBars:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR");
711 ActionBars:RegisterEvent("UPDATE_OVERRIDE_ACTIONBAR");
712 ActionBars:RegisterEvent("PLAYER_MOUNT_DISPLAY_CHANGED");
713 ActionBars:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED");
714 ActionBars:RegisterEvent("UNIT_ENTERED_VEHICLE");
715 ActionBars:RegisterEvent("UNIT_EXITED_VEHICLE");
716 ActionBars:RegisterEvent("PET_STABLE_UPDATE");
717 ActionBars:RegisterEvent("PET_STABLE_SHOW");
718 ActionBars:RegisterEvent("UPDATE_BINDINGS");
719 ActionBars:RegisterUnitEvent("UNIT_AURA", "player");
720 ActionBars:SetScript("OnEvent", function(self, event, arg1)