forked from BreakBB/ExtendedCharacterStats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ECS.lua
executable file
·34 lines (25 loc) · 938 Bytes
/
ECS.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
---@class ECS
ECS = {...}
ECS.IsTBC = WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC
---@type Init
local Init = ECSLoader:ImportModule("Init")
local loadingFrame = CreateFrame("Frame")
ECS.loadingFrame = loadingFrame
loadingFrame:RegisterEvent("ADDON_LOADED") -- Triggers whenever all non-lod addons has been loaded, this will initialize the addon
loadingFrame:SetScript("OnEvent", function(self, event, arg1, ...)
if event == "ADDON_LOADED" and arg1 == "ExtendedCharacterStats" then
Init:OnAddonLoaded()
self:RegisterEvent("PLAYER_LOGIN") -- Triggers whenever the player has logged in and all addons are loaded
end
if event == "PLAYER_LOGIN" then
Init:OnPlayerLogin()
end
end)
---@param message string
function ECS:Error(message)
ECS:Print("|cffff0000ERROR|r " .. message)
end
---@param message string
function ECS:Print(message)
print("|cFF1de9b6[ECS]|r " .. message)
end