mirror of
https://github.com/Relintai/Relintais-Enemy-Kooldown-Tracker-WotLK.git
synced 2024-11-08 10:12:11 +01:00
-I added a dependeny to the TBC version, Here are the modified files, so they are the same.
(Trinkettracker, it's not needed here, as in WotLK the pvptrinket fires a SPELL_CAST_SUCCESS event).
This commit is contained in:
parent
b2cf208b1a
commit
1dcb9b4342
16
Rekt.lua
16
Rekt.lua
@ -221,6 +221,9 @@ function Rekt:OnInitialize()
|
|||||||
aceCDialog:AddToBlizOptions("Rekt");
|
aceCDialog:AddToBlizOptions("Rekt");
|
||||||
self:RegisterChatCommand("Rekt", "ChatCommand");
|
self:RegisterChatCommand("Rekt", "ChatCommand");
|
||||||
|
|
||||||
|
for k, v in pairs(Rekt.modules) do
|
||||||
|
v["Initialise"]();
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Rekt:OnEnable()
|
function Rekt:OnEnable()
|
||||||
@ -230,6 +233,7 @@ function Rekt:OnEnable()
|
|||||||
self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
|
self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
|
||||||
self:RegisterEvent("PLAYER_TARGET_CHANGED");
|
self:RegisterEvent("PLAYER_TARGET_CHANGED");
|
||||||
self:RegisterEvent("PLAYER_FOCUS_CHANGED");
|
self:RegisterEvent("PLAYER_FOCUS_CHANGED");
|
||||||
|
--self:RegisterEvent("CHAT_MSG_ADDON");
|
||||||
self:CreateFrames("target");
|
self:CreateFrames("target");
|
||||||
self:CreateFrames("focus");
|
self:CreateFrames("focus");
|
||||||
self:CreateDRFrames("targetdr");
|
self:CreateDRFrames("targetdr");
|
||||||
@ -273,6 +277,7 @@ function Rekt:OnDisable()
|
|||||||
self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
|
self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
|
||||||
self:UnregisterEvent("PLAYER_TARGET_CHANGED");
|
self:UnregisterEvent("PLAYER_TARGET_CHANGED");
|
||||||
self:UnregisterEvent("PLAYER_FOCUS_CHANGED");
|
self:UnregisterEvent("PLAYER_FOCUS_CHANGED");
|
||||||
|
--self:UnregisterEvent("CHAT_MSG_ADDON");
|
||||||
self.Reset();
|
self.Reset();
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -399,6 +404,17 @@ function Rekt:ZONE_CHANGED_NEW_AREA()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--[[
|
||||||
|
function Rekt:CHAT_MSG_ADDON(prefix, message, channel, sender)
|
||||||
|
--self:Print(prefix .. " " .. message .. " " .. channel .. " " .. sender);
|
||||||
|
if message == "GladdyTrinketUsed" then
|
||||||
|
--Rekt:AddCd(srcGUID, spellID, eventType, srcFlags);
|
||||||
|
--SendAddonMessage("GladdyTrinketUsed", destGUID)
|
||||||
|
Rekt:AddCd(channel, 42292, "SPELL_CAST_SUCCESS", 0);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
]]--
|
||||||
|
|
||||||
function Rekt:ApplySettings()
|
function Rekt:ApplySettings()
|
||||||
local db = Rekt.db.profile;
|
local db = Rekt.db.profile;
|
||||||
|
|
||||||
|
@ -4,6 +4,35 @@ Rekt.appName = "Rekt"
|
|||||||
Rekt.dbName = "RektDB"
|
Rekt.dbName = "RektDB"
|
||||||
Rekt.version = "1.05"
|
Rekt.version = "1.05"
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
function Rekt:HideFrames()
|
function Rekt:HideFrames()
|
||||||
for i = 1, 23 do
|
for i = 1, 23 do
|
||||||
local frame = self.frames["target"][i]["frame"];
|
local frame = self.frames["target"][i]["frame"];
|
||||||
|
@ -720,6 +720,28 @@ function Rekt:getGlobalOptions()
|
|||||||
end
|
end
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
--[[
|
||||||
|
--100+ (Modules)
|
||||||
|
local ordern = 1;
|
||||||
|
for k, v in pairs(self.modules) do
|
||||||
|
local options = v:GetOptions()
|
||||||
|
|
||||||
|
args["moduleheader" .. ordern] = {
|
||||||
|
type = "header", name = "Other settings", order = 100 * ordern
|
||||||
|
};
|
||||||
|
|
||||||
|
local orderic = 1;
|
||||||
|
for k1, v1 in pairs(options) do
|
||||||
|
args[k1] = {
|
||||||
|
type = v1["type"], name = v1["name"], order = (100 * ordern) + orderic
|
||||||
|
};
|
||||||
|
end
|
||||||
|
|
||||||
|
ordern = ordern + 1
|
||||||
|
end
|
||||||
|
]]--
|
||||||
|
|
||||||
return args;
|
return args;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user