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