-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCooldownManagerSlashCommand.lua
More file actions
29 lines (24 loc) · 837 Bytes
/
CooldownManagerSlashCommand.lua
File metadata and controls
29 lines (24 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
-- API cache
local IsAddOnLoaded = C_AddOns.IsAddOnLoaded
local InCombatLockdown = InCombatLockdown
-- Global environment
local _G = _G
local CooldownViewerSettings = _G.CooldownViewerSettings
-- Don't register /wa if WeakAuras or M33kAuras is loaded
local waLoaded = IsAddOnLoaded('WeakAuras') or IsAddOnLoaded('M33kAuras')
if waLoaded then
print('Cooldown Manager Slash Command: WeakAuras AddOn detected, only registering /cd and skipping /wa')
end
local function ShowCooldownViewerSettings()
if InCombatLockdown() or not CooldownViewerSettings then return end
if not CooldownViewerSettings:IsShown() then
CooldownViewerSettings:Show()
else
CooldownViewerSettings:Hide()
end
end
SLASH_CDMSC1 = '/cd'
SLASH_CDMSC2 = not waLoaded and '/wa' or nil
function SlashCmdList.CDMSC(msg, editbox)
ShowCooldownViewerSettings()
end