This repository has been archived by the owner on Nov 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInit.lua
48 lines (37 loc) · 1.91 KB
/
Init.lua
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
48
----------------------------------------------------------------------------------------------------------------------
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------------------------------------------------------------------------------------
local addonName, CLL = ...
if not CLL then return end
-- Initialise shared resources
ContainerLootLogger = LibStub("AceAddon-3.0"):NewAddon("ContainerLootLogger", "AceConsole-3.0", "AceEvent-3.0")
CLL.L = LibStub("AceLocale-3.0"):GetLocale("ContainerLootLogger")
CLL.version = GetAddOnMetadata("ContainerLootLogger", "Version")
--@debug@
CLL.version = "DEBUG"
--@end-debug@
CLL.obj = ContainerLootLogger
-- Initialise modules
CLL.DB = CLL.DB or {}
CLL.Debug = CLL.Debug or {}
CLL.Output = CLL.Output or {}
CLL.SlashCmds = CLL.SlashCmds or {}
CLL.Tracking = CLL.Tracking or {}
CLL.Statistics = CLL.Statistics or {}
-- Global functions (TODO: May be moved elsewhere later)
-- Returns name - realm for a given character (or the current player if none were given)
function CLL.GetFQCN(characterName, realm)
characterName = (type(characterName) == "string" and characterName) or UnitName("player")
realm = (type(realm) == "string" and realm) or GetRealmName()
local key = format("%s - %s", characterName, realm)
return key
end