mirror of
https://github.com/Relintai/Relintais-Enemy-Kooldown-Tracker-TBC.git
synced 2024-11-14 10:37:32 +01:00
I just realized what Rect means for english mothertongue people, so now the addon is renamed to Rekt.
This commit is contained in:
parent
2ad449ae9d
commit
688adcf90c
@ -6,23 +6,23 @@ local aceConfig = LibStub("AceConfig-3.0");
|
||||
local libSharedMedia = LibStub("LibSharedMedia-3.0");
|
||||
local libDRData = LibStub('DRData-1.0');
|
||||
|
||||
Rect.CombatlogFixTimerData = {
|
||||
Rekt.CombatlogFixTimerData = {
|
||||
["lasttick"] = 0,
|
||||
["timesinceclear"] = 0
|
||||
}
|
||||
|
||||
Rect.MovableFrames = nil
|
||||
Rekt.MovableFrames = nil
|
||||
|
||||
Rect.targets = {
|
||||
Rekt.targets = {
|
||||
["target"] = nil,
|
||||
["focus"] = nil,
|
||||
["self"] = nil
|
||||
}
|
||||
|
||||
Rect.cds = {}
|
||||
Rect.drs = {}
|
||||
Rekt.cds = {}
|
||||
Rekt.drs = {}
|
||||
|
||||
Rect.frames = {
|
||||
Rekt.frames = {
|
||||
["target"] = {},
|
||||
["focus"] = {},
|
||||
["targetdr"] = {},
|
||||
@ -30,7 +30,7 @@ Rect.frames = {
|
||||
["selfdr"] = {}
|
||||
}
|
||||
|
||||
Rect.defaults = {
|
||||
Rekt.defaults = {
|
||||
profile = {
|
||||
enabled = true,
|
||||
locked = true,
|
||||
@ -183,26 +183,26 @@ Rect.defaults = {
|
||||
}
|
||||
}
|
||||
|
||||
function Rect:Reset()
|
||||
Rect.cds = {}
|
||||
Rect.drs = {}
|
||||
Rect.target = {unitGUID = -1, timers = {}}
|
||||
Rect.focus = {unitGUID = -1, timers = {}}
|
||||
Rect:HideSelfDRFrames();
|
||||
function Rekt:Reset()
|
||||
Rekt.cds = {}
|
||||
Rekt.drs = {}
|
||||
Rekt.target = {unitGUID = -1, timers = {}}
|
||||
Rekt.focus = {unitGUID = -1, timers = {}}
|
||||
Rekt:HideSelfDRFrames();
|
||||
end
|
||||
|
||||
function Rect:OnInitialize()
|
||||
self.db = aceDB:New("RectDB", self.defaults);
|
||||
function Rekt:OnInitialize()
|
||||
self.db = aceDB:New("RektDB", self.defaults);
|
||||
self.db.RegisterCallback(self, "OnProfileChanged", function() self:ApplySettings() end);
|
||||
self.db.RegisterCallback(self, "OnProfileCopied", function() self:ApplySettings() end);
|
||||
self.db.RegisterCallback(self, "OnProfileReset", function() self:ApplySettings() end);
|
||||
aceConfig:RegisterOptionsTable("Rect", self:GetRectOptions());
|
||||
aceCDialog:AddToBlizOptions("Rect");
|
||||
self:RegisterChatCommand("Rect", "ChatCommand");
|
||||
aceConfig:RegisterOptionsTable("Rekt", self:GetRektOptions());
|
||||
aceCDialog:AddToBlizOptions("Rekt");
|
||||
self:RegisterChatCommand("Rekt", "ChatCommand");
|
||||
|
||||
end
|
||||
|
||||
function Rect:OnEnable()
|
||||
function Rekt:OnEnable()
|
||||
self:Reset()
|
||||
self:RegisterEvent("PLAYER_ENTERING_WORLD");
|
||||
self:RegisterEvent("ZONE_CHANGED_NEW_AREA");
|
||||
@ -223,9 +223,9 @@ function Rect:OnEnable()
|
||||
f:SetScript("OnUpdate", function() self:CombatLogClearFix() end);
|
||||
end
|
||||
|
||||
function Rect:CombatLogClearFix()
|
||||
function Rekt:CombatLogClearFix()
|
||||
--delta is in seconds
|
||||
local delta = GetTime() - Rect.CombatlogFixTimerData["lasttick"];
|
||||
local delta = GetTime() - Rekt.CombatlogFixTimerData["lasttick"];
|
||||
|
||||
--this will happen on the first run, this is here, becouse on the first test,
|
||||
--the first clear on load just bugged the addon, until the second clear
|
||||
@ -233,7 +233,7 @@ function Rect:CombatLogClearFix()
|
||||
return;
|
||||
end
|
||||
|
||||
local tslc = Rect.CombatlogFixTimerData["timesinceclear"] + delta;
|
||||
local tslc = Rekt.CombatlogFixTimerData["timesinceclear"] + delta;
|
||||
|
||||
--30 seconds should be enough
|
||||
if tslc >= 30 then
|
||||
@ -241,11 +241,11 @@ function Rect:CombatLogClearFix()
|
||||
tslc = 0;
|
||||
end
|
||||
|
||||
Rect.CombatlogFixTimerData["timesinceclear"] = tslc;
|
||||
Rect.CombatlogFixTimerData["lasttick"] = GetTime();
|
||||
Rekt.CombatlogFixTimerData["timesinceclear"] = tslc;
|
||||
Rekt.CombatlogFixTimerData["lasttick"] = GetTime();
|
||||
end
|
||||
|
||||
function Rect:OnDisable()
|
||||
function Rekt:OnDisable()
|
||||
self:UnregisterEvent("PLAYER_ENTERING_WORLD");
|
||||
self:UnregisterEvent("ZONE_CHANGED_NEW_AREA");
|
||||
self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
|
||||
@ -255,11 +255,11 @@ function Rect:OnDisable()
|
||||
end
|
||||
|
||||
|
||||
function Rect:ChatCommand(input)
|
||||
function Rekt:ChatCommand(input)
|
||||
if not input or input:trim() == "" then
|
||||
aceCDialog:Open("Rect");
|
||||
aceCDialog:Open("Rekt");
|
||||
else
|
||||
LibStub("AceConfigCmd-3.0").HandleCommand(Rect, "Rect", "Rect", input);
|
||||
LibStub("AceConfigCmd-3.0").HandleCommand(Rekt, "Rekt", "Rekt", input);
|
||||
end
|
||||
end
|
||||
|
||||
@ -268,10 +268,10 @@ local COMBATLOG_OBJECT_REACTION_HOSTILE = COMBATLOG_OBJECT_REACTION_HOSTILE
|
||||
local COMBATLOG_OBJECT_CONTROL_PLAYER = COMBATLOG_OBJECT_CONTROL_PLAYER
|
||||
|
||||
|
||||
function Rect:COMBAT_LOG_EVENT_UNFILTERED(_, timestamp, eventType, srcGUID, srcName, srcFlags,
|
||||
function Rekt:COMBAT_LOG_EVENT_UNFILTERED(_, timestamp, eventType, srcGUID, srcName, srcFlags,
|
||||
dstGUID, dstName, dstFlags, spellID, spellName, spellSchool,
|
||||
detail1, detail2, detail3)
|
||||
local db = Rect.db.profile;
|
||||
local db = Rekt.db.profile;
|
||||
|
||||
if not db["enabled"] then return end;
|
||||
|
||||
@ -295,8 +295,8 @@ function Rect:COMBAT_LOG_EVENT_UNFILTERED(_, timestamp, eventType, srcGUID, srcN
|
||||
self:Print("id: " .. spellID .. " spellName: " .. spellName);
|
||||
end
|
||||
|
||||
if Rect.spells[spellID] then
|
||||
Rect:AddCd(srcGUID, spellID);
|
||||
if Rekt.spells[spellID] then
|
||||
Rekt:AddCd(srcGUID, spellID);
|
||||
end
|
||||
end
|
||||
|
||||
@ -310,7 +310,7 @@ function Rect:COMBAT_LOG_EVENT_UNFILTERED(_, timestamp, eventType, srcGUID, srcN
|
||||
end
|
||||
|
||||
local drCat = libDRData:GetSpellCategory(spellID);
|
||||
Rect:DRDebuffGained(spellID, dstGUID, isPlayer);
|
||||
Rekt:DRDebuffGained(spellID, dstGUID, isPlayer);
|
||||
end
|
||||
|
||||
-- Enemy had a debuff refreshed before it faded, so fade + gain it quickly
|
||||
@ -322,8 +322,8 @@ function Rect:COMBAT_LOG_EVENT_UNFILTERED(_, timestamp, eventType, srcGUID, srcN
|
||||
return
|
||||
end
|
||||
|
||||
Rect:DRDebuffFaded(spellID, dstGUID, isPlayer);
|
||||
Rect:DRDebuffGained(spellID, dstGUID, isPlayer);
|
||||
Rekt:DRDebuffFaded(spellID, dstGUID, isPlayer);
|
||||
Rekt:DRDebuffGained(spellID, dstGUID, isPlayer);
|
||||
end
|
||||
|
||||
-- Buff or debuff faded from an enemy
|
||||
@ -335,42 +335,42 @@ function Rect:COMBAT_LOG_EVENT_UNFILTERED(_, timestamp, eventType, srcGUID, srcN
|
||||
return
|
||||
end
|
||||
|
||||
Rect:DRDebuffFaded(spellID, dstGUID, isPlayer);
|
||||
Rekt:DRDebuffFaded(spellID, dstGUID, isPlayer);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:PLAYER_TARGET_CHANGED()
|
||||
function Rekt:PLAYER_TARGET_CHANGED()
|
||||
local unitGUID = UnitGUID("target");
|
||||
self.targets["target"] = unitGUID;
|
||||
self:ReassignCds("target");
|
||||
self:ReassignDRs("targetdr");
|
||||
end
|
||||
|
||||
function Rect:PLAYER_FOCUS_CHANGED()
|
||||
function Rekt:PLAYER_FOCUS_CHANGED()
|
||||
local unitGUID = UnitGUID("focus");
|
||||
self.targets["focus"] = unitGUID;
|
||||
self:ReassignCds("focus");
|
||||
self:ReassignDRs("focusdr");
|
||||
end
|
||||
|
||||
function Rect:PLAYER_ENTERING_WORLD()
|
||||
function Rekt:PLAYER_ENTERING_WORLD()
|
||||
--DB cleanup
|
||||
local t = GetTime();
|
||||
for k, v in pairs(Rect.cds) do
|
||||
for k, v in pairs(Rekt.cds) do
|
||||
for i, j in pairs(v) do
|
||||
if not (i == "spec") then
|
||||
if j[2] < t then
|
||||
--self:Print(Rect.cds[k][i][4]);
|
||||
Rect.cds[k][i] = nil;
|
||||
--self:Print(Rekt.cds[k][i][4]);
|
||||
Rekt.cds[k][i] = nil;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Rect.drs = {}
|
||||
Rekt.drs = {}
|
||||
end
|
||||
|
||||
function Rect:ZONE_CHANGED_NEW_AREA()
|
||||
function Rekt:ZONE_CHANGED_NEW_AREA()
|
||||
local type = select(2, IsInInstance())
|
||||
-- If we are entering an arena
|
||||
if (type == "arena") then
|
||||
@ -378,17 +378,17 @@ function Rect:ZONE_CHANGED_NEW_AREA()
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:ApplySettings()
|
||||
local db = Rect.db.profile;
|
||||
Rect:MoveTimersStop("target");
|
||||
Rect:MoveTimersStop("focus");
|
||||
Rect:ReassignCds("target");
|
||||
Rect:ReassignCds("focus");
|
||||
Rect:MoveDRTimersStop("targetdr");
|
||||
Rect:MoveDRTimersStop("focusdr");
|
||||
Rect:MoveDRTimersStop("selfdr");
|
||||
Rect:ReassignDRs("targetdr");
|
||||
Rect:ReassignDRs("focusdr");
|
||||
Rect:ReassignDRs("selfdr");
|
||||
function Rekt:ApplySettings()
|
||||
local db = Rekt.db.profile;
|
||||
Rekt:MoveTimersStop("target");
|
||||
Rekt:MoveTimersStop("focus");
|
||||
Rekt:ReassignCds("target");
|
||||
Rekt:ReassignCds("focus");
|
||||
Rekt:MoveDRTimersStop("targetdr");
|
||||
Rekt:MoveDRTimersStop("focusdr");
|
||||
Rekt:MoveDRTimersStop("selfdr");
|
||||
Rekt:ReassignDRs("targetdr");
|
||||
Rekt:ReassignDRs("focusdr");
|
||||
Rekt:ReassignDRs("selfdr");
|
||||
if not db["locked"] then self:ShowMovableFrames() end;
|
||||
end
|
@ -1,11 +1,11 @@
|
||||
## Interface: 30300
|
||||
## Author: Relintai
|
||||
## Name: Rect
|
||||
## Title: Rect
|
||||
## Notes: Relintai's Enemy Cooldown Tracker.
|
||||
## Name: Rekt
|
||||
## Title: Rekt
|
||||
## Notes: Relintai's Enemy "Kooldown" Tracker.
|
||||
## DefaultState: Enabled
|
||||
## OptionalDeps: Ace3
|
||||
## SavedVariables: RectDB
|
||||
## SavedVariables: RektDB
|
||||
## Version: 1.01
|
||||
|
||||
embeds.xml
|
||||
@ -16,4 +16,4 @@ data\options.lua
|
||||
data\sorters.lua
|
||||
data\drs.lua
|
||||
data\cooldowns.lua
|
||||
Rect.lua
|
||||
Rekt.lua
|
@ -7,15 +7,15 @@ local libSharedMedia = LibStub("LibSharedMedia-3.0");
|
||||
local libDRData = LibStub('DRData-1.0');
|
||||
|
||||
--gets called when a cd is finished, reassigns the cds to frames.
|
||||
function Rect:ReassignCds(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:ReassignCds(which)
|
||||
local db = Rekt.db.profile;
|
||||
--bail out early, if frames are disabled
|
||||
if not db[which]["enabled"] or not db["enabled"] then return end;
|
||||
--first hide all
|
||||
for i = 1, 23 do
|
||||
local frame = Rect.frames[which][i]["frame"];
|
||||
local frame = Rekt.frames[which][i]["frame"];
|
||||
frame:Hide();
|
||||
local colorframe = Rect.frames[which][i]["colorframe"];
|
||||
local colorframe = Rekt.frames[which][i]["colorframe"];
|
||||
colorframe:Hide();
|
||||
end
|
||||
--check if frames are unlocked
|
||||
@ -25,20 +25,20 @@ function Rect:ReassignCds(which)
|
||||
--check if we have cooldown for that unit
|
||||
if not self.cds[self.targets[which]] then return end;
|
||||
--update cds
|
||||
Rect:UpdateCds(which);
|
||||
Rekt:UpdateCds(which);
|
||||
--sort them
|
||||
local tmp = Rect:SortCDs(which);
|
||||
local tmp = Rekt:SortCDs(which);
|
||||
--let's fill them up
|
||||
local i = 1;
|
||||
for k, v in ipairs(tmp) do
|
||||
local frame = Rect.frames[which][i]["frame"];
|
||||
local text = Rect.frames[which][i]["texture"];
|
||||
local frame = Rekt.frames[which][i]["frame"];
|
||||
local text = Rekt.frames[which][i]["texture"];
|
||||
text:SetTexture(v["spellIcon"]);
|
||||
local CoolDown = Rect.frames[which][i]["cooldown"];
|
||||
local CoolDown = Rekt.frames[which][i]["cooldown"];
|
||||
CoolDown:SetCooldown(v["currentTime"], v["cd"]);
|
||||
frame:Show();
|
||||
if (db[which]["colorframeenabled"]) then
|
||||
local colorframe = Rect.frames[which][i]["colorframe"];
|
||||
local colorframe = Rekt.frames[which][i]["colorframe"];
|
||||
--self:Print(v["spellID"] .. " cat: " .. v["spellCategory"]);
|
||||
|
||||
colorframe:SetBackdropColor(db["color"][v["spellCategory"]]["r"],
|
||||
@ -51,31 +51,31 @@ function Rect:ReassignCds(which)
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:AddCd(srcGUID, spellID)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:AddCd(srcGUID, spellID)
|
||||
local db = Rekt.db.profile;
|
||||
if not db["enabled"] then return end;
|
||||
|
||||
if not Rect.cds[srcGUID] then
|
||||
Rect.cds[srcGUID] = {}
|
||||
Rect.cds[srcGUID]["spec"] = {};
|
||||
Rect.cds[srcGUID]["spec"][1] = 1;
|
||||
Rect.cds[srcGUID]["spec"][2] = "";
|
||||
if not Rekt.cds[srcGUID] then
|
||||
Rekt.cds[srcGUID] = {}
|
||||
Rekt.cds[srcGUID]["spec"] = {};
|
||||
Rekt.cds[srcGUID]["spec"][1] = 1;
|
||||
Rekt.cds[srcGUID]["spec"][2] = "";
|
||||
end
|
||||
|
||||
local specchange = false;
|
||||
if db["specdetection"] then
|
||||
if Rect:DetectSpec(srcGUID, spellID) then
|
||||
if Rekt:DetectSpec(srcGUID, spellID) then
|
||||
specchange = true;
|
||||
end
|
||||
end
|
||||
|
||||
local spec = Rect.cds[srcGUID]["spec"][1];
|
||||
local class, isPet = Rect.spells[spellID][7], Rect.spells[spellID][9];
|
||||
local cd, reset, spellCategory = Rect.spells[spellID][spec], Rect.spells[spellID][2], Rect.spells[spellID][8];
|
||||
local spec = Rekt.cds[srcGUID]["spec"][1];
|
||||
local class, isPet = Rekt.spells[spellID][7], Rekt.spells[spellID][9];
|
||||
local cd, reset, spellCategory = Rekt.spells[spellID][spec], Rekt.spells[spellID][2], Rekt.spells[spellID][8];
|
||||
|
||||
if db["petcdguessing"] then
|
||||
if (Rect.cds[srcGUID]["spec"][2] == "") and class then
|
||||
Rect.cds[srcGUID]["spec"][2] = class;
|
||||
if (Rekt.cds[srcGUID]["spec"][2] == "") and class then
|
||||
Rekt.cds[srcGUID]["spec"][2] = class;
|
||||
end
|
||||
end
|
||||
|
||||
@ -95,7 +95,7 @@ function Rect:AddCd(srcGUID, spellID)
|
||||
local spellName, spellRank, spellIcon = GetSpellInfo(spellID);
|
||||
local currentTime = GetTime();
|
||||
local endTime = currentTime + cd;
|
||||
Rect.cds[srcGUID][spellID] = {
|
||||
Rekt.cds[srcGUID][spellID] = {
|
||||
currentTime,
|
||||
endTime,
|
||||
cd,
|
||||
@ -106,9 +106,9 @@ function Rect:AddCd(srcGUID, spellID)
|
||||
|
||||
--add it to every class of the same type
|
||||
if db["petcdguessing"] and isPet then
|
||||
for k, v in pairs(Rect.cds) do
|
||||
for k, v in pairs(Rekt.cds) do
|
||||
if (v["spec"][2] == class) then
|
||||
Rect.cds[k][spellID] = {
|
||||
Rekt.cds[k][spellID] = {
|
||||
currentTime,
|
||||
endTime,
|
||||
cd,
|
||||
@ -120,10 +120,10 @@ function Rect:AddCd(srcGUID, spellID)
|
||||
end
|
||||
end
|
||||
|
||||
--self:Print(Rect.cds[srcGUID][spellID][1] .. " " .. Rect.cds[srcGUID][spellID][2] .. " " .. Rect.cds[srcGUID][spellID][3]);
|
||||
--self:Print(Rekt.cds[srcGUID][spellID][1] .. " " .. Rekt.cds[srcGUID][spellID][2] .. " " .. Rekt.cds[srcGUID][spellID][3]);
|
||||
|
||||
if reset then
|
||||
Rect:CdRemoval(srcGUID, reset);
|
||||
Rekt:CdRemoval(srcGUID, reset);
|
||||
end
|
||||
|
||||
--self:Print(self.targets["target"]);
|
||||
@ -138,28 +138,28 @@ function Rect:AddCd(srcGUID, spellID)
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:DetectSpec(srcGUID, spellID)
|
||||
local spec = Rect.spells[spellID][6];
|
||||
function Rekt:DetectSpec(srcGUID, spellID)
|
||||
local spec = Rekt.spells[spellID][6];
|
||||
|
||||
if spec == 0 then return false end;
|
||||
if Rect.cds[srcGUID]["spec"][1] == spec then return false end;
|
||||
if Rekt.cds[srcGUID]["spec"][1] == spec then return false end;
|
||||
--self:Print("spec found: " .. spec);
|
||||
Rect:RemapSpecCDs(srcGUID, spec);
|
||||
Rekt:RemapSpecCDs(srcGUID, spec);
|
||||
return true;
|
||||
end
|
||||
|
||||
function Rect:RemapSpecCDs(srcGUID, spec)
|
||||
function Rekt:RemapSpecCDs(srcGUID, spec)
|
||||
if not self.cds[srcGUID] then return end
|
||||
for k, v in pairs(self.cds[srcGUID]) do
|
||||
if not (k == "spec") then
|
||||
local cd = Rect.spells[v[5]][spec];
|
||||
local cd = Rekt.spells[v[5]][spec];
|
||||
v[3] = cd;
|
||||
v[2] = v[1] + cd;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:CdRemoval(srcGUID, resetArray)
|
||||
function Rekt:CdRemoval(srcGUID, resetArray)
|
||||
if not self.cds[srcGUID] then return end
|
||||
for k, v in pairs(self.cds[srcGUID]) do
|
||||
if not (k == "spec") then
|
||||
@ -173,8 +173,8 @@ function Rect:CdRemoval(srcGUID, resetArray)
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:SortCDs(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:SortCDs(which)
|
||||
local db = Rekt.db.profile;
|
||||
local tmp = {};
|
||||
|
||||
--make the tmp table
|
||||
@ -200,38 +200,38 @@ function Rect:SortCDs(which)
|
||||
|
||||
if not db["cdtypesortorder"]["enabled"] then
|
||||
if db[which]["sortOrder"] == "1" then --["1"] = "Ascending (CD left)",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerAscendingCDLeft(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerAscendingCDLeft(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "2" then --["2"] = "Descending (CD left)",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerDescendingCDLeft(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerDescendingCDLeft(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "3" then --["3"] = "Ascending (CD total)",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerAscendingCDTotal(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerAscendingCDTotal(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "4" then --["4"] = "Descending (CD total)",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerDescendingCDTotal(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerDescendingCDTotal(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "5" then --["5"] = "Recent first",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerRecentFirst(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerRecentFirst(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "6" then --["6"] = "Recent Last",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerRecentLast(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerRecentLast(a, b) end);
|
||||
end --["7"] = "No order"
|
||||
else
|
||||
if db[which]["sortOrder"] == "1" then --["1"] = "Ascending (CD left)",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerAscendingCDLeftT(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerAscendingCDLeftT(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "2" then --["2"] = "Descending (CD left)",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerDescendingCDLeftT(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerDescendingCDLeftT(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "3" then --["3"] = "Ascending (CD total)",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerAscendingCDTotalT(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerAscendingCDTotalT(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "4" then --["4"] = "Descending (CD total)",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerDescendingCDTotalT(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerDescendingCDTotalT(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "5" then --["5"] = "Recent first",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerRecentFirstT(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerRecentFirstT(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "6" then --["6"] = "Recent Last",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerRecentLastT(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerRecentLastT(a, b) end);
|
||||
end --["7"] = "No order"
|
||||
end
|
||||
|
||||
return tmp;
|
||||
end
|
||||
|
||||
function Rect:CreateFrames(which)
|
||||
function Rekt:CreateFrames(which)
|
||||
for i = 1, 23 do
|
||||
local frame = CreateFrame("Frame", nil, UIParent, nil);
|
||||
frame:SetFrameStrata("MEDIUM");
|
||||
@ -244,7 +244,7 @@ function Rect:CreateFrames(which)
|
||||
text:SetTexture("Interface\\Icons\\Spell_Arcane_Blink")
|
||||
text:SetAllPoints(frame);
|
||||
frame.texture = text;
|
||||
local CoolDown = CreateFrame("Cooldown", "RectCoolDown" .. i, frame);
|
||||
local CoolDown = CreateFrame("Cooldown", "RektCoolDown" .. i, frame);
|
||||
CoolDown:SetAllPoints()
|
||||
CoolDown:SetCooldown(GetTime(), 50);
|
||||
frame:Hide();
|
||||
@ -261,16 +261,16 @@ function Rect:CreateFrames(which)
|
||||
insets = nil});
|
||||
colorframe:Hide();
|
||||
|
||||
Rect.frames[which][i] = {}
|
||||
Rect.frames[which][i]["frame"] = frame;
|
||||
Rect.frames[which][i]["texture"] = text;
|
||||
Rect.frames[which][i]["cooldown"] = CoolDown;
|
||||
Rect.frames[which][i]["colorframe"] = colorframe;
|
||||
Rekt.frames[which][i] = {}
|
||||
Rekt.frames[which][i]["frame"] = frame;
|
||||
Rekt.frames[which][i]["texture"] = text;
|
||||
Rekt.frames[which][i]["cooldown"] = CoolDown;
|
||||
Rekt.frames[which][i]["colorframe"] = colorframe;
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:MoveTimersStop(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:MoveTimersStop(which)
|
||||
local db = Rekt.db.profile;
|
||||
local x = db[which]["xPos"];
|
||||
local y = db[which]["yPos"];
|
||||
local size = db[which]["size"];
|
||||
@ -278,16 +278,16 @@ function Rect:MoveTimersStop(which)
|
||||
local cdbacksize = db[which]["colorframesize"];
|
||||
|
||||
for i = 1, 23 do
|
||||
local frame = Rect.frames[which][i]["frame"];
|
||||
local frame = Rekt.frames[which][i]["frame"];
|
||||
frame:ClearAllPoints();
|
||||
frame:SetFrameStrata("MEDIUM");
|
||||
frame:SetWidth(size);
|
||||
frame:SetHeight(size);
|
||||
local text = Rect.frames[which][i]["texture"];
|
||||
local text = Rekt.frames[which][i]["texture"];
|
||||
text:SetAllPoints(frame);
|
||||
frame.texture = text;
|
||||
|
||||
local colorframe = Rect.frames[which][i]["colorframe"];
|
||||
local colorframe = Rekt.frames[which][i]["colorframe"];
|
||||
colorframe:ClearAllPoints();
|
||||
colorframe:SetFrameStrata("BACKGROUND");
|
||||
colorframe:SetBackdropColor(1, 1, 1, 1);
|
||||
@ -318,14 +318,14 @@ function Rect:MoveTimersStop(which)
|
||||
colorframe:SetHeight(size + (2 * cdbacksize));
|
||||
colorframe:SetPoint("BOTTOMLEFT", x - ((i - 1) * size), y - cdbacksize);
|
||||
end
|
||||
local CoolDown = Rect.frames[which][i]["cooldown"];
|
||||
local CoolDown = Rekt.frames[which][i]["cooldown"];
|
||||
CoolDown:SetAllPoints();
|
||||
--frame:Show();
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:VOnTimerUpdate(which)
|
||||
if (Rect:UpdateCds(which)) then
|
||||
function Rekt:VOnTimerUpdate(which)
|
||||
if (Rekt:UpdateCds(which)) then
|
||||
--we have to update both, because if somebody is targeted and focused since sorting is
|
||||
--implemented it triggers only one update, probably it had bugs before too, but got unnoticed
|
||||
self:ReassignCds("target");
|
||||
@ -333,7 +333,7 @@ function Rect:VOnTimerUpdate(which)
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:UpdateCds(which)
|
||||
function Rekt:UpdateCds(which)
|
||||
--check if we have cooldown for that unit
|
||||
if not self.cds[self.targets[which]] then return end
|
||||
local t = GetTime();
|
||||
|
126
data/drs.lua
126
data/drs.lua
@ -7,26 +7,26 @@ local libSharedMedia = LibStub("LibSharedMedia-3.0");
|
||||
local libDRData = LibStub('DRData-1.0');
|
||||
|
||||
--DR db functions
|
||||
function Rect:DRDebuffGained(spellID, dstGUID, isPlayer)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:DRDebuffGained(spellID, dstGUID, isPlayer)
|
||||
local db = Rekt.db.profile;
|
||||
if not db["enabled"] then return end;
|
||||
|
||||
if not Rect.drs[dstGUID] then
|
||||
Rect.drs[dstGUID] = {}
|
||||
if not Rekt.drs[dstGUID] then
|
||||
Rekt.drs[dstGUID] = {}
|
||||
end
|
||||
|
||||
local drCat = libDRData:GetSpellCategory(spellID);
|
||||
local spellName, spellRank, spellIcon = GetSpellInfo(spellID);
|
||||
|
||||
Rect:UpdateDRs(dstGUID);
|
||||
Rekt:UpdateDRs(dstGUID);
|
||||
|
||||
if not Rect.drs[dstGUID][drCat] then
|
||||
if not Rekt.drs[dstGUID][drCat] then
|
||||
local cd = 18;
|
||||
local currentTime = GetTime();
|
||||
local endTime = currentTime + cd;
|
||||
local diminished = 1;
|
||||
local isDiminishingStarted = false;
|
||||
Rect.drs[dstGUID][drCat] = {
|
||||
Rekt.drs[dstGUID][drCat] = {
|
||||
currentTime,
|
||||
endTime,
|
||||
cd,
|
||||
@ -40,20 +40,20 @@ function Rect:DRDebuffGained(spellID, dstGUID, isPlayer)
|
||||
local cd = 18;
|
||||
local currentTime = GetTime();
|
||||
local endTime = currentTime + cd;
|
||||
Rect.drs[dstGUID][drCat][1] = currentTime;
|
||||
Rect.drs[dstGUID][drCat][2] = currentTime + cd;
|
||||
Rect.drs[dstGUID][drCat][4] = spellIcon;
|
||||
Rect.drs[dstGUID][drCat][5] = spellID;
|
||||
Rect.drs[dstGUID][drCat][6] = Rect.drs[dstGUID][drCat][6] + 1;
|
||||
Rect.drs[dstGUID][drCat][7] = false;
|
||||
Rekt.drs[dstGUID][drCat][1] = currentTime;
|
||||
Rekt.drs[dstGUID][drCat][2] = currentTime + cd;
|
||||
Rekt.drs[dstGUID][drCat][4] = spellIcon;
|
||||
Rekt.drs[dstGUID][drCat][5] = spellID;
|
||||
Rekt.drs[dstGUID][drCat][6] = Rekt.drs[dstGUID][drCat][6] + 1;
|
||||
Rekt.drs[dstGUID][drCat][7] = false;
|
||||
|
||||
--reset it back to 1, x > 3 means, the server updated the dr in less than 18 sec.
|
||||
if Rect.drs[dstGUID][drCat][6] > 3 then
|
||||
Rect.drs[dstGUID][drCat][6] = 1;
|
||||
if Rekt.drs[dstGUID][drCat][6] > 3 then
|
||||
Rekt.drs[dstGUID][drCat][6] = 1;
|
||||
end
|
||||
end
|
||||
|
||||
--self:Print(Rect.cds[srcGUID][spellID][1] .. " " .. Rect.cds[srcGUID][spellID][2] .. " " .. Rect.cds[srcGUID][spellID][3]);
|
||||
--self:Print(Rekt.cds[srcGUID][spellID][1] .. " " .. Rekt.cds[srcGUID][spellID][2] .. " " .. Rekt.cds[srcGUID][spellID][3]);
|
||||
|
||||
if self.targets["target"] == dstGUID then
|
||||
self:ReassignDRs("targetdr");
|
||||
@ -68,27 +68,27 @@ function Rect:DRDebuffGained(spellID, dstGUID, isPlayer)
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:DRDebuffFaded(spellID, dstGUID, isPlayer)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:DRDebuffFaded(spellID, dstGUID, isPlayer)
|
||||
local db = Rekt.db.profile;
|
||||
if not db["enabled"] then return end;
|
||||
|
||||
if not Rect.drs[dstGUID] then
|
||||
Rect.drs[dstGUID] = {}
|
||||
if not Rekt.drs[dstGUID] then
|
||||
Rekt.drs[dstGUID] = {}
|
||||
end
|
||||
|
||||
local drCat = libDRData:GetSpellCategory(spellID);
|
||||
local spellName, spellRank, spellIcon = GetSpellInfo(spellID);
|
||||
|
||||
Rect:UpdateDRs(dstGUID);
|
||||
Rekt:UpdateDRs(dstGUID);
|
||||
|
||||
if not Rect.drs[dstGUID][drCat] then
|
||||
if not Rekt.drs[dstGUID][drCat] then
|
||||
--means we didn't see it applied
|
||||
local cd = 18;
|
||||
local currentTime = GetTime();
|
||||
local endTime = currentTime + cd;
|
||||
local diminished = 1;
|
||||
local isDiminishingStarted = true;
|
||||
Rect.drs[dstGUID][drCat] = {
|
||||
Rekt.drs[dstGUID][drCat] = {
|
||||
currentTime,
|
||||
endTime,
|
||||
cd,
|
||||
@ -102,12 +102,12 @@ function Rect:DRDebuffFaded(spellID, dstGUID, isPlayer)
|
||||
local cd = 18;
|
||||
local currentTime = GetTime();
|
||||
local endTime = currentTime + cd;
|
||||
Rect.drs[dstGUID][drCat][1] = currentTime;
|
||||
Rect.drs[dstGUID][drCat][2] = endTime;
|
||||
Rect.drs[dstGUID][drCat][7] = true;
|
||||
Rekt.drs[dstGUID][drCat][1] = currentTime;
|
||||
Rekt.drs[dstGUID][drCat][2] = endTime;
|
||||
Rekt.drs[dstGUID][drCat][7] = true;
|
||||
end
|
||||
|
||||
--self:Print(Rect.cds[srcGUID][spellID][1] .. " " .. Rect.cds[srcGUID][spellID][2] .. " " .. Rect.cds[srcGUID][spellID][3]);
|
||||
--self:Print(Rekt.cds[srcGUID][spellID][1] .. " " .. Rekt.cds[srcGUID][spellID][2] .. " " .. Rekt.cds[srcGUID][spellID][3]);
|
||||
|
||||
if self.targets["target"] == dstGUID then
|
||||
self:ReassignDRs("targetdr");
|
||||
@ -122,13 +122,13 @@ function Rect:DRDebuffFaded(spellID, dstGUID, isPlayer)
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:ReassignDRs(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:ReassignDRs(which)
|
||||
local db = Rekt.db.profile;
|
||||
--bail out early, if frames are disabled
|
||||
if not db[which]["enabled"] or not db["enabled"] then return end;
|
||||
--first hide all
|
||||
for i = 1, 18 do
|
||||
local frame = Rect.frames[which][i]["frame"];
|
||||
local frame = Rekt.frames[which][i]["frame"];
|
||||
frame:Hide();
|
||||
end
|
||||
--check if frames are unlocked
|
||||
@ -145,18 +145,18 @@ function Rect:ReassignDRs(which)
|
||||
|
||||
if not self.drs[self.targets[whichs]] then return end;
|
||||
--update then
|
||||
Rect:UpdateDRs(self.targets[whichs]);
|
||||
Rekt:UpdateDRs(self.targets[whichs]);
|
||||
--sort them
|
||||
local tmp = Rect:SortDRs(whichs);
|
||||
local tmp = Rekt:SortDRs(whichs);
|
||||
--let's fill them up
|
||||
local i = 1;
|
||||
for k, v in ipairs(tmp) do
|
||||
--self:Print(v["spellID"]);
|
||||
local frame = Rect.frames[which][i]["frame"];
|
||||
local text = Rect.frames[which][i]["texture"];
|
||||
local frame = Rekt.frames[which][i]["frame"];
|
||||
local text = Rekt.frames[which][i]["texture"];
|
||||
text:SetTexture(v["spellIcon"]);
|
||||
local CoolDown = Rect.frames[which][i]["cooldown"];
|
||||
local t = Rect.frames[which][i]["text"];
|
||||
local CoolDown = Rekt.frames[which][i]["cooldown"];
|
||||
local t = Rekt.frames[which][i]["text"];
|
||||
if v["isDiminishingStarted"] then
|
||||
CoolDown:SetCooldown(v["currentTime"], v["cd"]);
|
||||
else
|
||||
@ -173,8 +173,8 @@ function Rect:ReassignDRs(which)
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:SortDRs(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:SortDRs(which)
|
||||
local db = Rekt.db.profile;
|
||||
local tmp = {};
|
||||
|
||||
--make the tmp table
|
||||
@ -200,23 +200,23 @@ function Rect:SortDRs(which)
|
||||
if which == "self" then which = "selfdr" end
|
||||
|
||||
if db[which]["sortOrder"] == "1" then --["1"] = "Ascending (CD left)",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerAscendingCDLeft(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerAscendingCDLeft(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "2" then --["2"] = "Descending (CD left)",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerDescendingCDLeft(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerDescendingCDLeft(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "3" then --["3"] = "Ascending (CD total)",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerAscendingCDTotal(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerAscendingCDTotal(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "4" then --["4"] = "Descending (CD total)",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerDescendingCDTotal(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerDescendingCDTotal(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "5" then --["5"] = "Recent first",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerRecentFirst(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerRecentFirst(a, b) end);
|
||||
elseif db[which]["sortOrder"] == "6" then --["6"] = "Recent Last",
|
||||
table.sort(tmp, function(a, b) return Rect:ComparerRecentLast(a, b) end);
|
||||
table.sort(tmp, function(a, b) return Rekt:ComparerRecentLast(a, b) end);
|
||||
end
|
||||
--["7"] = "No order"
|
||||
return tmp;
|
||||
end
|
||||
|
||||
function Rect:CreateDRFrames(which)
|
||||
function Rekt:CreateDRFrames(which)
|
||||
for i = 1, 18 do
|
||||
local frame = CreateFrame("Frame", nil, UIParent, nil);
|
||||
frame:SetFrameStrata("MEDIUM");
|
||||
@ -239,7 +239,7 @@ function Rect:CreateDRFrames(which)
|
||||
text:SetTexture("Interface\\Icons\\Spell_Arcane_Blink")
|
||||
text:SetAllPoints(frame);
|
||||
frame.texture = text;
|
||||
local CoolDown = CreateFrame("Cooldown", "RectCoolDown" .. i, frame);
|
||||
local CoolDown = CreateFrame("Cooldown", "RektCoolDown" .. i, frame);
|
||||
CoolDown:SetAllPoints()
|
||||
CoolDown:SetCooldown(GetTime(), 50);
|
||||
local t = frame:CreateFontString(nil, "OVERLAY");
|
||||
@ -247,16 +247,16 @@ function Rect:CreateDRFrames(which)
|
||||
t:SetPoint("CENTER", frame, "CENTER", 0, 0);
|
||||
t:SetFont("Fonts\\FRIZQT__.TTF", 11, "OUTLINE, MONOCHROME")
|
||||
--frame:Hide();
|
||||
Rect.frames[which][i] = {}
|
||||
Rect.frames[which][i]["frame"] = frame;
|
||||
Rect.frames[which][i]["texture"] = text;
|
||||
Rect.frames[which][i]["cooldown"] = CoolDown;
|
||||
Rect.frames[which][i]["text"] = t;
|
||||
Rekt.frames[which][i] = {}
|
||||
Rekt.frames[which][i]["frame"] = frame;
|
||||
Rekt.frames[which][i]["texture"] = text;
|
||||
Rekt.frames[which][i]["cooldown"] = CoolDown;
|
||||
Rekt.frames[which][i]["text"] = t;
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:MoveDRTimersStop(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:MoveDRTimersStop(which)
|
||||
local db = Rekt.db.profile;
|
||||
local x = db[which]["xPos"];
|
||||
local y = db[which]["yPos"];
|
||||
local size = db[which]["size"];
|
||||
@ -265,12 +265,12 @@ function Rect:MoveDRTimersStop(which)
|
||||
local drNumPos = db[which]["drnumposition"];
|
||||
|
||||
for i = 1, 18 do
|
||||
local frame = Rect.frames[which][i]["frame"];
|
||||
local frame = Rekt.frames[which][i]["frame"];
|
||||
frame:ClearAllPoints();
|
||||
frame:SetFrameStrata("MEDIUM");
|
||||
frame:SetWidth(size);
|
||||
frame:SetHeight(size);
|
||||
local text = Rect.frames[which][i]["texture"];
|
||||
local text = Rekt.frames[which][i]["texture"];
|
||||
text:SetAllPoints(frame);
|
||||
frame.texture = text;
|
||||
--set them based on the grow type
|
||||
@ -284,7 +284,7 @@ function Rect:MoveDRTimersStop(which)
|
||||
frame:SetPoint("BOTTOMLEFT", x - ((i - 1) * size), y);
|
||||
end
|
||||
|
||||
local t = Rect.frames[which][i]["text"];
|
||||
local t = Rekt.frames[which][i]["text"];
|
||||
t:ClearAllPoints();
|
||||
|
||||
--check if we need numbers
|
||||
@ -308,14 +308,14 @@ function Rect:MoveDRTimersStop(which)
|
||||
t:SetPoint("CENTER", frame, "CENTER", xOSet, yOSet);
|
||||
end
|
||||
|
||||
local CoolDown = Rect.frames[which][i]["cooldown"];
|
||||
local CoolDown = Rekt.frames[which][i]["cooldown"];
|
||||
CoolDown:SetAllPoints();
|
||||
--frame:Show();
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:VOnDRTimerUpdate(which)
|
||||
if Rect:UpdateDRs(self.targets[which]) then
|
||||
function Rekt:VOnDRTimerUpdate(which)
|
||||
if Rekt:UpdateDRs(self.targets[which]) then
|
||||
--we have to update every three, because if somebody is targeted and focused since sorting is
|
||||
--implemented it triggers only one update, probably it had bugs before too, but got unnoticed
|
||||
self:ReassignDRs("targetdr");
|
||||
@ -324,7 +324,7 @@ function Rect:VOnDRTimerUpdate(which)
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:UpdateDRs(unitGUID)
|
||||
function Rekt:UpdateDRs(unitGUID)
|
||||
if not unitGUID then return end;
|
||||
--check if we have dr for that unit
|
||||
if not self.drs[unitGUID] then return end
|
||||
@ -340,11 +340,11 @@ function Rect:UpdateDRs(unitGUID)
|
||||
return found;
|
||||
end
|
||||
|
||||
function Rect:HideSelfDRFrames()
|
||||
if not Rect.frames["selfdr"][1] then return end;
|
||||
function Rekt:HideSelfDRFrames()
|
||||
if not Rekt.frames["selfdr"][1] then return end;
|
||||
|
||||
for i = 1, 18 do
|
||||
local frame = Rect.frames["selfdr"][i]["frame"];
|
||||
local frame = Rekt.frames["selfdr"][i]["frame"];
|
||||
frame:Hide();
|
||||
end
|
||||
end
|
@ -1,10 +1,10 @@
|
||||
|
||||
Rect = LibStub("AceAddon-3.0"):NewAddon("Rect", "AceConsole-3.0", "AceEvent-3.0")
|
||||
Rect.appName = "Rect"
|
||||
Rect.dbName = "RectDB"
|
||||
Rect.version = "1.0RC1"
|
||||
Rekt = LibStub("AceAddon-3.0"):NewAddon("Rekt", "AceConsole-3.0", "AceEvent-3.0")
|
||||
Rekt.appName = "Rekt"
|
||||
Rekt.dbName = "RektDB"
|
||||
Rekt.version = "1.0RC1"
|
||||
|
||||
function Rect:HideFrames()
|
||||
function Rekt:HideFrames()
|
||||
for i = 1, 23 do
|
||||
local frame = self.frames["target"][i]["frame"];
|
||||
frame:Hide();
|
||||
|
248
data/options.lua
248
data/options.lua
@ -8,15 +8,15 @@ local libDRData = LibStub('DRData-1.0');
|
||||
|
||||
--Utility Functions for the options
|
||||
|
||||
function Rect:RectDisable()
|
||||
function Rekt:RektDisable()
|
||||
self:Reset();
|
||||
self:ApplySettings();
|
||||
--hide the frames
|
||||
Rect:HideFrames();
|
||||
Rekt:HideFrames();
|
||||
--self:Disable();
|
||||
end
|
||||
|
||||
function Rect:RectEnable()
|
||||
function Rekt:RektEnable()
|
||||
--self:Enable();
|
||||
self:Reset();
|
||||
self:ApplySettings();
|
||||
@ -24,35 +24,35 @@ end
|
||||
|
||||
|
||||
--enable
|
||||
function Rect:isEnabled()
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:isEnabled()
|
||||
local db = Rekt.db.profile;
|
||||
return db["enabled"];
|
||||
end
|
||||
|
||||
function Rect:setEnabledOrDisabled(enable)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setEnabledOrDisabled(enable)
|
||||
local db = Rekt.db.profile;
|
||||
db["enabled"] = enable;
|
||||
if enable then
|
||||
Rect:RectEnable()
|
||||
Rekt:RektEnable()
|
||||
else
|
||||
Rect:RectDisable()
|
||||
Rekt:RektDisable()
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:isPartEnabled(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:isPartEnabled(which)
|
||||
local db = Rekt.db.profile;
|
||||
return db[which]["enabled"];
|
||||
end
|
||||
|
||||
function Rect:SetPartEnabledOrDisabled(which, enable)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:SetPartEnabledOrDisabled(which, enable)
|
||||
local db = Rekt.db.profile;
|
||||
db[which]["enabled"] = enable;
|
||||
--hide all those frames
|
||||
if not enable then
|
||||
for i = 1, 23 do
|
||||
local frame = Rect.frames[which][i]["frame"];
|
||||
local frame = Rekt.frames[which][i]["frame"];
|
||||
frame:Hide();
|
||||
local colorframe = Rect.fremes[which][i]["colorframe"];
|
||||
local colorframe = Rekt.fremes[which][i]["colorframe"];
|
||||
colorframe:Hide();
|
||||
end
|
||||
else
|
||||
@ -60,13 +60,13 @@ function Rect:SetPartEnabledOrDisabled(which, enable)
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:SetDRPartEnabledOrDisabled(which, enable)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:SetDRPartEnabledOrDisabled(which, enable)
|
||||
local db = Rekt.db.profile;
|
||||
db[which]["enabled"] = enable;
|
||||
--hide all those frames
|
||||
if not enable then
|
||||
for i = 1, 18 do
|
||||
local frame = Rect.frames[which][i]["frame"];
|
||||
local frame = Rekt.frames[which][i]["frame"];
|
||||
frame:Hide();
|
||||
end
|
||||
else
|
||||
@ -74,30 +74,30 @@ function Rect:SetDRPartEnabledOrDisabled(which, enable)
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:isSpecDetectionEnabled()
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:isSpecDetectionEnabled()
|
||||
local db = Rekt.db.profile;
|
||||
return db["specdetection"];
|
||||
end
|
||||
|
||||
function Rect:setSpecDetectionEnabledorDisabled(enable)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setSpecDetectionEnabledorDisabled(enable)
|
||||
local db = Rekt.db.profile;
|
||||
db["specdetection"] = enable;
|
||||
--call the remapcooldowns, and then update
|
||||
--self:ReassignCds(which);
|
||||
end
|
||||
|
||||
function Rect:getColorFrameEnabled(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getColorFrameEnabled(which)
|
||||
local db = Rekt.db.profile;
|
||||
return db[which]["colorframeenabled"];
|
||||
end
|
||||
|
||||
function Rect:setColorFrameEnabled(which, enable)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setColorFrameEnabled(which, enable)
|
||||
local db = Rekt.db.profile;
|
||||
db[which]["colorframeenabled"] = enable;
|
||||
--hide all those frames
|
||||
if not enable then
|
||||
for i = 1, 23 do
|
||||
local colorframe = Rect.frames[which][i]["colorframe"];
|
||||
local colorframe = Rekt.frames[which][i]["colorframe"];
|
||||
colorframe:Hide();
|
||||
end
|
||||
else
|
||||
@ -105,35 +105,35 @@ function Rect:setColorFrameEnabled(which, enable)
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:getCDTypeSortingEnable()
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getCDTypeSortingEnable()
|
||||
local db = Rekt.db.profile;
|
||||
return db["cdtypesortorder"]["enabled"];
|
||||
end
|
||||
|
||||
function Rect:setCDTypeSortingEnable(v)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setCDTypeSortingEnable(v)
|
||||
local db = Rekt.db.profile;
|
||||
db["cdtypesortorder"]["enabled"] = v;
|
||||
|
||||
self:ReassignCds("target");
|
||||
self:ReassignCds("focus");
|
||||
end
|
||||
|
||||
function Rect:getPetCDGuessing()
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getPetCDGuessing()
|
||||
local db = Rekt.db.profile;
|
||||
return db["petcdguessing"];
|
||||
end
|
||||
|
||||
function Rect:setPetCDGuessing(v)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setPetCDGuessing(v)
|
||||
local db = Rekt.db.profile;
|
||||
db["petcdguessing"] = v;
|
||||
end
|
||||
|
||||
--lock
|
||||
function Rect:isLocked()
|
||||
return Rect.db.profile["locked"];
|
||||
function Rekt:isLocked()
|
||||
return Rekt.db.profile["locked"];
|
||||
end
|
||||
|
||||
function Rect:LockFrames()
|
||||
function Rekt:LockFrames()
|
||||
self:MoveTimersStop("target");
|
||||
self:MoveTimersStop("focus");
|
||||
self:HideMovableFrames()
|
||||
@ -141,28 +141,28 @@ function Rect:LockFrames()
|
||||
self:ReassignCds("focus");
|
||||
end
|
||||
|
||||
function Rect:UnlockFrames()
|
||||
function Rekt:UnlockFrames()
|
||||
--this will hide the frames
|
||||
self:ReassignCds("target");
|
||||
self:ReassignCds("focus");
|
||||
Rect:ShowMovableFrames();
|
||||
Rekt:ShowMovableFrames();
|
||||
end
|
||||
|
||||
function Rect:HideMovableFrames()
|
||||
if not Rect.MovableFrames then return end;
|
||||
function Rekt:HideMovableFrames()
|
||||
if not Rekt.MovableFrames then return end;
|
||||
--Hide them
|
||||
for k, v in pairs(Rect.MovableFrames) do
|
||||
for k, v in pairs(Rekt.MovableFrames) do
|
||||
v["frame"]:EnableMouse(false);
|
||||
v["frame"]:SetMovable(false);
|
||||
v["frame"]:Hide();
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:ShowMovableFrames()
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:ShowMovableFrames()
|
||||
local db = Rekt.db.profile;
|
||||
--Create them if they doesn't exists
|
||||
if not Rect.MovableFrames then
|
||||
Rect.MovableFrames = {}
|
||||
if not Rekt.MovableFrames then
|
||||
Rekt.MovableFrames = {}
|
||||
for i = 1, 5 do
|
||||
local frame = CreateFrame("Frame", nil, UIParent, nil);
|
||||
frame:SetFrameStrata("BACKGROUND");
|
||||
@ -207,15 +207,15 @@ function Rect:ShowMovableFrames()
|
||||
|
||||
frame.DragID = which;
|
||||
|
||||
Rect.MovableFrames[i] = {}
|
||||
Rect.MovableFrames[i]["frame"] = frame;
|
||||
Rect.MovableFrames[i]["texture"] = text;
|
||||
Rect.MovableFrames[i]["text"] = t;
|
||||
Rekt.MovableFrames[i] = {}
|
||||
Rekt.MovableFrames[i]["frame"] = frame;
|
||||
Rekt.MovableFrames[i]["texture"] = text;
|
||||
Rekt.MovableFrames[i]["text"] = t;
|
||||
end
|
||||
end
|
||||
|
||||
--Show, resize them
|
||||
for k, v in pairs(Rect.MovableFrames) do
|
||||
for k, v in pairs(Rekt.MovableFrames) do
|
||||
v["frame"]:EnableMouse(true)
|
||||
v["frame"]:SetMovable(true)
|
||||
v["frame"]:RegisterForDrag("LeftButton")
|
||||
@ -226,121 +226,121 @@ function Rect:ShowMovableFrames()
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:MovableFrameDragStart()
|
||||
function Rekt:MovableFrameDragStart()
|
||||
this:StartMoving();
|
||||
end
|
||||
|
||||
function Rect:MovableFrameDragStop()
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:MovableFrameDragStop()
|
||||
local db = Rekt.db.profile;
|
||||
db[this.DragID]["xPos"] = this:GetLeft();
|
||||
db[this.DragID]["yPos"] = this:GetBottom();
|
||||
--Rect:Print(this:GetLeft() .. " " .. this:GetBottom());
|
||||
--Rekt:Print(this:GetLeft() .. " " .. this:GetBottom());
|
||||
this:StopMovingOrSizing();
|
||||
end
|
||||
|
||||
--size Functions
|
||||
|
||||
function Rect:getFrameSize(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getFrameSize(which)
|
||||
local db = Rekt.db.profile;
|
||||
return db[which]["size"];
|
||||
end
|
||||
|
||||
function Rect:setFrameSize(which, size)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setFrameSize(which, size)
|
||||
local db = Rekt.db.profile;
|
||||
db[which]["size"] = size;
|
||||
|
||||
Rect:MoveTimersStop(which)
|
||||
Rekt:MoveTimersStop(which)
|
||||
|
||||
if not db["locked"] then
|
||||
Rect:ShowMovableFrames();
|
||||
Rekt:ShowMovableFrames();
|
||||
end
|
||||
end
|
||||
|
||||
function Rect:getDRNumSize(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getDRNumSize(which)
|
||||
local db = Rekt.db.profile;
|
||||
return db[which]["drnumsize"];
|
||||
end
|
||||
|
||||
function Rect:setDRNumSize(which, size)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setDRNumSize(which, size)
|
||||
local db = Rekt.db.profile;
|
||||
db[which]["size"] = size;
|
||||
Rect:MoveDRTimersStop(which)
|
||||
Rekt:MoveDRTimersStop(which)
|
||||
end
|
||||
|
||||
function Rect:getColorFrameSize(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getColorFrameSize(which)
|
||||
local db = Rekt.db.profile;
|
||||
return db[which]["colorframesize"];
|
||||
end
|
||||
|
||||
function Rect:setColorFrameSize(which, size)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setColorFrameSize(which, size)
|
||||
local db = Rekt.db.profile;
|
||||
db[which]["colorframesize"] = size;
|
||||
|
||||
Rect:MoveTimersStop(which);
|
||||
Rect:ReassignCds(which);
|
||||
Rekt:MoveTimersStop(which);
|
||||
Rekt:ReassignCds(which);
|
||||
|
||||
if not db["locked"] then
|
||||
Rect:ShowMovableFrames();
|
||||
Rekt:ShowMovableFrames();
|
||||
end
|
||||
end
|
||||
|
||||
--Grow Order
|
||||
function Rect:getGrowOrder(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getGrowOrder(which)
|
||||
local db = Rekt.db.profile;
|
||||
return db[which]["growOrder"];
|
||||
end
|
||||
|
||||
function Rect:setGrowOrder(which, v)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setGrowOrder(which, v)
|
||||
local db = Rekt.db.profile;
|
||||
db[which]["growOrder"] = v;
|
||||
Rect:MoveTimersStop(which)
|
||||
Rekt:MoveTimersStop(which)
|
||||
end
|
||||
|
||||
function Rect:setDRGrowOrder(which, v)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setDRGrowOrder(which, v)
|
||||
local db = Rekt.db.profile;
|
||||
db[which]["growOrder"] = v;
|
||||
Rect:MoveDRTimersStop(which)
|
||||
Rekt:MoveDRTimersStop(which)
|
||||
end
|
||||
|
||||
--Sort Order
|
||||
function Rect:getSortOrder(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getSortOrder(which)
|
||||
local db = Rekt.db.profile;
|
||||
return db[which]["sortOrder"];
|
||||
end
|
||||
|
||||
function Rect:setSortOrder(which, v)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setSortOrder(which, v)
|
||||
local db = Rekt.db.profile;
|
||||
db[which]["sortOrder"] = v;
|
||||
Rect:ReassignCds(which);
|
||||
Rekt:ReassignCds(which);
|
||||
end
|
||||
|
||||
function Rect:getTypeSortOrder(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getTypeSortOrder(which)
|
||||
local db = Rekt.db.profile;
|
||||
return db["cdtypesortorder"][which];
|
||||
end
|
||||
|
||||
function Rect:setTypeSortOrder(which, v)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setTypeSortOrder(which, v)
|
||||
local db = Rekt.db.profile;
|
||||
db["cdtypesortorder"][which] = v;
|
||||
Rect:ReassignCds("target");
|
||||
Rect:ReassignCds("focus");
|
||||
Rekt:ReassignCds("target");
|
||||
Rekt:ReassignCds("focus");
|
||||
end
|
||||
|
||||
--Num Position functions
|
||||
function Rect:getDRNumPosition(which)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getDRNumPosition(which)
|
||||
local db = Rekt.db.profile;
|
||||
return db[which]["drnumposition"];
|
||||
end
|
||||
|
||||
function Rect:setDRNumPosition(which, v)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setDRNumPosition(which, v)
|
||||
local db = Rekt.db.profile;
|
||||
db[which]["drnumposition"] = v;
|
||||
Rect:MoveDRTimersStop(which);
|
||||
Rekt:MoveDRTimersStop(which);
|
||||
end
|
||||
|
||||
--Color options
|
||||
function Rect:getColor(part)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getColor(part)
|
||||
local db = Rekt.db.profile;
|
||||
|
||||
if not db["color"] then db["color"] = {} end
|
||||
|
||||
@ -355,8 +355,8 @@ function Rect:getColor(part)
|
||||
return db["color"][part]["r"], db["color"][part]["g"], db["color"][part]["b"], db["color"][part]["a"];
|
||||
end
|
||||
|
||||
function Rect:setColor(part, r, g, b, a)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setColor(part, r, g, b, a)
|
||||
local db = Rekt.db.profile;
|
||||
|
||||
if not db["color"][part] then db["color"][part] = {} end
|
||||
|
||||
@ -367,54 +367,54 @@ function Rect:setColor(part, r, g, b, a)
|
||||
end
|
||||
|
||||
--Debug settings
|
||||
function Rect:getDebugLevel()
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getDebugLevel()
|
||||
local db = Rekt.db.profile;
|
||||
return db["debugLevel"];
|
||||
end
|
||||
|
||||
function Rect:setDebugLevel(v)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setDebugLevel(v)
|
||||
local db = Rekt.db.profile;
|
||||
db["debugLevel"] = v;
|
||||
end
|
||||
|
||||
function Rect:getSpellCastDebug()
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getSpellCastDebug()
|
||||
local db = Rekt.db.profile;
|
||||
return db["spellCastDebug"];
|
||||
end
|
||||
|
||||
function Rect:setSpellCastDebug(v)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setSpellCastDebug(v)
|
||||
local db = Rekt.db.profile;
|
||||
db["spellCastDebug"] = v;
|
||||
end
|
||||
|
||||
function Rect:getSpellAuraDebug()
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getSpellAuraDebug()
|
||||
local db = Rekt.db.profile;
|
||||
return db["spellAuraDebug"];
|
||||
end
|
||||
|
||||
function Rect:setSpellAuraDebug(v)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setSpellAuraDebug(v)
|
||||
local db = Rekt.db.profile;
|
||||
db["spellAuraDebug"] = v;
|
||||
end
|
||||
|
||||
function Rect:getAllCDebug()
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getAllCDebug()
|
||||
local db = Rekt.db.profile;
|
||||
return db["allCDebug"];
|
||||
end
|
||||
|
||||
function Rect:setAllCDebug(v)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setAllCDebug(v)
|
||||
local db = Rekt.db.profile;
|
||||
db["allCDebug"] = v;
|
||||
end
|
||||
|
||||
function Rect:getSelfCDRegister()
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:getSelfCDRegister()
|
||||
local db = Rekt.db.profile;
|
||||
return db["selfCDRegister"];
|
||||
end
|
||||
|
||||
function Rect:setSelfCDRegister(v)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:setSelfCDRegister(v)
|
||||
local db = Rekt.db.profile;
|
||||
db["selfCDRegister"] = v;
|
||||
Rect:ReassignCds("target");
|
||||
Rect:ReassignCds("focus");
|
||||
Rekt:ReassignCds("target");
|
||||
Rekt:ReassignCds("focus");
|
||||
end
|
@ -1,41 +1,41 @@
|
||||
|
||||
local aceDBOptions = LibStub("AceDBOptions-3.0")
|
||||
|
||||
function Rect:GetRectOptions()
|
||||
function Rekt:GetRektOptions()
|
||||
local db = self.db.profile;
|
||||
local options = {
|
||||
type = "group", name = "Rect", childGroups = "tab",
|
||||
type = "group", name = "Rekt", childGroups = "tab",
|
||||
args = {
|
||||
enabled = {
|
||||
type = "toggle", name = "Enabled", desc = "Enable/Disable the addon", order = 0,
|
||||
get = function() return Rect:isEnabled() end,
|
||||
get = function() return Rekt:isEnabled() end,
|
||||
set = function(_, v)
|
||||
Rect:setEnabledOrDisabled(v);
|
||||
Rekt:setEnabledOrDisabled(v);
|
||||
end
|
||||
},
|
||||
lock = {
|
||||
type = "toggle", name = "Lock", desc = "Uncheck to move the frames", order = 1,
|
||||
get = function() return Rect:isLocked() end,
|
||||
get = function() return Rekt:isLocked() end,
|
||||
set = function(_, v)
|
||||
db.locked = v;
|
||||
if v then Rect:LockFrames() else Rect:UnlockFrames() end;
|
||||
if v then Rekt:LockFrames() else Rekt:UnlockFrames() end;
|
||||
end
|
||||
},
|
||||
targetandfocus = {
|
||||
type = "group", name = "CDs", desc = "Cooldown frame's settings.", childGroups = "tab", order = 2,
|
||||
args = Rect:getTargetandFocusOptions();
|
||||
args = Rekt:getTargetandFocusOptions();
|
||||
},
|
||||
droptions = {
|
||||
type = "group", name = "DRs", desc = "DR frame's settings.", childGroups = "tab",order = 3,
|
||||
args = Rect:getDROptions();
|
||||
args = Rekt:getDROptions();
|
||||
},
|
||||
coloroptions = {
|
||||
type = "group", name = "Global", desc = "Global settings.", childGroups = "tab",order = 4,
|
||||
args = Rect:getGlobalOptions()
|
||||
args = Rekt:getGlobalOptions()
|
||||
},
|
||||
debugoptions = {
|
||||
type = "group", name = "Debug", desc = "Debug settings.", childGroups = "tab", order = 5,
|
||||
args = Rect:getDebugOptions();
|
||||
args = Rekt:getDebugOptions();
|
||||
},
|
||||
profileoptions = aceDBOptions:GetOptionsTable(self.db)
|
||||
}
|
||||
@ -43,23 +43,23 @@ function Rect:GetRectOptions()
|
||||
return options;
|
||||
end
|
||||
--order 10-20
|
||||
function Rect:getTargetandFocusOptions()
|
||||
function Rekt:getTargetandFocusOptions()
|
||||
local args = {
|
||||
targetHeader = {
|
||||
type = "header", name = "Target's settings", order = 10
|
||||
},
|
||||
targettoggle = {
|
||||
type = "toggle", name = "Target", desc = "Enable/Disable showing the target's cooldowns", order = 11,
|
||||
get = function() return Rect:isPartEnabled("target") end,
|
||||
get = function() return Rekt:isPartEnabled("target") end,
|
||||
set = function(_, v)
|
||||
Rect:SetPartEnabledOrDisabled("target", v);
|
||||
Rekt:SetPartEnabledOrDisabled("target", v);
|
||||
end
|
||||
},
|
||||
targetrange = {
|
||||
type = "range", name = "Target's size", order = 12, min = 10, max = 150, step = 1,
|
||||
get = function() return Rect:getFrameSize("target") end,
|
||||
get = function() return Rekt:getFrameSize("target") end,
|
||||
set = function(_, v)
|
||||
Rect:setFrameSize("target", v);
|
||||
Rekt:setFrameSize("target", v);
|
||||
end
|
||||
},
|
||||
targetGrowSelect = {
|
||||
@ -71,9 +71,9 @@ function Rect:getTargetandFocusOptions()
|
||||
["3"] = "Down",
|
||||
["4"] = "Left"
|
||||
},
|
||||
get = function() return Rect:getGrowOrder("target") end,
|
||||
get = function() return Rekt:getGrowOrder("target") end,
|
||||
set = function(_, v)
|
||||
Rect:setGrowOrder("target", v);
|
||||
Rekt:setGrowOrder("target", v);
|
||||
end
|
||||
},
|
||||
targetSortSelect = {
|
||||
@ -88,23 +88,23 @@ function Rect:getTargetandFocusOptions()
|
||||
["6"] = "Recent Last",
|
||||
["7"] = "No order"
|
||||
},
|
||||
get = function() return Rect:getSortOrder("target") end,
|
||||
get = function() return Rekt:getSortOrder("target") end,
|
||||
set = function(_, v)
|
||||
Rect:setSortOrder("target", v);
|
||||
Rekt:setSortOrder("target", v);
|
||||
end
|
||||
},
|
||||
targetcolortoggle = {
|
||||
type = "toggle", name = "Colors", desc = "Enable/Disable showing the target's cooldown's colors.", order = 15,
|
||||
get = function() return Rect:getColorFrameEnabled("target") end,
|
||||
get = function() return Rekt:getColorFrameEnabled("target") end,
|
||||
set = function(_, v)
|
||||
Rect:setColorFrameEnabled("target", v);
|
||||
Rekt:setColorFrameEnabled("target", v);
|
||||
end
|
||||
},
|
||||
targetcolorrange = {
|
||||
type = "range", name = "Target's Color size", order = 16, min = 1, max = 30, step = 1,
|
||||
get = function() return Rect:getColorFrameSize("target") end,
|
||||
get = function() return Rekt:getColorFrameSize("target") end,
|
||||
set = function(_, v)
|
||||
Rect:setColorFrameSize("target", v);
|
||||
Rekt:setColorFrameSize("target", v);
|
||||
end
|
||||
},
|
||||
focusHeader = {
|
||||
@ -112,16 +112,16 @@ function Rect:getTargetandFocusOptions()
|
||||
},
|
||||
focustoggle = {
|
||||
type = "toggle", name = "Focus", desc = "Enable/Disable showing the focus's cooldowns", order = 18,
|
||||
get = function() return Rect:isPartEnabled("focus") end,
|
||||
get = function() return Rekt:isPartEnabled("focus") end,
|
||||
set = function(_, v)
|
||||
Rect:SetPartEnabledOrDisabled("focus", v);
|
||||
Rekt:SetPartEnabledOrDisabled("focus", v);
|
||||
end
|
||||
},
|
||||
focusRange = {
|
||||
type = "range", name = "Focus's size", order = 19, min = 10, max = 150, step = 1,
|
||||
get = function() return Rect:getFrameSize("focus") end,
|
||||
get = function() return Rekt:getFrameSize("focus") end,
|
||||
set = function(_, v)
|
||||
Rect:setFrameSize("focus", v);
|
||||
Rekt:setFrameSize("focus", v);
|
||||
end
|
||||
},
|
||||
focusGrowSelect = {
|
||||
@ -133,9 +133,9 @@ function Rect:getTargetandFocusOptions()
|
||||
["3"] = "Down",
|
||||
["4"] = "Left"
|
||||
},
|
||||
get = function() return Rect:getGrowOrder("focus") end,
|
||||
get = function() return Rekt:getGrowOrder("focus") end,
|
||||
set = function(_, v)
|
||||
Rect:setGrowOrder("focus", v);
|
||||
Rekt:setGrowOrder("focus", v);
|
||||
end
|
||||
},
|
||||
focusSortSelect = {
|
||||
@ -150,23 +150,23 @@ function Rect:getTargetandFocusOptions()
|
||||
["6"] = "Recent Last",
|
||||
["7"] = "No order"
|
||||
},
|
||||
get = function() return Rect:getSortOrder("focus") end,
|
||||
get = function() return Rekt:getSortOrder("focus") end,
|
||||
set = function(_, v)
|
||||
Rect:setSortOrder("focus", v);
|
||||
Rekt:setSortOrder("focus", v);
|
||||
end
|
||||
},
|
||||
focuscolortoggle = {
|
||||
type = "toggle", name = "Colors", desc = "Enable/Disable showing the target's cooldown's colors.", order = 22,
|
||||
get = function() return Rect:getColorFrameEnabled("focus") end,
|
||||
get = function() return Rekt:getColorFrameEnabled("focus") end,
|
||||
set = function(_, v)
|
||||
Rect:setColorFrameEnabled("focus", v);
|
||||
Rekt:setColorFrameEnabled("focus", v);
|
||||
end
|
||||
},
|
||||
focuscolorrange = {
|
||||
type = "range", name = "Focus's Color size", order = 23, min = 1, max = 30, step = 1,
|
||||
get = function() return Rect:getColorFrameSize("focus") end,
|
||||
get = function() return Rekt:getColorFrameSize("focus") end,
|
||||
set = function(_, v)
|
||||
Rect:setColorFrameSize("focus", v);
|
||||
Rekt:setColorFrameSize("focus", v);
|
||||
end
|
||||
},
|
||||
}
|
||||
@ -174,23 +174,23 @@ function Rect:getTargetandFocusOptions()
|
||||
end
|
||||
|
||||
--order 20-40
|
||||
function Rect:getDROptions()
|
||||
function Rekt:getDROptions()
|
||||
local args = {
|
||||
targetdrHeader = {
|
||||
type = "header", name = "Target's settings", order = 10
|
||||
},
|
||||
targetdrtoggle = {
|
||||
type = "toggle", name = "Enabled", desc = "Enable/Disable showing the target's DRs.", order = 11,
|
||||
get = function() return Rect:isPartEnabled("targetdr") end,
|
||||
get = function() return Rekt:isPartEnabled("targetdr") end,
|
||||
set = function(_, v)
|
||||
Rect:SetDRPartEnabledOrDisabled("targetdr", v);
|
||||
Rekt:SetDRPartEnabledOrDisabled("targetdr", v);
|
||||
end
|
||||
},
|
||||
targetdrrange = {
|
||||
type = "range", name = "Target's DRs size", order = 12, min = 10, max = 150, step = 1,
|
||||
get = function() return Rect:getFrameSize("targetdr") end,
|
||||
get = function() return Rekt:getFrameSize("targetdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setFrameSize("targetdr", v);
|
||||
Rekt:setFrameSize("targetdr", v);
|
||||
end
|
||||
|
||||
},
|
||||
@ -203,9 +203,9 @@ function Rect:getDROptions()
|
||||
["3"] = "Down",
|
||||
["4"] = "Left"
|
||||
},
|
||||
get = function() return Rect:getGrowOrder("targetdr") end,
|
||||
get = function() return Rekt:getGrowOrder("targetdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setDRGrowOrder("targetdr", v);
|
||||
Rekt:setDRGrowOrder("targetdr", v);
|
||||
end
|
||||
},
|
||||
targetdrSortSelect = {
|
||||
@ -220,17 +220,17 @@ function Rect:getDROptions()
|
||||
["6"] = "Recent Last",
|
||||
["7"] = "No order"
|
||||
},
|
||||
get = function() return Rect:getSortOrder("targetdr") end,
|
||||
get = function() return Rekt:getSortOrder("targetdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setSortOrder("targetdr", v);
|
||||
Rekt:setSortOrder("targetdr", v);
|
||||
end
|
||||
},
|
||||
targetdrnumsizerange = {
|
||||
type = "range", name = "Number's size", desc = "Target's DR's Number's size. Set it to 0 to disable it!",
|
||||
order = 15, min = 1, max = 30, step = 1,
|
||||
get = function() return Rect:getDRNumSize("targetdr") end,
|
||||
get = function() return Rekt:getDRNumSize("targetdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setDRNumSize("targetdr", v);
|
||||
Rekt:setDRNumSize("targetdr", v);
|
||||
end
|
||||
|
||||
},
|
||||
@ -244,9 +244,9 @@ function Rect:getDROptions()
|
||||
["4"] = "Left",
|
||||
["5"] = "Middle"
|
||||
},
|
||||
get = function() return Rect:getDRNumPosition("targetdr") end,
|
||||
get = function() return Rekt:getDRNumPosition("targetdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setDRNumPosition("targetdr", v);
|
||||
Rekt:setDRNumPosition("targetdr", v);
|
||||
end
|
||||
},
|
||||
focusdrHeader = {
|
||||
@ -254,16 +254,16 @@ function Rect:getDROptions()
|
||||
},
|
||||
focusdrtoggle = {
|
||||
type = "toggle", name = "Enabled", desc = "Enable/Disable showing the focus's DRs.", order = 18,
|
||||
get = function() return Rect:isPartEnabled("focusdr") end,
|
||||
get = function() return Rekt:isPartEnabled("focusdr") end,
|
||||
set = function(_, v)
|
||||
Rect:SetDRPartEnabledOrDisabled("focusdr", v);
|
||||
Rekt:SetDRPartEnabledOrDisabled("focusdr", v);
|
||||
end
|
||||
},
|
||||
focusdrRange = {
|
||||
type = "range", name = "Focus's size", order = 19, min = 10, max = 150, step = 1,
|
||||
get = function() return Rect:getFrameSize("focusdr") end,
|
||||
get = function() return Rekt:getFrameSize("focusdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setFrameSize("focusdr", v);
|
||||
Rekt:setFrameSize("focusdr", v);
|
||||
end
|
||||
},
|
||||
focusdrGrowSelect = {
|
||||
@ -275,9 +275,9 @@ function Rect:getDROptions()
|
||||
["3"] = "Down",
|
||||
["4"] = "Left"
|
||||
},
|
||||
get = function() return Rect:getGrowOrder("focusdr") end,
|
||||
get = function() return Rekt:getGrowOrder("focusdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setDRGrowOrder("focusdr", v);
|
||||
Rekt:setDRGrowOrder("focusdr", v);
|
||||
end
|
||||
},
|
||||
focusdrSortSelect = {
|
||||
@ -292,17 +292,17 @@ function Rect:getDROptions()
|
||||
["6"] = "Recent Last",
|
||||
["7"] = "No order"
|
||||
},
|
||||
get = function() return Rect:getSortOrder("focusdr") end,
|
||||
get = function() return Rekt:getSortOrder("focusdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setSortOrder("focusdr", v);
|
||||
Rekt:setSortOrder("focusdr", v);
|
||||
end
|
||||
},
|
||||
focusdrnumsizerange = {
|
||||
type = "range", name = "Number's size", desc = "Focus's DR's Number's size. Set it to 0 to disable it!",
|
||||
order = 22, min = 1, max = 30, step = 1,
|
||||
get = function() return Rect:getDRNumSize("focusdr") end,
|
||||
get = function() return Rekt:getDRNumSize("focusdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setDRNumSize("focusdr", v);
|
||||
Rekt:setDRNumSize("focusdr", v);
|
||||
end
|
||||
|
||||
},
|
||||
@ -316,9 +316,9 @@ function Rect:getDROptions()
|
||||
["4"] = "Left",
|
||||
["5"] = "Middle"
|
||||
},
|
||||
get = function() return Rect:getDRNumPosition("focusdr") end,
|
||||
get = function() return Rekt:getDRNumPosition("focusdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setDRNumPosition("focusdr", v);
|
||||
Rekt:setDRNumPosition("focusdr", v);
|
||||
end
|
||||
},
|
||||
selfdrHeader = {
|
||||
@ -326,16 +326,16 @@ function Rect:getDROptions()
|
||||
},
|
||||
selfdrtoggle = {
|
||||
type = "toggle", name = "Enabled", desc = "Enable/Disable showing the your DRs.", order = 25,
|
||||
get = function() return Rect:isPartEnabled("selfdr") end,
|
||||
get = function() return Rekt:isPartEnabled("selfdr") end,
|
||||
set = function(_, v)
|
||||
Rect:SetDRPartEnabledOrDisabled("selfdr", v);
|
||||
Rekt:SetDRPartEnabledOrDisabled("selfdr", v);
|
||||
end
|
||||
},
|
||||
selfdrrange = {
|
||||
type = "range", name = "Self's DRs size", order = 26, min = 10, max = 150, step = 1,
|
||||
get = function() return Rect:getFrameSize("selfdr") end,
|
||||
get = function() return Rekt:getFrameSize("selfdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setFrameSize("selfdr", v);
|
||||
Rekt:setFrameSize("selfdr", v);
|
||||
end
|
||||
},
|
||||
selfdrGrowSelect = {
|
||||
@ -347,9 +347,9 @@ function Rect:getDROptions()
|
||||
["3"] = "Down",
|
||||
["4"] = "Left"
|
||||
},
|
||||
get = function() return Rect:getGrowOrder("selfdr") end,
|
||||
get = function() return Rekt:getGrowOrder("selfdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setDRGrowOrder("selfdr", v);
|
||||
Rekt:setDRGrowOrder("selfdr", v);
|
||||
end
|
||||
},
|
||||
selfdrSortSelect = {
|
||||
@ -364,17 +364,17 @@ function Rect:getDROptions()
|
||||
["6"] = "Recent Last",
|
||||
["7"] = "No order"
|
||||
},
|
||||
get = function() return Rect:getSortOrder("selfdr") end,
|
||||
get = function() return Rekt:getSortOrder("selfdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setSortOrder("selfdr", v);
|
||||
Rekt:setSortOrder("selfdr", v);
|
||||
end
|
||||
},
|
||||
selfdrnumsizerange = {
|
||||
type = "range", name = "Number's size", desc = "Your DR's Number's size. Set it to 0 to disable it!",
|
||||
order = 29, min = 1, max = 30, step = 1,
|
||||
get = function() return Rect:getDRNumSize("selfdr") end,
|
||||
get = function() return Rekt:getDRNumSize("selfdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setDRNumSize("selfdr", v);
|
||||
Rekt:setDRNumSize("selfdr", v);
|
||||
end
|
||||
|
||||
},
|
||||
@ -388,9 +388,9 @@ function Rect:getDROptions()
|
||||
["4"] = "Left",
|
||||
["5"] = "Middle"
|
||||
},
|
||||
get = function() return Rect:getDRNumPosition("selfdr") end,
|
||||
get = function() return Rekt:getDRNumPosition("selfdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setDRNumPosition("selfdr", v);
|
||||
Rekt:setDRNumPosition("selfdr", v);
|
||||
end
|
||||
},
|
||||
}
|
||||
@ -398,25 +398,25 @@ function Rect:getDROptions()
|
||||
end
|
||||
|
||||
--order 40-50
|
||||
function Rect:getGlobalOptions()
|
||||
function Rekt:getGlobalOptions()
|
||||
local args = {
|
||||
globalHeader = {
|
||||
type = "header", name = "Global CD settings", order = 10
|
||||
},
|
||||
specdetectiontoggle = {
|
||||
type = "toggle", name = "Spec Detection", desc = "Enable/Disable Spec Detection", order = 11,
|
||||
get = function() return Rect:isSpecDetectionEnabled() end,
|
||||
get = function() return Rekt:isSpecDetectionEnabled() end,
|
||||
set = function(_, v)
|
||||
Rect:setSpecDetectionEnabledorDisabled(v);
|
||||
Rekt:setSpecDetectionEnabledorDisabled(v);
|
||||
end
|
||||
},
|
||||
petcdguessingtoggle = {
|
||||
type = "toggle", name = "Pet CD Guessing",
|
||||
desc = "Enable/Disable Pet Cd Guessing, this will show pet cds on all possible masters, since there is no reasonable way of determining who's pet it is from combatlog events and GUIDs, this will be really inaccurate if there are 2-3 lock for example.",
|
||||
order = 12,
|
||||
get = function() return Rect:getPetCDGuessing() end,
|
||||
get = function() return Rekt:getPetCDGuessing() end,
|
||||
set = function(_, v)
|
||||
Rect:setPetCDGuessing(v);
|
||||
Rekt:setPetCDGuessing(v);
|
||||
end
|
||||
},
|
||||
globalcdtypesortHeader = {
|
||||
@ -424,93 +424,93 @@ function Rect:getGlobalOptions()
|
||||
},
|
||||
cdtypesortordertoggle = {
|
||||
type = "toggle", name = "Enabled", desc = "Enable/Disable CD Type Sort Order, It works like this: you set silence to 1, then cc to 2 and anticc to 2, then silences will go first, then cc and anticc as secound, they are organized within groups based on how you set them in the CDs settings tab.", order = 15,
|
||||
get = function() return Rect:getCDTypeSortingEnable() end,
|
||||
get = function() return Rekt:getCDTypeSortingEnable() end,
|
||||
set = function(_, v)
|
||||
Rect:setCDTypeSortingEnable(v);
|
||||
Rekt:setCDTypeSortingEnable(v);
|
||||
end
|
||||
},
|
||||
silencerange = {
|
||||
type = "range", name = "Silence's Type Order", order = 17, min = 1, max = 15, step = 1,
|
||||
get = function() return Rect:getTypeSortOrder("silence") end,
|
||||
get = function() return Rekt:getTypeSortOrder("silence") end,
|
||||
set = function(_, v)
|
||||
Rect:setTypeSortOrder("silence", v);
|
||||
Rekt:setTypeSortOrder("silence", v);
|
||||
end
|
||||
},
|
||||
gapcloserrange = {
|
||||
type = "range", name = "Gapcloser's Type Order", order = 18, min = 1, max = 15, step = 1,
|
||||
get = function() return Rect:getTypeSortOrder("gapcloser") end,
|
||||
get = function() return Rekt:getTypeSortOrder("gapcloser") end,
|
||||
set = function(_, v)
|
||||
Rect:setTypeSortOrder("gapcloser", v);
|
||||
Rekt:setTypeSortOrder("gapcloser", v);
|
||||
end
|
||||
},
|
||||
defensiverange = {
|
||||
type = "range", name = "Defensive's Type Order", order = 19, min = 1, max = 15, step = 1,
|
||||
get = function() return Rect:getTypeSortOrder("defensive") end,
|
||||
get = function() return Rekt:getTypeSortOrder("defensive") end,
|
||||
set = function(_, v)
|
||||
Rect:setTypeSortOrder("defensive", v);
|
||||
Rekt:setTypeSortOrder("defensive", v);
|
||||
end
|
||||
},
|
||||
potionrange = {
|
||||
type = "range", name = "Potion's Type Order", order = 20, min = 1, max = 15, step = 1,
|
||||
get = function() return Rect:getTypeSortOrder("potion") end,
|
||||
get = function() return Rekt:getTypeSortOrder("potion") end,
|
||||
set = function(_, v)
|
||||
Rect:setTypeSortOrder("potion", v);
|
||||
Rekt:setTypeSortOrder("potion", v);
|
||||
end
|
||||
},
|
||||
nukerange = {
|
||||
type = "range", name = "Nuke's Type Order", order = 21, min = 1, max = 15, step = 1,
|
||||
get = function() return Rect:getTypeSortOrder("nuke") end,
|
||||
get = function() return Rekt:getTypeSortOrder("nuke") end,
|
||||
set = function(_, v)
|
||||
Rect:setTypeSortOrder("nuke", v);
|
||||
Rekt:setTypeSortOrder("nuke", v);
|
||||
end
|
||||
},
|
||||
anticcrange = {
|
||||
type = "range", name = "Anticc's Type Order", order = 22, min = 1, max = 15, step = 1,
|
||||
get = function() return Rect:getTypeSortOrder("anticc") end,
|
||||
get = function() return Rekt:getTypeSortOrder("anticc") end,
|
||||
set = function(_, v)
|
||||
Rect:setTypeSortOrder("anticc", v);
|
||||
Rekt:setTypeSortOrder("anticc", v);
|
||||
end
|
||||
},
|
||||
ccrange = {
|
||||
type = "range", name = "Cc's Type Order", order = 23, min = 1, max = 15, step = 1,
|
||||
get = function() return Rect:getTypeSortOrder("cc") end,
|
||||
get = function() return Rekt:getTypeSortOrder("cc") end,
|
||||
set = function(_, v)
|
||||
Rect:setTypeSortOrder("cc", v);
|
||||
Rekt:setTypeSortOrder("cc", v);
|
||||
end
|
||||
},
|
||||
stunrange = {
|
||||
type = "range", name = "Stun's Type Order", order = 24, min = 1, max = 15, step = 1,
|
||||
get = function() return Rect:getTypeSortOrder("stun") end,
|
||||
get = function() return Rekt:getTypeSortOrder("stun") end,
|
||||
set = function(_, v)
|
||||
Rect:setTypeSortOrder("stun", v);
|
||||
Rekt:setTypeSortOrder("stun", v);
|
||||
end
|
||||
},
|
||||
disarmrange = {
|
||||
type = "range", name = "Disarm's Type Order", order = 25, min = 1, max = 15, step = 1,
|
||||
get = function() return Rect:getTypeSortOrder("disarm") end,
|
||||
get = function() return Rekt:getTypeSortOrder("disarm") end,
|
||||
set = function(_, v)
|
||||
Rect:setTypeSortOrder("disarm", v);
|
||||
Rekt:setTypeSortOrder("disarm", v);
|
||||
end
|
||||
},
|
||||
cdresetrange = {
|
||||
type = "range", name = "Cdreset's Type Order", order = 26, min = 1, max = 15, step = 1,
|
||||
get = function() return Rect:getTypeSortOrder("cdreset") end,
|
||||
get = function() return Rekt:getTypeSortOrder("cdreset") end,
|
||||
set = function(_, v)
|
||||
Rect:setTypeSortOrder("cdreset", v);
|
||||
Rekt:setTypeSortOrder("cdreset", v);
|
||||
end
|
||||
},
|
||||
shieldrange = {
|
||||
type = "range", name = "shield's Type Order", order = 27, min = 1, max = 15, step = 1,
|
||||
get = function() return Rect:getTypeSortOrder("shield") end,
|
||||
get = function() return Rekt:getTypeSortOrder("shield") end,
|
||||
set = function(_, v)
|
||||
Rect:setTypeSortOrder("shield", v);
|
||||
Rekt:setTypeSortOrder("shield", v);
|
||||
end
|
||||
},
|
||||
uncategorizedrange = {
|
||||
type = "range", name = "Uncategorized's Type Order", order = 28, min = 1, max = 15, step = 1,
|
||||
get = function() return Rect:getTypeSortOrder("uncategorized") end,
|
||||
get = function() return Rekt:getTypeSortOrder("uncategorized") end,
|
||||
set = function(_, v)
|
||||
Rect:setTypeSortOrder("uncategorized", v);
|
||||
Rekt:setTypeSortOrder("uncategorized", v);
|
||||
end
|
||||
},
|
||||
|
||||
@ -520,86 +520,86 @@ function Rect:getGlobalOptions()
|
||||
},
|
||||
silencecolorsel = {
|
||||
type = "color", name = "Silence's color", hasAlpha = true, order = 52,
|
||||
get = function() return Rect:getColor("silence") end,
|
||||
get = function() return Rekt:getColor("silence") end,
|
||||
set = function(_, r, g, b, a)
|
||||
Rect:setColor("silence", r, g, b, a);
|
||||
Rekt:setColor("silence", r, g, b, a);
|
||||
end
|
||||
},
|
||||
gapclosercolorsel = {
|
||||
type = "color", name = "Gapcloser's color", hasAlpha = true, order = 53,
|
||||
get = function() return Rect:getColor("gapcloser") end,
|
||||
get = function() return Rekt:getColor("gapcloser") end,
|
||||
set = function(_, r, g, b, a)
|
||||
Rect:setColor("gapcloser", r, g, b, a);
|
||||
Rekt:setColor("gapcloser", r, g, b, a);
|
||||
end
|
||||
},
|
||||
defensivecolorsel = {
|
||||
type = "color", name = "Defensive's color", hasAlpha = true, order = 54,
|
||||
get = function() return Rect:getColor("defensive") end,
|
||||
get = function() return Rekt:getColor("defensive") end,
|
||||
set = function(_, r, g, b, a)
|
||||
Rect:setColor("defensive", r, g, b, a);
|
||||
Rekt:setColor("defensive", r, g, b, a);
|
||||
end
|
||||
},
|
||||
potioncolorsel = {
|
||||
type = "color", name = "Potion's color", hasAlpha = true, order = 55,
|
||||
get = function() return Rect:getColor("potion") end,
|
||||
get = function() return Rekt:getColor("potion") end,
|
||||
set = function(_, r, g, b, a)
|
||||
Rect:setColor("potion", r, g, b, a);
|
||||
Rekt:setColor("potion", r, g, b, a);
|
||||
end
|
||||
},
|
||||
nukecolorsel = {
|
||||
type = "color", name = "Nuke's color", hasAlpha = true, order = 56,
|
||||
get = function() return Rect:getColor("nuke") end,
|
||||
get = function() return Rekt:getColor("nuke") end,
|
||||
set = function(_, r, g, b, a)
|
||||
Rect:setColor("nuke", r, g, b, a);
|
||||
Rekt:setColor("nuke", r, g, b, a);
|
||||
end
|
||||
},
|
||||
anticccolorsel = {
|
||||
type = "color", name = "Anticc's color", hasAlpha = true, order = 57,
|
||||
get = function() return Rect:getColor("anticc") end,
|
||||
get = function() return Rekt:getColor("anticc") end,
|
||||
set = function(_, r, g, b, a)
|
||||
Rect:setColor("anticc", r, g, b, a);
|
||||
Rekt:setColor("anticc", r, g, b, a);
|
||||
end
|
||||
},
|
||||
cccolorsel = {
|
||||
type = "color", name = "Cc's color", hasAlpha = true, order = 58,
|
||||
get = function() return Rect:getColor("cc") end,
|
||||
get = function() return Rekt:getColor("cc") end,
|
||||
set = function(_, r, g, b, a)
|
||||
Rect:setColor("cc", r, g, b, a);
|
||||
Rekt:setColor("cc", r, g, b, a);
|
||||
end
|
||||
},
|
||||
stuncolorsel = {
|
||||
type = "color", name = "Stun's color", hasAlpha = true, order = 59,
|
||||
get = function() return Rect:getColor("stun") end,
|
||||
get = function() return Rekt:getColor("stun") end,
|
||||
set = function(_, r, g, b, a)
|
||||
Rect:setColor("stun", r, g, b, a);
|
||||
Rekt:setColor("stun", r, g, b, a);
|
||||
end
|
||||
},
|
||||
disarmcolorsel = {
|
||||
type = "color", name = "Disarm's color", hasAlpha = true, order = 60,
|
||||
get = function() return Rect:getColor("disarm") end,
|
||||
get = function() return Rekt:getColor("disarm") end,
|
||||
set = function(_, r, g, b, a)
|
||||
Rect:setColor("disarm", r, g, b, a);
|
||||
Rekt:setColor("disarm", r, g, b, a);
|
||||
end
|
||||
},
|
||||
cdresetcolorsel = {
|
||||
type = "color", name = "Cdreset's color", hasAlpha = true, order = 61,
|
||||
get = function() return Rect:getColor("cdreset") end,
|
||||
get = function() return Rekt:getColor("cdreset") end,
|
||||
set = function(_, r, g, b, a)
|
||||
Rect:setColor("cdreset", r, g, b, a);
|
||||
Rekt:setColor("cdreset", r, g, b, a);
|
||||
end
|
||||
},
|
||||
shieldcolorsel = {
|
||||
type = "color", name = "Shield's color", hasAlpha = true, order = 62,
|
||||
get = function() return Rect:getColor("shield") end,
|
||||
get = function() return Rekt:getColor("shield") end,
|
||||
set = function(_, r, g, b, a)
|
||||
Rect:setColor("shield", r, g, b, a);
|
||||
Rekt:setColor("shield", r, g, b, a);
|
||||
end
|
||||
},
|
||||
uncategorizedcolorsel = {
|
||||
type = "color", name = "Uncategorized's color", hasAlpha = true, order = 63,
|
||||
get = function() return Rect:getColor("uncategorized") end,
|
||||
get = function() return Rekt:getColor("uncategorized") end,
|
||||
set = function(_, r, g, b, a)
|
||||
Rect:setColor("uncategorized", r, g, b, a);
|
||||
Rekt:setColor("uncategorized", r, g, b, a);
|
||||
end
|
||||
},
|
||||
}
|
||||
@ -607,34 +607,34 @@ function Rect:getGlobalOptions()
|
||||
end
|
||||
|
||||
--order 50+
|
||||
function Rect:getDebugOptions()
|
||||
function Rekt:getDebugOptions()
|
||||
local args = {
|
||||
spellcast = {
|
||||
type = "toggle", name = "SpellCast", desc = "Enable/Disable writing out SPELL_CAST_SUCCESS events.", order = 50,
|
||||
get = function() return Rect:getSpellCastDebug() end,
|
||||
get = function() return Rekt:getSpellCastDebug() end,
|
||||
set = function(_, v)
|
||||
Rect:setSpellCastDebug(v);
|
||||
Rekt:setSpellCastDebug(v);
|
||||
end
|
||||
},
|
||||
spellAura = {
|
||||
type = "toggle", name = "SpellAura", desc = "Enable/Disablewriting out SPLL_AURA_* events", order = 51,
|
||||
get = function() return Rect:getSpellAuraDebug() end,
|
||||
get = function() return Rekt:getSpellAuraDebug() end,
|
||||
set = function(_, v)
|
||||
Rect:setSpellAuraDebug(v);
|
||||
Rekt:setSpellAuraDebug(v);
|
||||
end
|
||||
},
|
||||
allLog = {
|
||||
type = "toggle", name = "Uber debug", desc = "Enable/Disable writing out all combatlog events", order = 52,
|
||||
get = function() return Rect:getAllCDebug() end,
|
||||
get = function() return Rekt:getAllCDebug() end,
|
||||
set = function(_, v)
|
||||
Rect:setAllCDebug(v);
|
||||
Rekt:setAllCDebug(v);
|
||||
end
|
||||
},
|
||||
selfcd = {
|
||||
type = "toggle", name = "Self CDs", desc = "Enable/Disable registering self CDs", order = 53,
|
||||
get = function() return Rect:getSelfCDRegister() end,
|
||||
get = function() return Rekt:getSelfCDRegister() end,
|
||||
set = function(_, v)
|
||||
Rect:setSelfCDRegister(v);
|
||||
Rekt:setSelfCDRegister(v);
|
||||
end
|
||||
},
|
||||
debugselect = {
|
||||
@ -643,16 +643,16 @@ function Rect:getDebugOptions()
|
||||
values = {
|
||||
["0"] = "No Messages",
|
||||
},
|
||||
get = function() return Rect:getDebugLevel() end,
|
||||
get = function() return Rekt:getDebugLevel() end,
|
||||
set = function(_, v)
|
||||
Rect:setDebugLevel(v);
|
||||
Rekt:setDebugLevel(v);
|
||||
end
|
||||
},
|
||||
}
|
||||
return args;
|
||||
end
|
||||
|
||||
function Rect:GetTypeSortDropdown(num)
|
||||
function Rekt:GetTypeSortDropdown(num)
|
||||
local arr = {
|
||||
type = "select", style = "dropdown", name = "selfDRSortOrder",
|
||||
desc = "Change the your DR's sort order", order = 28,
|
||||
@ -665,9 +665,9 @@ function Rect:GetTypeSortDropdown(num)
|
||||
["6"] = "Recent Last",
|
||||
["7"] = "No order"
|
||||
},
|
||||
get = function() return Rect:getSortOrder("selfdr") end,
|
||||
get = function() return Rekt:getSortOrder("selfdr") end,
|
||||
set = function(_, v)
|
||||
Rect:setSortOrder("selfdr", v);
|
||||
Rekt:setSortOrder("selfdr", v);
|
||||
end
|
||||
}
|
||||
return arr;
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
--["1"] = "Ascending (CD left)",
|
||||
function Rect:ComparerAscendingCDLeft(a, b)
|
||||
function Rekt:ComparerAscendingCDLeft(a, b)
|
||||
if a.endTime < b.endTime then
|
||||
return true;
|
||||
else
|
||||
@ -9,7 +9,7 @@ function Rect:ComparerAscendingCDLeft(a, b)
|
||||
end
|
||||
|
||||
--["2"] = "Descending (CD left)",
|
||||
function Rect:ComparerDescendingCDLeft(a, b)
|
||||
function Rekt:ComparerDescendingCDLeft(a, b)
|
||||
if a.endTime < b.endTime then
|
||||
return false;
|
||||
else
|
||||
@ -18,7 +18,7 @@ function Rect:ComparerDescendingCDLeft(a, b)
|
||||
end
|
||||
|
||||
--["3"] = "Ascending (CD total)",
|
||||
function Rect:ComparerAscendingCDTotal(a, b)
|
||||
function Rekt:ComparerAscendingCDTotal(a, b)
|
||||
if a.cd < b.cd then
|
||||
return true;
|
||||
else
|
||||
@ -27,7 +27,7 @@ function Rect:ComparerAscendingCDTotal(a, b)
|
||||
end
|
||||
|
||||
--["4"] = "Descending (CD total)",
|
||||
function Rect:ComparerDescendingCDTotal(a, b)
|
||||
function Rekt:ComparerDescendingCDTotal(a, b)
|
||||
if a.cd < b.cd then
|
||||
return false;
|
||||
else
|
||||
@ -36,7 +36,7 @@ function Rect:ComparerDescendingCDTotal(a, b)
|
||||
end
|
||||
|
||||
--["5"] = "Recent first",
|
||||
function Rect:ComparerRecentFirst(a, b)
|
||||
function Rekt:ComparerRecentFirst(a, b)
|
||||
if a.currentTime < b.currentTime then
|
||||
return false;
|
||||
else
|
||||
@ -45,7 +45,7 @@ function Rect:ComparerRecentFirst(a, b)
|
||||
end
|
||||
|
||||
--["6"] = "Recent Last",
|
||||
function Rect:ComparerRecentLast(a, b)
|
||||
function Rekt:ComparerRecentLast(a, b)
|
||||
if a.currentTime < b.currentTime then
|
||||
return true;
|
||||
else
|
||||
@ -56,8 +56,8 @@ end
|
||||
--CD Type sorters
|
||||
|
||||
--["1"] = "Ascending (CD left)",
|
||||
function Rect:ComparerAscendingCDLeftT(a, b)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:ComparerAscendingCDLeftT(a, b)
|
||||
local db = Rekt.db.profile;
|
||||
|
||||
if (db["cdtypesortorder"][a.spellCategory] < db["cdtypesortorder"][b.spellCategory]) then
|
||||
return true;
|
||||
@ -73,8 +73,8 @@ function Rect:ComparerAscendingCDLeftT(a, b)
|
||||
end
|
||||
|
||||
--["2"] = "Descending (CD left)",
|
||||
function Rect:ComparerDescendingCDLeftT(a, b)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:ComparerDescendingCDLeftT(a, b)
|
||||
local db = Rekt.db.profile;
|
||||
|
||||
if (db["cdtypesortorder"][a.spellCategory] < db["cdtypesortorder"][b.spellCategory]) then
|
||||
return true;
|
||||
@ -90,8 +90,8 @@ function Rect:ComparerDescendingCDLeftT(a, b)
|
||||
end
|
||||
|
||||
--["3"] = "Ascending (CD total)",
|
||||
function Rect:ComparerAscendingCDTotalT(a, b)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:ComparerAscendingCDTotalT(a, b)
|
||||
local db = Rekt.db.profile;
|
||||
|
||||
if (db["cdtypesortorder"][a.spellCategory] < db["cdtypesortorder"][b.spellCategory]) then
|
||||
return true;
|
||||
@ -107,8 +107,8 @@ function Rect:ComparerAscendingCDTotalT(a, b)
|
||||
end
|
||||
|
||||
--["4"] = "Descending (CD total)",
|
||||
function Rect:ComparerDescendingCDTotalT(a, b)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:ComparerDescendingCDTotalT(a, b)
|
||||
local db = Rekt.db.profile;
|
||||
|
||||
if (db["cdtypesortorder"][a.spellCategory] < db["cdtypesortorder"][b.spellCategory]) then
|
||||
return true;
|
||||
@ -124,8 +124,8 @@ function Rect:ComparerDescendingCDTotalT(a, b)
|
||||
end
|
||||
|
||||
--["5"] = "Recent first",
|
||||
function Rect:ComparerRecentFirstT(a, b)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:ComparerRecentFirstT(a, b)
|
||||
local db = Rekt.db.profile;
|
||||
|
||||
if (db["cdtypesortorder"][a.spellCategory] < db["cdtypesortorder"][b.spellCategory]) then
|
||||
return true;
|
||||
@ -141,8 +141,8 @@ function Rect:ComparerRecentFirstT(a, b)
|
||||
end
|
||||
|
||||
--["6"] = "Recent Last",
|
||||
function Rect:ComparerRecentLastT(a, b)
|
||||
local db = Rect.db.profile;
|
||||
function Rekt:ComparerRecentLastT(a, b)
|
||||
local db = Rekt.db.profile;
|
||||
|
||||
if (db["cdtypesortorder"][a.spellCategory] < db["cdtypesortorder"][b.spellCategory]) then
|
||||
return true;
|
||||
|
@ -15,7 +15,7 @@
|
||||
-- values: silence,gapcloser,defensive,potion,nuke,anticc,cc,stun,disarm,cdreset,shield,uncategorized
|
||||
--ispetspell -> if its a pet spell true, else false
|
||||
|
||||
Rect.spells = {
|
||||
Rekt.spells = {
|
||||
--Trinkets
|
||||
--This (Doesn't work, because there is no combatlog event)
|
||||
[42292] = {120, nil, 120, 120, 120, 0, "", "anticc", false}, --PvP Trinket
|
||||
|
Loading…
Reference in New Issue
Block a user