-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Initialize.lua
33 lines (24 loc) · 917 Bytes
/
Initialize.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
local addonName, addon = ...
local LibStub = _G.LibStub
local GetLocale = GetLocale
local C_AddOns_GetAddOnMetadata = C_AddOns.GetAddOnMetadata
local Engine = LibStub("AceAddon-3.0"):NewAddon(addonName, "AceEvent-3.0")
local Locale = LibStub("AceLocale-3.0"):GetLocale(addonName, true)
addon[1] = Engine
addon[2] = {} -- Funtions
addon[3] = Locale
-- Utilities namespace
Engine.Utilities = {}
-- Variables
Engine.AddonNamePlain = "WindChatFilter"
Engine.AddonName = Locale["Wind Chat Filter"]
Engine.Version = C_AddOns_GetAddOnMetadata(addonName, "Version")
Engine.AddonMsgPrefix = "WINDCF"
Engine.Locale = GetLocale()
Engine.isChineseClient = Engine.Locale == "zhCN" or Engine.Locale == "zhTW"
Engine.myGUID = UnitGUID("player")
Engine.myFaction = UnitFactionGroup("player")
hooksecurefunc(Engine, "NewModule", function(_, name)
addon[2].Developer.InjectLogger(name)
end)
_G[Engine.AddonNamePlain] = addon