2016-05-06 15:29:04 +02:00
|
|
|
|
2016-05-10 11:07:23 +02:00
|
|
|
Rekt = LibStub("AceAddon-3.0"):NewAddon("Rekt", "AceConsole-3.0", "AceEvent-3.0")
|
|
|
|
Rekt.appName = "Rekt"
|
|
|
|
Rekt.dbName = "RektDB"
|
2016-05-10 11:18:26 +02:00
|
|
|
Rekt.version = "1.05"
|
2016-05-06 15:49:39 +02:00
|
|
|
|
2016-05-11 14:52:59 +02:00
|
|
|
Rekt.modules = {}
|
|
|
|
|
|
|
|
function Rekt:NewTrinketTrackerModule(name, priority, defaults)
|
|
|
|
local module = CreateFrame("Frame")
|
|
|
|
module.name = name
|
|
|
|
module.priority = priority or 0
|
|
|
|
module.defaults = defaults or {}
|
|
|
|
module.messages = {}
|
|
|
|
|
|
|
|
module.RegisterMessage = function(self, message, func)
|
|
|
|
self.messages[message] = func or message
|
|
|
|
end
|
|
|
|
|
|
|
|
module.GetOptions = function()
|
|
|
|
return nil
|
|
|
|
end
|
|
|
|
|
|
|
|
if defaults then
|
|
|
|
for k, v in pairs(defaults) do
|
|
|
|
self:Print(k);
|
|
|
|
Rekt.defaults.profile[k] = v;
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
self.modules[name] = module
|
|
|
|
|
|
|
|
return module
|
|
|
|
end
|
|
|
|
|
2016-05-10 11:07:23 +02:00
|
|
|
function Rekt:HideFrames()
|
2016-05-06 15:49:39 +02:00
|
|
|
for i = 1, 23 do
|
|
|
|
local frame = self.frames["target"][i]["frame"];
|
|
|
|
frame:Hide();
|
|
|
|
end
|
|
|
|
for i = 1, 23 do
|
|
|
|
local frame = self.frames["focus"][i]["frame"];
|
|
|
|
frame:Hide();
|
|
|
|
end
|
2016-05-06 15:55:37 +02:00
|
|
|
for i = 1, 18 do
|
|
|
|
local frame = self.frames["targetdr"][i]["frame"];
|
|
|
|
frame:Hide();
|
|
|
|
end
|
|
|
|
for i = 1, 18 do
|
|
|
|
local frame = self.frames["focusdr"][i]["frame"];
|
|
|
|
frame:Hide();
|
|
|
|
end
|
|
|
|
for i = 1, 18 do
|
|
|
|
local frame = self.frames["selfdr"][i]["frame"];
|
|
|
|
frame:Hide();
|
|
|
|
end
|
2016-05-06 15:49:39 +02:00
|
|
|
end
|