-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMain.lua
42 lines (35 loc) · 1014 Bytes
/
Main.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
--- ============================ HEADER ============================
--- ======= LOCALIZE =======
-- Addon
local addonName, AT = ...;
-- HeroLib
local HL = HeroLib;
local Cache = HeroCache;
local Unit = HL.Unit;
local Player = Unit.Player;
local Target = Unit.Target;
local Spell = HL.Spell;
local Item = HL.Item;
-- File Locals
--- ======= GLOBALIZE =======
-- Addon
AethysTools = AT;
--- ============================ CONTENT ============================
-- Create the MainFrame
AT.MainFrame = CreateFrame("Frame", "AethysTools_MainFrame", UIParent);
-- Main
AT.Timer = {
Pulse = 0,
TTD = 0
};
function AT.Pulse ()
if GetTime(true) > AT.Timer.Pulse then
AT.Timer.Pulse = GetTime() + HL.Timer.PulseOffset;
if AT.GUISettings.Nameplates.TTD.Enabled and GetTime() > AT.Timer.TTD then
AT.Timer.TTD = HL.Timer.TTD;
AT.Nameplate.AddTTD();
end
end
end
-- Register the Pulse
AT.MainFrame:SetScript("OnUpdate", AT.Pulse);