diff --git a/Vect.lua b/Vect.lua index cbcab9c..f7f7faf 100644 --- a/Vect.lua +++ b/Vect.lua @@ -5,8 +5,6 @@ --CD Sort Order --"Globals" -local ALLOCATE_FRAME_NUM = 5; - local aceDB = LibStub("AceDB-3.0") local aceCDialog = LibStub("AceConfigDialog-3.0") local aceConfig = LibStub("AceConfig-3.0") @@ -34,6 +32,7 @@ Vect.defaults = { spellCastDebug = false, spellAuraDebug = false, allCDebug = false, + selfCDRegister = false, target = { enabled = true, size = 27, @@ -155,8 +154,11 @@ function Vect:ReassignCds(which) local frame = Vect.frames[which][i]["frame"]; frame:Hide(); end + local db = Vect.db.profile; --check if frames are unlocked - if not Vect.db.profile["locked"] then return end; + if not db["locked"] then return end; + --check if we need to display them for the player + if not db["selfCDRegister"] and self.targets[which] == UnitGUID("player") then return end; --check if we have cooldown for that unit if not self.cds[self.targets[which]] then return end; --sort them @@ -494,4 +496,16 @@ end function Vect:setAllCDebug(v) local db = Vect.db.profile; db["allCDebug"] = v; +end + +function Vect:getSelfCDRegister() + local db = Vect.db.profile; + return db["selfCDRegister"]; +end + +function Vect:setSelfCDRegister(v) + local db = Vect.db.profile; + db["selfCDRegister"] = v; + Vect:ReassignCds("target"); + Vect:ReassignCds("focus"); end \ No newline at end of file diff --git a/data/options.lua b/data/options.lua index 4f872f7..7ce545e 100644 --- a/data/options.lua +++ b/data/options.lua @@ -161,29 +161,36 @@ end function Vect: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, - set = function(_, v) - Vect:setSpellCastDebug(v); - end + type = "toggle", name = "SpellCast", desc = "Enable/Disable writing out SPELL_CAST_SUCCESS events.", order = 50, + get = function() return Vect:getSpellCastDebug() end, + set = function(_, v) + Vect:setSpellCastDebug(v); + end }, spellAura = { - type = "toggle", name = "SpellAura", desc = "Enable/Disablewriting out SPLL_AURA_* events", order = 51, - get = function() return Vect:getSpellAuraDebug() end, - set = function(_, v) - Vect:setSpellAuraDebug(v); - end + type = "toggle", name = "SpellAura", desc = "Enable/Disablewriting out SPLL_AURA_* events", order = 51, + get = function() return Vect:getSpellAuraDebug() end, + set = function(_, v) + Vect: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, - set = function(_, v) - Vect:setAllCDebug(v); - end + type = "toggle", name = "Uber debug", desc = "Enable/Disable writing out all combatlog events", order = 52, + get = function() return Vect:getAllCDebug() end, + set = function(_, v) + Vect:setAllCDebug(v); + end + }, + selfcd = { + type = "toggle", name = "Self CDs", desc = "Enable/Disable registering self CDs", order = 53, + get = function() return Vect:getSelfCDRegister() end, + set = function(_, v) + Vect:setSelfCDRegister(v); + end }, debugselect = { type = "select", style = "dropdown", name = "debuglevel", - desc = "Change the debuglevel", order = 53, + desc = "Change the debuglevel", order = 54, values = { ["0"] = "No Messages", },