-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMain.lua
37 lines (30 loc) · 948 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
local addonName, addonTable = ...
_G[addonName] = addonTable
--- @type MaxDps
if not MaxDps then return end
local Warlock = MaxDps:NewModule('Warlock', 'AceEvent-3.0')
addonTable.Warlock = Warlock
local MaxDps = MaxDps
Warlock.spellMeta = {
__index = function(t, k)
print('Spell Key ' .. k .. ' not found!')
end
}
function Warlock:Enable()
if MaxDps.Spec == 1 then
MaxDps:Print(MaxDps.Colors.Info .. 'Warlock Affliction', "info")
MaxDps.NextSpell = Warlock.Affliction
elseif MaxDps.Spec == 2 then
MaxDps:Print(MaxDps.Colors.Info .. 'Warlock Demonology', "info")
MaxDps.NextSpell = Warlock.Demonology
--self:RegisterEvent('COMBAT_LOG_EVENT_UNFILTERED', 'CLEU')
elseif MaxDps.Spec == 3 then
MaxDps:Print(MaxDps.Colors.Info .. 'Warlock Destruction', "info")
MaxDps.NextSpell = Warlock.Destruction
end
Warlock.playerLevel = UnitLevel('player')
return true
end
function Warlock:Disable()
self:UnregisterAllEvents()
end