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,},
134 local activeButtons = {};
136 local ActionBars = CreateFrame("Frame", "OmaActionBars", UIParent);
137 local inheritedFrames =
138 "SecureActionButtonTemplate,SecureHandlerDragTemplate,SecureHandlerStateTemplate";
140 local function showTooltip(secure)
141 GameTooltip_SetDefaultAnchor(GameTooltip, secure);
142 GameTooltip:SetAction(secure:GetAttribute("action"));
145 local function hideTooltip()
149 local numChargeCDs = 0;
150 local function createChargeCD(parent)
151 numChargeCDs = numChargeCDs + 1;
152 local frame = CreateFrame("Cooldown", "OmaChargeCD"..numChargeCDs, parent, "CooldownFrameTemplate");
153 frame:SetHideCountdownNumbers(false);
154 frame:SetDrawSwipe(false);
155 frame:SetAllPoints(parent);
156 frame:SetFrameStrata("TOOLTIP");
160 local function clearChargeCD(parent)
161 if parent.chargecd then CooldownFrame_Clear(parent.chargecd) end
164 local function startChargeCD(parent, start, duration, modrate)
166 return clearChargeCD(parent);
168 parent.chargecd = parent.chargecd or createChargeCD(parent);
169 CooldownFrame_Set(parent.chargecd, start, duration, true, true, modrate);
174 local function updateCooldown(button, slot)
175 -- CD update from FrameXML/ActionButton.lua
176 local locstart, locduration = GetActionLossOfControlCooldown(slot);
177 local start, duration, enable, modrate = GetActionCooldown(slot);
178 local charges, maxcharges, chargestart, chargeduration, chargemodrate = GetActionCharges(slot);
179 -- avoid as many updates as possible by checking if there's changes first
181 button.prev[1] == locstart and button.prev[2] == locduration and
182 button.prev[3] == start and button.prev[4] == duration and
183 button.prev[5] == enable and button.prev[6] == modrate and
184 button.prev[7] == charges and button.prev[8] == maxcharges and
185 button.prev[9] == chargestart and button.prev[10] == chargeduration and
186 button.prev[11] == chargemodrate then
189 button.prev = { locstart, locduration, start, duration, enable, modrate,
190 charges, maxcharges, chargestart, chargeduration, chargemodrate };
191 if (locstart + locduration) > (start + duration) then
192 if button.cd.currentCooldownType ~= COOLDOWN_TYPE_LOSS_OF_CONTROL then
193 button.cd:SetEdgeTexture(locCDTexture);
194 button.cd:SetSwipeColor(0.17, 0, 0);
195 button.cd:SetHideCountdownNumbers(true);
196 button.cd.currentCooldownType = COOLDOWN_TYPE_LOSS_OF_CONTROL;
199 CooldownFrame_Set(button.cd, locstart, locduration, true, true, modrate);
200 clearChargeCD(button);
202 if button.cd.currentCooldownType ~= COOLDOWN_TYPE_NORMAL then
203 button.cd:SetEdgeTexture(CDTexture);
204 button.cd:SetSwipeColor(0, 0, 0);
205 button.cd:SetHideCountdownNumbers(false);
206 button.cd.currentCooldownType = COOLDOWN_TYPE_NORMAL;
210 button.cd:SetScript("OnCooldownDone", redoCooldown);
212 if charges and maxcharges and maxcharges > 1 and charges < maxcharges then
213 startChargeCD(button, chargestart, chargeduration, chargemodrate);
215 clearChargeCD(button);
217 CooldownFrame_Set(button.cd, start, duration, enable, false, modrate);
221 local function redoCooldown(cd)
222 local button = cd:GetParent();
223 cd:SetScript("OnCooldownDone", nil);
224 updateCooldown(button, button.slot);
227 local function updateCount(button, slot)
228 if IsConsumableAction(slot) or IsStackableAction(slot) or
229 (not IsItemAction(slot) and GetActionCount(slot) > 0) then
230 local count = GetActionCount(slot);
232 button.count:SetText("*");
234 button.count:SetText(count);
238 local charges, maxcharges = GetActionCharges(slot);
239 if maxcharges > 1 then
240 button.count:SetText(charges);
248 local function updateUsable(button, slot)
249 local isUsable, noMana = IsUsableAction(slot);
251 button.icon:SetVertexColor(1, 1, 1);
253 button.icon:SetVertexColor(0, 0.5, 1);
255 button.icon:SetVertexColor(0.4, 0.4, 0.4);
259 local function updateState(button, slot)
260 button:SetChecked(IsCurrentAction(slot) or IsAutoRepeatAction(slot));
263 local function updateGlow(button, slot)
264 local stype, id = GetActionInfo(slot);
265 if stype == "spell" and IsSpellOverlayed(id) then
267 elseif stype == "macro" then
268 local macroid = GetMacroSpell(id);
269 if macroid and IsSpellOverlayed(macroid) then
274 else -- TODO FlyoutHasSpell glow
279 local function startGlow(button, slot, spell)
280 local stype, id = GetActionInfo(slot);
281 if stype == "spell" and id == spell then
283 elseif stype == "macro" then
284 local macroid = GetMacroSpell(id);
285 if macroid and macroid == spell then
289 -- TODO FlyoutHasSpell glow
292 local function stopGlow(button, slot, spell)
293 local stype, id = GetActionInfo(slot);
294 if stype == "spell" and id == spell then
296 elseif stype == "macro" then
297 local macroid = GetMacroSpell(id);
298 if macroid and macroid == spell then
302 -- TODO FlyoutHasSpell glow
305 local function updateButton(button, slot)
306 if HasAction(slot) then
307 activeButtons[slot] = button;
309 button.icon:SetTexture(GetActionTexture(slot));
310 updateCooldown(button, slot);
311 updateUsable(button, slot);
312 updateState(button, slot);
313 updateCount(button, slot);
314 updateGlow(button, slot);
315 if not IsConsumableAction(slot) and not IsStackableAction(slot) then
316 button.text:SetText(ssub(GetActionText(slot) or "", 1, 4));
319 if button.hotkey.shown then button.hotkey:Show() end
321 activeButtons[slot] = nil;
322 if not button.grid then button.base:Hide() end
323 button.icon:SetTexture(nil);
326 button.hotkey:Hide();
329 button:SetChecked(false);
333 local function updateHotkeys(button)
334 local key = GetBindingKey(format("CLICK %s:LeftButton", button:GetName()));
335 if key and key ~= "" then
336 -- from LibKeyBound-1.0
338 key = key:gsub(" ", "");
339 key = key:gsub("ALT%-", "a");
340 key = key:gsub("CTRL%-", "c");
341 key = key:gsub("SHIFT%-", "s");
342 key = key:gsub("NUMPAD", "n");
343 button.hotkey:SetText(key);
344 button.hotkey.shown = true;
345 button.hotkey:Show();
347 button.hotkey.shown = nil;
348 button.hotkey:Hide();
352 local mainbartoggle = "[overridebar][possessbar][shapeshift]possess;";
353 mainbartoggle = mainbartoggle.."[bonusbar:1,stealth:1]bonusbar2;"; -- prowl
354 mainbartoggle = mainbartoggle.."[bonusbar:1]bonusbar1;[bonusbar:2]bonusbar2;"; -- cat form, unused
355 mainbartoggle = mainbartoggle.."[bonusbar:3]bonusbar3;[bonusbar:4]bonusbar4;"; -- bear form, moonkin form
356 mainbartoggle = mainbartoggle.."normal";
357 local function setupSnippets(secure, slot)
358 -- FrameXML/SecureHandlers.lua has arguments and return value
359 -- args: self, button, kind, value, ... (kind, value, ... from GetCursorInfo())
360 -- returns: kind, target, detail
361 -- or: "clear", kind, target, detail
362 -- used for Pickup* functions
363 -- some of these snippets based on LibActionButton-1.0
364 secure:SetAttribute("_ondragstart", [=[
365 return "action", self:GetAttribute("action");
367 secure:SetAttribute("_onreceivedrag", [=[
368 if not kind or not value then return nil end
369 return "action", self:GetAttribute("action");
371 -- pre-wrapper can pass a message to post-wrapper
372 secure:WrapScript(secure, "OnDragStart", [=[
373 local kind, value = GetActionInfo(self:GetAttribute("action"));
374 return "message", format("%s|%s", tostring(kind), tostring(value));
376 local kind, value = GetActionInfo(self:GetAttribute("action"));
377 if message ~= format("%s|%s", tostring(kind), tostring(value)) then
378 self:CallMethod("ActionChanged");
381 secure:WrapScript(secure, "OnReceiveDrag", [=[
382 local kind, value = GetActionInfo(self:GetAttribute("action"));
383 return "message", format("%s|%s", tostring(kind), tostring(value));
385 local kind, value = GetActionInfo(self:GetAttribute("action"));
386 if message ~= format("%s|%s", tostring(kind), tostring(value)) then
387 self:CallMethod("ActionChanged");
390 function secure:UpdateState()
391 return updateState(self, self.slot);
393 secure:WrapScript(secure, "OnClick", [=[
394 local kind, value = GetActionInfo(self:GetAttribute("action"));
395 return nil, format("%s|%s", tostring(kind), tostring(value));
397 local kind, value = GetActionInfo(self:GetAttribute("action"));
398 if message ~= format("%s|%s", tostring(kind), tostring(value)) then
399 self:CallMethod("ActionChanged");
401 self:CallMethod("UpdateState");
405 -- first action bar has possible states based on vehicle/possess etc.
406 secure:SetAttribute("origaction", slot);
407 secure:SetAttribute("_onstate-possess", [=[
408 local oldslot = self:GetAttribute("action");
409 if newstate == "possess" then
411 if HasVehicleActionBar() then
412 slot = (GetVehicleBarIndex()-1)*12+self:GetAttribute("origaction");
413 elseif HasOverrideActionBar() then
414 slot = (GetOverrideBarIndex()-1)*12+self:GetAttribute("origaction");
415 elseif HasTempShapeshiftActionBar() then
416 slot = (GetTempShapeshiftBarIndex()-1)*12+self:GetAttribute("origaction");
418 -- something wrong, just revert to normal
419 print("Possess bar index not found");
420 slot = self:GetAttribute("origaction");
422 self:SetAttribute("action", slot);
423 elseif newstate == "bonusbar1" then
424 self:SetAttribute("action", 72+self:GetAttribute("origaction"));
425 elseif newstate == "bonusbar2" then
426 self:SetAttribute("action", 84+self:GetAttribute("origaction"));
427 elseif newstate == "bonusbar3" then
428 self:SetAttribute("action", 96+self:GetAttribute("origaction"));
429 elseif newstate == "bonusbar4" then
430 --self:SetAttribute("action", 108+self:GetAttribute("origaction"));
431 -- moonkin form, don't change actionbar
432 self:SetAttribute("action", self:GetAttribute("origaction"));
434 self:SetAttribute("action", self:GetAttribute("origaction"));
436 self:CallMethod("ActionChanged", oldslot);
438 RegisterStateDriver(secure, "possess", mainbartoggle);
440 function secure:ShowButton() if HasAction(slot) then activeButtons[slot] = self end end
441 function secure:HideButton() activeButtons[slot] = nil end
442 -- all other action bar are hidden if with overridebar or vehicleui (not shapeshift, possessbar)
443 -- default Bartender4 options
444 secure:SetAttribute("_onstate-possess", [=[
445 if newstate == "possess" then
447 self:CallMethod("HideButton");
450 self:CallMethod("ShowButton");
453 RegisterStateDriver(secure, "possess", "[overridebar][vehicleui] possess; normal");
457 local function createActionBar(parent, config)
460 local bar = CreateFrame("Frame", "OmaBTBar"..config.bar, parent, "SecureFrameTemplate");
461 bar:SetPoint("TOPLEFT", parent, "BOTTOMLEFT", config.x, config.y);
464 if config.hidden then
467 for slot = config.start, config.start+config.length-1 do
468 local secure = CreateFrame("CheckButton", "OmaBT"..slot, bar, inheritedFrames);
470 if slot == config.start then
471 secure:SetPoint("TOPLEFT");
472 elseif config.columns and i % config.columns == 0 then
473 secure:SetPoint("TOPLEFT", _G["OmaBT"..(slot-config.columns)], "BOTTOMLEFT");
475 secure:SetPoint("TOPLEFT", prev, "TOPRIGHT");
477 secure:RegisterForClicks("AnyUp");
478 if not BUTTONLOCK then
479 secure:RegisterForDrag("LeftButton", "RightButton");
481 if config.nomouse then
482 secure:EnableMouse(false);
484 -- only show tooltips for bars with mouse interaction
485 secure:SetScript("OnEnter", showTooltip);
486 secure:SetScript("OnLeave", hideTooltip);
488 secure:SetWidth(config.size or 32);
489 secure:SetHeight(config.size or 32);
490 secure.base = secure:CreateTexture(nil, "BACKGROUND");
491 secure.base:SetAllPoints();
492 secure.base:SetColorTexture(0, 0, 0, 0.5);
493 secure.iconbase = secure:CreateTexture(nil, "BORDER");
494 secure.iconbase:SetPoint("TOPLEFT", secure.base, "TOPLEFT", 1, -1);
495 secure.iconbase:SetPoint("BOTTOMRIGHT", secure.base, "BOTTOMRIGHT", -1, 1);
496 secure.iconbase:SetColorTexture(0, 0, 0, 0.5);
497 secure.iconbase:Hide();
498 secure.icon = secure:CreateTexture(nil, "ARTWORK");
499 secure.icon:SetPoint("TOPLEFT", secure.iconbase, "TOPLEFT");
500 secure.icon:SetPoint("BOTTOMRIGHT", secure.iconbase, "BOTTOMRIGHT");
501 secure.icon:SetTexCoord(0.07, 0.93, 0.07, 0.93);
502 secure:SetCheckedTexture("Interface\\Buttons\\CheckButtonHilight");
503 secure.autocastable = secure:CreateTexture(nil, "OVERLAY");
504 secure.autocastable:SetPoint("CENTER");
505 secure.autocastable:SetWidth(58);
506 secure.autocastable:SetHeight(58);
507 secure.autocastable:SetTexture("Interface\\Buttons\\UI-AutoCastableOverlay");
508 secure.autocastable:Hide();
509 secure.glow = secure:CreateTexture(nil, "OVERLAY", nil, 1);
510 secure.glow:SetPoint("CENTER");
511 secure.glow:SetWidth(config.size and config.size+26 or 53);
512 secure.glow:SetHeight(config.size and config.size+26 or 53);
513 secure.glow:SetTexture("Interface\\SpellActivationOverlay\\IconAlert");
514 secure.glow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52634375);
516 secure.hotkey = secure:CreateFontString(nil, "OVERLAY", "NumberFontNormalGray");
517 secure.hotkey:SetPoint("TOPRIGHT", secure, "TOPRIGHT", 2, -1);
518 secure.count = secure:CreateFontString(nil, "OVERLAY", "NumberFontNormal");
519 secure.count:SetPoint("BOTTOMRIGHT", secure, "BOTTOMRIGHT", 2, -1);
520 secure.text = secure:CreateFontString(nil, "OVERLAY", "NumberFontNormal");
521 secure.text:SetPoint("BOTTOMLEFT", secure, "BOTTOMLEFT", 2, -1);
523 secure.cd = CreateFrame("Cooldown", "OmaBTCD"..slot, secure, "CooldownFrameTemplate");
524 secure.cd:SetAllPoints();
525 secure:SetAttribute("type", "action");
526 secure:SetAttribute("action", slot);
527 if config.flyout then
528 secure:SetAttribute("flyoutDirection", config.flyout);
530 function secure:ActionChanged(oldslot)
532 activeButtons[oldslot] = nil;
533 self.prev = nil; -- invalidate previous CD when slot changes
535 self.slot = self:GetAttribute("action");
536 return updateButton(self, self.slot);
538 secure:ActionChanged(); -- initial update
539 setupSnippets(secure, slot);
540 updateHotkeys(secure);
541 buttons[slot] = secure;
547 local function initialize()
548 local _, class = UnitClass("player");
549 local name, realm = UnitFullName("player");
550 ActionBars:SetFrameStrata("LOW");
551 ActionBars:SetPoint("BOTTOMLEFT");
552 ActionBars:SetWidth(1);
553 ActionBars:SetHeight(1);
554 for _, config in pairs(settings) do
555 if (not usingBonusbars[class] or not usingBonusbars[class][config.bar]) and
556 (not chars[realm] or not chars[realm][name] or chars[realm][name][config.bar]) then
557 createActionBar(ActionBars, config);
562 local function setupBindings()
563 _G["BINDING_HEADER_OmaAB"] = "Oma Action Bar";
565 _G["BINDING_HEADER_OMAABBLANK"..i] = "Bar "..i;
567 _G[format("BINDING_NAME_CLICK OmaBT%d:LeftButton", (i-1)*12+j)] = format("Bar %d Button %d", i, j);
572 local mounted = false;
575 ["ACTIONBAR_UPDATE_COOLDOWN"] = function()
576 for _, button in pairs(activeButtons) do
577 updateCooldown(button, button.slot);
580 ["SPELL_UPDATE_CHARGES"] = function()
581 for _, button in pairs(activeButtons) do
582 updateCount(button, button.slot);
585 ["ACTIONBAR_SLOT_CHANGED"] = function(slot)
586 if buttons[slot] then buttons[slot]:ActionChanged() end
588 ["ACTIONBAR_SHOWGRID"] = function()
589 for _, button in pairs(buttons) do
591 button.iconbase:Show();
592 if not activeButtons[button.slot] then button.base:Show() end
595 ["ACTIONBAR_HIDEGRID"] = function()
596 for _, button in pairs(buttons) do
598 button.iconbase:Hide();
599 if not activeButtons[button.slot] then button.base:Hide() end
602 ["ACTIONBAR_UPDATE_STATE"] = function()
603 for _, button in pairs(activeButtons) do
604 updateState(button, button.slot);
607 ["ACTIONBAR_UPDATE_USABLE"] = function()
608 for _, button in pairs(activeButtons) do
609 updateUsable(button, button.slot);
612 ["UPDATE_OVERRIDE_ACTIONBAR"] = function()
613 if buttons[1] then -- called before PLAYER_LOGIN
614 for _, button in pairs(buttons) do
615 updateButton(button, button.slot);
619 ["START_AUTOREPEAT_SPELL"] = function()
620 for _, button in pairs(activeButtons) do
621 if IsAutoRepeatAction(button.slot) then
622 button.autorepeating = true;
623 button.icon:SetVertexColor(0, 1, 0.5);
627 ["STOP_AUTOREPEAT_SPELL"] = function()
628 for _, button in pairs(activeButtons) do
629 if button.autorepeating then
630 button.autorepeating = nil;
631 updateUsable(button, button.slot);
635 ["SPELL_ACTIVATION_OVERLAY_GLOW_SHOW"] = function(spell)
636 -- TODO create mapping from spellIDs to buttons
637 for _, button in pairs(activeButtons) do
638 startGlow(button, button.slot, spell);
641 ["SPELL_ACTIVATION_OVERLAY_GLOW_HIDE"] = function(spell)
642 -- TODO create mapping from spellIDs to buttons
643 for _, button in pairs(activeButtons) do
644 stopGlow(button, button.slot, spell);
647 ["UPDATE_BINDINGS"] = function()
648 for _, button in pairs(buttons) do
649 updateHotkeys(button);
652 ["UNIT_AURA"] = function(unit)
653 -- using UNIT_AURA instead of COMPANION_UPDATE to not update every time
654 -- someone mounts, tracking player mount status with COMPANION_UPDATE is
656 if (not mounted and IsMounted()) or (mounted and not IsMounted()) then
657 mounted = not mounted;
658 for _, button in pairs(activeButtons) do
659 updateState(button, button.slot);
663 ["UPDATE_ALL_BUTTONS"] = function()
664 for _, button in pairs(buttons) do
665 updateButton(button, button.slot);
668 ["PLAYER_LOGIN"] = function()
671 ["ADDON_LOADED"] = function(addon)
672 if addon == "OmaAB" then
674 ActionBars:UnregisterEvent("ADDON_LOADED");
678 events["LOSS_OF_CONTROL_ADDED"] = events["ACTIONBAR_UPDATE_COOLDOWN"];
679 events["LOSS_OF_CONTROL_UPDATE"] = events["ACTIONBAR_UPDATE_COOLDOWN"];
680 events["PLAYER_MOUNT_DISPLAY_CHANGED"] = events["ACTIONBAR_UPDATE_USABLE"];
681 events["TRADE_SKILL_SHOW"] = events["ACTIONBAR_UPDATE_STATE"];
682 events["TRADE_SKILL_CLOSE"] = events["ACTIONBAR_UPDATE_STATE"];
683 events["ARCHAEOLOGY_CLOSED"] = events["ACTIONBAR_UPDATE_STATE"];
684 events["PLAYER_ENTERING_WORLD"] = events["UPDATE_ALL_BUTTONS"];
685 events["UPDATE_VEHICLE_ACTIONBAR"] = events["UPDATE_ALL_BUTTONS"];
686 events["UPDATE_SHAPESHIFT_FORM"] = events["UPDATE_ALL_BUTTONS"];
687 events["SPELL_UPDATE_ICON"] = events["UPDATE_ALL_BUTTONS"];
688 events["PET_STABLE_UPDATE"] = events["UPDATE_ALL_BUTTONS"];
689 events["PET_STABLE_SHOW"] = events["UPDATE_ALL_BUTTONS"];
690 events["PLAYER_SPECIALIZATION_CHANGED"] = events["UPDATE_ALL_BUTTONS"];
691 events["UNIT_ENTERED_VEHICLE"] = function(unit)
692 if unit == "player" then events["ACTIONBAR_UPDATE_STATE"]() end
694 events["UNIT_EXITED_VEHICLE"] = events["UNIT_ENTERED_VEHICLE"];
696 ActionBars:RegisterEvent("ADDON_LOADED");
697 ActionBars:RegisterEvent("PLAYER_LOGIN");
698 ActionBars:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN");
699 ActionBars:RegisterEvent("ACTIONBAR_UPDATE_USABLE");
700 ActionBars:RegisterEvent("ACTIONBAR_UPDATE_STATE");
701 ActionBars:RegisterEvent("ACTIONBAR_SLOT_CHANGED");
702 ActionBars:RegisterEvent("ACTIONBAR_SHOWGRID");
703 ActionBars:RegisterEvent("ACTIONBAR_HIDEGRID");
704 ActionBars:RegisterEvent("SPELL_UPDATE_ICON");
705 ActionBars:RegisterEvent("SPELL_UPDATE_CHARGES");
706 ActionBars:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_SHOW");
707 ActionBars:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_HIDE");
708 ActionBars:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR");
709 ActionBars:RegisterEvent("UPDATE_OVERRIDE_ACTIONBAR");
710 ActionBars:RegisterEvent("PLAYER_MOUNT_DISPLAY_CHANGED");
711 ActionBars:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED");
712 ActionBars:RegisterEvent("UNIT_ENTERED_VEHICLE");
713 ActionBars:RegisterEvent("UNIT_EXITED_VEHICLE");
714 ActionBars:RegisterEvent("PET_STABLE_UPDATE");
715 ActionBars:RegisterEvent("PET_STABLE_SHOW");
716 ActionBars:RegisterEvent("UPDATE_BINDINGS");
717 ActionBars:RegisterUnitEvent("UNIT_AURA", "player");
718 ActionBars:SetScript("OnEvent", function(self, event, arg1)