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 IsConsumableAction, IsStackableAction = IsConsumableAction, IsStackableAction;
10 local IsItemAction, GetActionCount = IsItemAction, GetActionCount;
11 local IsSpellOverlayed, GetMacroSpell = IsSpellOverlayed, GetMacroSpell;
12 local IsMounted = IsMounted;
13 local HasAction, IsUsableAction = HasAction, IsUsableAction;
14 local IsCurrentAction, IsAutoRepeatAction = IsCurrentAction, IsAutoRepeatAction;
15 local CreateFrame = CreateFrame;
16 local RegisterStateDriver = RegisterStateDriver;
17 local CooldownFrame_Set, CooldownFrame_Clear = CooldownFrame_Set, CooldownFrame_Clear;
18 local CTimerAfter = C_Timer.After;
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,},
129 local activeButtons = {};
131 local ActionBars = CreateFrame("Frame", "OmaActionBars", UIParent);
132 local inheritedFrames =
133 "SecureActionButtonTemplate,SecureHandlerDragTemplate,SecureHandlerStateTemplate";
135 local function showTooltip(secure)
136 GameTooltip_SetDefaultAnchor(GameTooltip, secure);
137 GameTooltip:SetAction(secure:GetAttribute("action"));
140 local function hideTooltip()
144 local numChargeCDs = 0;
145 local function createChargeCD(parent)
146 numChargeCDs = numChargeCDs + 1;
147 local frame = CreateFrame("Cooldown", "OmaChargeCD"..numChargeCDs, parent, "CooldownFrameTemplate");
148 frame:SetHideCountdownNumbers(false);
149 frame:SetDrawSwipe(false);
150 frame:SetAllPoints(parent);
151 frame:SetFrameStrata("TOOLTIP");
155 local function clearChargeCD(parent)
156 if parent.chargecd then CooldownFrame_Clear(parent.chargecd) end
159 local function startChargeCD(parent, start, duration, modrate)
161 return clearChargeCD(parent);
163 parent.chargecd = parent.chargecd or createChargeCD(parent);
164 CooldownFrame_Set(parent.chargecd, start, duration, true, true, modrate);
169 local function updateCooldown(button, slot)
170 -- CD update from FrameXML/ActionButton.lua
171 local locstart, locduration = GetActionLossOfControlCooldown(slot);
172 local start, duration, enable, modrate = GetActionCooldown(slot);
173 local charges, maxcharges, chargestart, chargeduration, chargemodrate = GetActionCharges(slot);
174 -- avoid as many updates as possible by checking if there's changes first
176 button.prev[1] == locstart and button.prev[2] == locduration and
177 button.prev[3] == start and button.prev[4] == duration and
178 button.prev[5] == enable and button.prev[6] == modrate and
179 button.prev[7] == charges and button.prev[8] == maxcharges and
180 button.prev[9] == chargestart and button.prev[10] == chargeduration and
181 button.prev[11] == chargemodrate then
184 button.prev = { locstart, locduration, start, duration, enable, modrate,
185 charges, maxcharges, chargestart, chargeduration, chargemodrate };
186 if (locstart + locduration) > (start + duration) then
187 if button.cd.currentCooldownType ~= COOLDOWN_TYPE_LOSS_OF_CONTROL then
188 button.cd:SetEdgeTexture(locCDTexture);
189 button.cd:SetSwipeColor(0.17, 0, 0);
190 button.cd:SetHideCountdownNumbers(true);
191 button.cd.currentCooldownType = COOLDOWN_TYPE_LOSS_OF_CONTROL;
194 CooldownFrame_Set(button.cd, locstart, locduration, true, true, modrate);
195 clearChargeCD(button);
197 if button.cd.currentCooldownType ~= COOLDOWN_TYPE_NORMAL then
198 button.cd:SetEdgeTexture(CDTexture);
199 button.cd:SetSwipeColor(0, 0, 0);
200 button.cd:SetHideCountdownNumbers(false);
201 button.cd.currentCooldownType = COOLDOWN_TYPE_NORMAL;
205 button.cd:SetScript("OnCooldownDone", redoCooldown);
207 if charges and maxcharges and maxcharges > 1 and charges < maxcharges then
208 startChargeCD(button, chargestart, chargeduration, chargemodrate);
210 clearChargeCD(button);
212 CooldownFrame_Set(button.cd, start, duration, enable, false, modrate);
216 local function redoCooldown(cd)
217 local button = cd:GetParent();
218 cd:SetScript("OnCooldownDone", nil);
219 updateCooldown(button, button.slot);
222 local function updateCount(button, slot)
223 if IsConsumableAction(slot) or IsStackableAction(slot) or
224 (not IsItemAction(slot) and GetActionCount(slot) > 0) then
225 local count = GetActionCount(slot);
227 button.count:SetText("*");
229 button.count:SetText(count);
233 local charges, maxcharges = GetActionCharges(slot);
234 if maxcharges > 1 then
235 button.count:SetText(charges);
243 local function updateUsable(button, slot)
244 local isUsable, noMana = IsUsableAction(slot);
246 button.icon:SetVertexColor(1, 1, 1);
248 button.icon:SetVertexColor(0, 0.5, 1);
250 button.icon:SetVertexColor(0.4, 0.4, 0.4);
254 local function updateState(button, slot)
255 button:SetChecked(IsCurrentAction(slot) or IsAutoRepeatAction(slot));
258 local function updateGlow(button, slot)
259 local stype, id, _ = GetActionInfo(slot);
260 if stype == "spell" and IsSpellOverlayed(id) then
262 elseif stype == "macro" then
263 local _, _, macroid = GetMacroSpell(id);
264 if macroid and IsSpellOverlayed(macroid) then
269 else -- TODO FlyoutHasSpell glow
274 local function startGlow(button, slot, spell)
275 local stype, id, _ = GetActionInfo(slot);
276 if stype == "spell" and id == spell then
278 elseif stype == "macro" then
279 local _, _, macroid = GetMacroSpell(id);
280 if macroid and macroid == spell then
284 -- TODO FlyoutHasSpell glow
287 local function stopGlow(button, slot, spell)
288 local stype, id, _ = GetActionInfo(slot);
289 if stype == "spell" and id == spell then
291 elseif stype == "macro" then
292 local _, _, macroid = GetMacroSpell(id);
293 if macroid and macroid == spell then
297 -- TODO FlyoutHasSpell glow
300 local function updateButton(button, slot)
301 if HasAction(slot) then
302 activeButtons[slot] = button;
304 button.icon:SetTexture(GetActionTexture(slot));
305 updateCooldown(button, slot);
306 updateUsable(button, slot);
307 updateState(button, slot);
308 updateCount(button, slot);
309 updateGlow(button, slot);
310 if not IsConsumableAction(slot) and not IsStackableAction(slot) then
311 button.text:SetText(ssub(GetActionText(slot) or "", 1, 4));
314 if button.hotkey.shown then button.hotkey:Show() end
316 activeButtons[slot] = nil;
317 if not button.grid then button.base:Hide() end
318 button.icon:SetTexture(nil);
321 button.hotkey:Hide();
324 button:SetChecked(false);
328 local function updateHotkeys(button)
329 local key = GetBindingKey(format("CLICK %s:LeftButton", button:GetName()));
330 if key and key ~= "" then
331 -- from LibKeyBound-1.0
333 key = key:gsub(" ", "");
334 key = key:gsub("ALT%-", "a");
335 key = key:gsub("CTRL%-", "c");
336 key = key:gsub("SHIFT%-", "s");
337 key = key:gsub("NUMPAD", "n");
338 button.hotkey:SetText(key);
339 button.hotkey.shown = true;
340 button.hotkey:Show();
342 button.hotkey.shown = nil;
343 button.hotkey:Hide();
347 local mainbartoggle = "[overridebar][possessbar][shapeshift]possess;";
348 mainbartoggle = mainbartoggle.."[bonusbar:1,stealth:1]bonusbar2;"; -- prowl
349 mainbartoggle = mainbartoggle.."[bonusbar:1]bonusbar1;[bonusbar:2]bonusbar2;"; -- cat form, unused
350 mainbartoggle = mainbartoggle.."[bonusbar:3]bonusbar3;[bonusbar:4]bonusbar4;"; -- bear form, moonkin form
351 mainbartoggle = mainbartoggle.."normal";
352 local function setupSnippets(secure, slot)
353 -- FrameXML/SecureHandlers.lua has arguments and return value
354 -- args: self, button, kind, value, ... (kind, value, ... from GetCursorInfo())
355 -- returns: kind, target, detail
356 -- or: "clear", kind, target, detail
357 -- used for Pickup* functions
358 -- some of these snippets based on LibActionButton-1.0
359 secure:SetAttribute("_ondragstart", [=[
360 return "action", self:GetAttribute("action");
362 secure:SetAttribute("_onreceivedrag", [=[
363 if not kind or not value then return nil end
364 return "action", self:GetAttribute("action");
366 -- pre-wrapper can pass a message to post-wrapper
367 secure:WrapScript(secure, "OnDragStart", [=[
368 local kind, value = GetActionInfo(self:GetAttribute("action"));
369 return "message", format("%s|%s", tostring(kind), tostring(value));
371 local kind, value = GetActionInfo(self:GetAttribute("action"));
372 if message ~= format("%s|%s", tostring(kind), tostring(value)) then
373 self:CallMethod("ActionChanged");
376 secure:WrapScript(secure, "OnReceiveDrag", [=[
377 local kind, value = GetActionInfo(self:GetAttribute("action"));
378 return "message", format("%s|%s", tostring(kind), tostring(value));
380 local kind, value = GetActionInfo(self:GetAttribute("action"));
381 if message ~= format("%s|%s", tostring(kind), tostring(value)) then
382 self:CallMethod("ActionChanged");
385 function secure:UpdateState()
386 return updateState(self, self.slot);
388 secure:WrapScript(secure, "OnClick", [=[
389 local kind, value = GetActionInfo(self:GetAttribute("action"));
390 return nil, format("%s|%s", tostring(kind), tostring(value));
392 local kind, value = GetActionInfo(self:GetAttribute("action"));
393 if message ~= format("%s|%s", tostring(kind), tostring(value)) then
394 self:CallMethod("ActionChanged");
396 self:CallMethod("UpdateState");
400 -- first action bar has possible states based on vehicle/possess etc.
401 secure:SetAttribute("origaction", slot);
402 secure:SetAttribute("_onstate-possess", [=[
403 local oldslot = self:GetAttribute("action");
404 if newstate == "possess" then
406 if HasVehicleActionBar() then
407 slot = (GetVehicleBarIndex()-1)*12+self:GetAttribute("origaction");
408 elseif HasOverrideActionBar() then
409 slot = (GetOverrideBarIndex()-1)*12+self:GetAttribute("origaction");
410 elseif HasTempShapeshiftActionBar() then
411 slot = (GetTempShapeshiftBarIndex()-1)*12+self:GetAttribute("origaction");
413 -- something wrong, just revert to normal
414 print("Possess bar index not found");
415 slot = self:GetAttribute("origaction");
417 self:SetAttribute("action", slot);
418 elseif newstate == "bonusbar1" then
419 self:SetAttribute("action", 72+self:GetAttribute("origaction"));
420 elseif newstate == "bonusbar2" then
421 self:SetAttribute("action", 84+self:GetAttribute("origaction"));
422 elseif newstate == "bonusbar3" then
423 self:SetAttribute("action", 96+self:GetAttribute("origaction"));
424 elseif newstate == "bonusbar4" then
425 --self:SetAttribute("action", 108+self:GetAttribute("origaction"));
426 -- moonkin form, don't change actionbar
427 self:SetAttribute("action", self:GetAttribute("origaction"));
429 self:SetAttribute("action", self:GetAttribute("origaction"));
431 self:CallMethod("ActionChanged", oldslot);
433 RegisterStateDriver(secure, "possess", mainbartoggle);
435 function secure:ShowButton() if HasAction(slot) then activeButtons[slot] = self end end
436 function secure:HideButton() activeButtons[slot] = nil end
437 -- all other action bar are hidden if with overridebar or vehicleui (not shapeshift, possessbar)
438 -- default Bartender4 options
439 secure:SetAttribute("_onstate-possess", [=[
440 if newstate == "possess" then
442 self:CallMethod("HideButton");
445 self:CallMethod("ShowButton");
448 RegisterStateDriver(secure, "possess", "[overridebar][vehicleui] possess; normal");
452 local function createActionBar(parent, config)
455 local bar = CreateFrame("Frame", "OmaBTBar"..config.bar, parent, "SecureFrameTemplate");
456 bar:SetPoint("TOPLEFT", parent, "BOTTOMLEFT", config.x, config.y);
459 if config.hidden then
462 for slot = config.start, config.start+config.length-1 do
463 local secure = CreateFrame("CheckButton", "OmaBT"..slot, bar, inheritedFrames);
465 if slot == config.start then
466 secure:SetPoint("TOPLEFT");
467 elseif config.columns and i % config.columns == 0 then
468 secure:SetPoint("TOPLEFT", _G["OmaBT"..(slot-config.columns)], "BOTTOMLEFT");
470 secure:SetPoint("TOPLEFT", prev, "TOPRIGHT");
472 secure:RegisterForClicks("AnyUp");
473 if not BUTTONLOCK then
474 secure:RegisterForDrag("LeftButton", "RightButton");
476 if config.nomouse then
477 secure:EnableMouse(false);
479 -- only show tooltips for bars with mouse interaction
480 secure:SetScript("OnEnter", showTooltip);
481 secure:SetScript("OnLeave", hideTooltip);
483 secure:SetWidth(config.size or 32);
484 secure:SetHeight(config.size or 32);
485 secure.base = secure:CreateTexture(nil, "BACKGROUND");
486 secure.base:SetAllPoints();
487 secure.base:SetColorTexture(0, 0, 0, 0.5);
488 secure.iconbase = secure:CreateTexture(nil, "BORDER");
489 secure.iconbase:SetPoint("TOPLEFT", secure.base, "TOPLEFT", 1, -1);
490 secure.iconbase:SetPoint("BOTTOMRIGHT", secure.base, "BOTTOMRIGHT", -1, 1);
491 secure.iconbase:SetColorTexture(0, 0, 0, 0.5);
492 secure.iconbase:Hide();
493 secure.icon = secure:CreateTexture(nil, "ARTWORK");
494 secure.icon:SetPoint("TOPLEFT", secure.iconbase, "TOPLEFT");
495 secure.icon:SetPoint("BOTTOMRIGHT", secure.iconbase, "BOTTOMRIGHT");
496 secure.icon:SetTexCoord(0.07, 0.93, 0.07, 0.93);
497 secure:SetCheckedTexture("Interface\\Buttons\\CheckButtonHilight");
498 secure.autocastable = secure:CreateTexture(nil, "OVERLAY");
499 secure.autocastable:SetPoint("CENTER");
500 secure.autocastable:SetWidth(58);
501 secure.autocastable:SetHeight(58);
502 secure.autocastable:SetTexture("Interface\\Buttons\\UI-AutoCastableOverlay");
503 secure.autocastable:Hide();
504 secure.glow = secure:CreateTexture(nil, "OVERLAY", nil, 1);
505 secure.glow:SetPoint("CENTER");
506 secure.glow:SetWidth(config.size and config.size+26 or 53);
507 secure.glow:SetHeight(config.size and config.size+26 or 53);
508 secure.glow:SetTexture("Interface\\SpellActivationOverlay\\IconAlert");
509 secure.glow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52634375);
511 secure.hotkey = secure:CreateFontString(nil, "OVERLAY", "NumberFontNormalGray");
512 secure.hotkey:SetPoint("TOPRIGHT", secure, "TOPRIGHT", 2, -1);
513 secure.count = secure:CreateFontString(nil, "OVERLAY", "NumberFontNormal");
514 secure.count:SetPoint("BOTTOMRIGHT", secure, "BOTTOMRIGHT", 2, -1);
515 secure.text = secure:CreateFontString(nil, "OVERLAY", "NumberFontNormal");
516 secure.text:SetPoint("BOTTOMLEFT", secure, "BOTTOMLEFT", 2, -1);
518 secure.cd = CreateFrame("Cooldown", "OmaBTCD"..slot, secure, "CooldownFrameTemplate");
519 secure.cd:SetAllPoints();
520 secure:SetAttribute("type", "action");
521 secure:SetAttribute("action", slot);
522 if config.flyout then
523 secure:SetAttribute("flyoutDirection", config.flyout);
525 function secure:ActionChanged(oldslot)
526 if oldslot then activeButtons[oldslot] = nil end
527 self.slot = self:GetAttribute("action");
528 return updateButton(self, self.slot);
530 secure:ActionChanged(); -- initial update
531 setupSnippets(secure, slot);
532 updateHotkeys(secure);
533 buttons[slot] = secure;
539 local function initialize()
540 local _, class = UnitClass("player");
541 local name, realm = UnitFullName("player");
542 ActionBars:SetFrameStrata("LOW");
543 ActionBars:SetPoint("BOTTOMLEFT");
544 ActionBars:SetWidth(1);
545 ActionBars:SetHeight(1);
546 for _, config in pairs(settings) do
547 if (not usingBonusbars[class] or not usingBonusbars[class][config.bar]) and
548 (not chars[realm] or not chars[realm][name] or chars[realm][name][config.bar]) then
549 createActionBar(ActionBars, config);
554 local function setupBindings()
555 BINDING_HEADER_OmaAB = "Oma Action Bar";
557 _G["BINDING_HEADER_OMAABBLANK"..i] = "Bar "..i;
559 _G[format("BINDING_NAME_CLICK OmaBT%d:LeftButton", (i-1)*12+j)] = format("Bar %d Button %d", i, j);
564 local mounted = false;
567 ["ACTIONBAR_UPDATE_COOLDOWN"] = function()
568 for _, button in pairs(activeButtons) do
569 updateCooldown(button, button.slot);
572 ["SPELL_UPDATE_CHARGES"] = function()
573 for _, button in pairs(activeButtons) do
574 updateCount(button, button.slot);
577 ["ACTIONBAR_SLOT_CHANGED"] = function(slot)
578 if buttons[slot] then buttons[slot]:ActionChanged() end
580 ["ACTIONBAR_SHOWGRID"] = function()
581 for _, button in pairs(buttons) do
583 button.iconbase:Show();
584 if not activeButtons[button.slot] then button.base:Show() end
587 ["ACTIONBAR_HIDEGRID"] = function()
588 for _, button in pairs(buttons) do
590 button.iconbase:Hide();
591 if not activeButtons[button.slot] then button.base:Hide() end
594 ["ACTIONBAR_UPDATE_STATE"] = function()
595 for _, button in pairs(activeButtons) do
596 updateState(button, button.slot);
599 ["ACTIONBAR_UPDATE_USABLE"] = function()
600 for _, button in pairs(activeButtons) do
601 updateUsable(button, button.slot);
604 ["UPDATE_OVERRIDE_ACTIONBAR"] = function()
605 if buttons[1] then -- called before PLAYER_LOGIN
606 for _, button in pairs(buttons) do
607 updateButton(button, button.slot);
611 ["START_AUTOREPEAT_SPELL"] = function()
612 for _, button in pairs(activeButtons) do
613 if IsAutoRepeatAction(button.slot) then
614 button.autorepeating = true;
615 button.icon:SetVertexColor(0, 1, 0.5);
619 ["STOP_AUTOREPEAT_SPELL"] = function()
620 for _, button in pairs(activeButtons) do
621 if button.autorepeating then
622 button.autorepeating = nil;
623 updateUsable(button, button.slot);
627 ["SPELL_ACTIVATION_OVERLAY_GLOW_SHOW"] = function(spell)
628 -- TODO create mapping from spellIDs to buttons
629 for _, button in pairs(activeButtons) do
630 startGlow(button, button.slot, spell);
633 ["SPELL_ACTIVATION_OVERLAY_GLOW_HIDE"] = function(spell)
634 -- TODO create mapping from spellIDs to buttons
635 for _, button in pairs(activeButtons) do
636 stopGlow(button, button.slot, spell);
639 ["UPDATE_BINDINGS"] = function()
640 for _, button in pairs(buttons) do
641 updateHotkeys(button);
644 ["UNIT_AURA"] = function(unit)
645 -- using UNIT_AURA instead of COMPANION_UPDATE to not update every time
646 -- someone mounts, tracking player mount status with COMPANION_UPDATE is
648 if (not mounted and IsMounted()) or (mounted and not IsMounted()) then
649 mounted = not mounted;
650 for _, button in pairs(activeButtons) do
651 updateState(button, button.slot);
655 ["UPDATE_ALL_BUTTONS"] = function()
656 for _, button in pairs(buttons) do
657 updateButton(button, button.slot);
660 ["PLAYER_LOGIN"] = function()
661 GameTooltip = _G["GameTooltip"];
664 ["ADDON_LOADED"] = function(addon)
665 if addon == "OmaAB" then
667 ActionBars:UnregisterEvent("ADDON_LOADED");
671 events["LOSS_OF_CONTROL_ADDED"] = events["ACTIONBAR_UPDATE_COOLDOWN"];
672 events["LOSS_OF_CONTROL_UPDATE"] = events["ACTIONBAR_UPDATE_COOLDOWN"]; -- TODO might change once tooltips are in
673 events["PLAYER_MOUNT_DISPLAY_CHANGED"] = events["ACTIONBAR_UPDATE_USABLE"];
674 events["TRADE_SKILL_SHOW"] = events["ACTIONBAR_UPDATE_STATE"];
675 events["TRADE_SKILL_CLOSE"] = events["ACTIONBAR_UPDATE_STATE"];
676 events["ARCHAEOLOGY_CLOSED"] = events["ACTIONBAR_UPDATE_STATE"];
677 events["PLAYER_ENTERING_WORLD"] = events["UPDATE_ALL_BUTTONS"];
678 events["UPDATE_VEHICLE_ACTIONBAR"] = events["UPDATE_ALL_BUTTONS"];
679 events["UPDATE_SHAPESHIFT_FORM"] = events["UPDATE_ALL_BUTTONS"];
680 events["SPELL_UPDATE_ICON"] = events["UPDATE_ALL_BUTTONS"];
681 events["PET_STABLE_UPDATE"] = events["UPDATE_ALL_BUTTONS"];
682 events["PET_STABLE_SHOW"] = events["UPDATE_ALL_BUTTONS"];
683 events["PLAYER_SPECIALIZATION_CHANGED"] = events["UPDATE_ALL_BUTTONS"];
684 events["UNIT_ENTERED_VEHICLE"] = function(unit)
685 if unit == "player" then events["ACTIONBAR_UPDATE_STATE"]() end
687 events["UNIT_EXITED_VEHICLE"] = events["UNIT_ENTERED_VEHICLE"];
689 ActionBars:RegisterEvent("ADDON_LOADED");
690 ActionBars:RegisterEvent("PLAYER_LOGIN");
691 ActionBars:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN");
692 ActionBars:RegisterEvent("ACTIONBAR_UPDATE_USABLE");
693 ActionBars:RegisterEvent("ACTIONBAR_UPDATE_STATE");
694 ActionBars:RegisterEvent("ACTIONBAR_SLOT_CHANGED");
695 ActionBars:RegisterEvent("ACTIONBAR_SHOWGRID");
696 ActionBars:RegisterEvent("ACTIONBAR_HIDEGRID");
697 ActionBars:RegisterEvent("SPELL_UPDATE_ICON");
698 ActionBars:RegisterEvent("SPELL_UPDATE_CHARGES");
699 ActionBars:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_SHOW");
700 ActionBars:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_HIDE");
701 ActionBars:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR");
702 ActionBars:RegisterEvent("UPDATE_OVERRIDE_ACTIONBAR");
703 ActionBars:RegisterEvent("PLAYER_MOUNT_DISPLAY_CHANGED");
704 ActionBars:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED");
705 ActionBars:RegisterEvent("UNIT_ENTERED_VEHICLE");
706 ActionBars:RegisterEvent("UNIT_EXITED_VEHICLE");
707 ActionBars:RegisterEvent("PET_STABLE_UPDATE");
708 ActionBars:RegisterEvent("PET_STABLE_SHOW");
709 ActionBars:RegisterEvent("UPDATE_BINDINGS");
710 ActionBars:RegisterUnitEvent("UNIT_AURA", "player");
711 ActionBars:SetScript("OnEvent", function(self, event, arg1)