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