forked from fiskee/DoMeWhen-Classic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCore.lua
More file actions
59 lines (56 loc) · 1.52 KB
/
Copy pathCore.lua
File metadata and controls
59 lines (56 loc) · 1.52 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
48
49
50
51
52
53
54
55
56
57
58
59
DMW = LibStub("AceAddon-3.0"):NewAddon("DMW", "AceConsole-3.0")
local DMW = DMW
DMW.Tables = {}
DMW.Enums = {}
DMW.Functions = {}
DMW.Rotations = {}
DMW.Player = {}
DMW.UI = {}
DMW.Settings = {}
DMW.Helpers = {}
DMW.Pulses = 0
local Initialized = false
local function FindRotation()
if DMW.Rotations[DMW.Player.Class] and DMW.Rotations[DMW.Player.Class].Rotation then
DMW.Player.Rotation = DMW.Rotations[DMW.Player.Class].Rotation
if DMW.Rotations[DMW.Player.Class].Settings then
DMW.Rotations[DMW.Player.Class].Settings()
end
DMW.UI.HUD.Load()
end
end
local function Init()
DMW.InitSettings()
DMW.UI.Init()
DMW.UI.HUD.Init()
DMW.Player = DMW.Classes.LocalPlayer(ObjectPointer("player"))
DMW.UI.InitQueue()
Initialized = true
end
local f = CreateFrame("Frame", "DoMeWhen", UIParent)
f:SetScript(
"OnUpdate",
function(self, elapsed)
DMW.Time = GetTime()
DMW.Pulses = DMW.Pulses + 1
if EWT ~= nil then
if not Initialized then
Init()
end
DMW.UpdateOM()
DMW.Helpers.Quest.Run()
DMW.Helpers.Gatherers.Run()
if not DMW.Player.Rotation then
FindRotation()
return
else
if DMW.Helpers.Queue.Run() then
return
end
if DMW.Helpers.Rotation.Active() then
DMW.Player.Rotation()
end
end
end
end
)