-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCore.lua
More file actions
47 lines (39 loc) · 1 KB
/
Copy pathCore.lua
File metadata and controls
47 lines (39 loc) · 1 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
-- Core.lua
-- Main addon initialization and namespace
local ADDON_NAME, LSS = ...
-- Addon info
LSS.version = C_AddOns.GetAddOnMetadata(ADDON_NAME, "Version")
LSS.author = C_AddOns.GetAddOnMetadata(ADDON_NAME, "Author")
-- Module references (will be populated by modules)
LSS.db = nil
LSS.specManager = nil
LSS.eventHandler = nil
LSS.commands = nil
LSS.ui = nil
LSS.config = nil
-- Constants
LSS.DIFFICULTY_NAMES = {
[1] = "Dungeon Normal",
[2] = "Dungeon Heroic",
[14] = "Raid Normal",
[15] = "Raid Heroic",
[16] = "Raid Mythic",
[17] = "Raid LFR",
[23] = "Dungeon Mythic",
}
-- Utility functions
function LSS:Print(msg, ...)
if not self.db or not self.db:IsSilenced() then
print("|cff00ff00[LSS]|r", string.format(msg, ...))
end
end
function LSS:Debug(msg, ...)
if self.db and self.db:IsDebugMode() then
print("|cffff8800[LSS Debug]|r", string.format(msg, ...))
end
end
function LSS:Error(msg, ...)
print("|cffff0000[LSS Error]|r", string.format(msg, ...))
end
-- Global accessor
_G[ADDON_NAME] = LSS