-Fixed a typo, now the combatlog fix properly works.

-Fixed a typo, now the bars gets properly cleaned up.
-Fixed a bug, where some aura-spells were added twice to the interruptbar. (Like Shadowpriest silence.)
-Started work on the warnframe.
This commit is contained in:
Relintai 2016-05-09 19:07:29 +02:00
parent 58a6cfe458
commit 955069e475
4 changed files with 59 additions and 6 deletions

View File

@ -73,6 +73,14 @@ Rekt.defaults = {
colorframeenabled = true,
colorframesize = 4
},
warnframe = {
enabled = true,
size = 40,
xPos = 380,
yPos = 380,
textsize = 14,
textposition = tostring(1)
},
targetdr = {
enabled = true,
size = 27,
@ -242,7 +250,7 @@ function Rekt:CombatLogClearFix()
--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
if delta > 30 then
if delta < 30 then
return;
end
@ -309,7 +317,7 @@ function Rekt:COMBAT_LOG_EVENT_UNFILTERED(_, timestamp, eventType, srcGUID, srcN
end
if Rekt.spells[spellID] then
Rekt:AddCd(srcGUID, spellID, srcFlags);
Rekt:AddCd(srcGUID, spellID, eventType, srcFlags);
end
end

View File

@ -51,7 +51,7 @@ function Rekt:ReassignCds(which)
end
end
function Rekt:AddCd(srcGUID, spellID, srcFlags)
function Rekt:AddCd(srcGUID, spellID, eventType, srcFlags)
local db = Rekt.db.profile;
if not db["enabled"] then return end;
@ -106,7 +106,7 @@ function Rekt:AddCd(srcGUID, spellID, srcFlags)
}
--Interruptbar
if interrupt and db["interruptbar"]["enabled"] then
if interrupt and db["interruptbar"]["enabled"] and eventType == "SPELL_CAST_SUCCESS" then
Rekt:AddInterruptCD(Rekt.cds[srcGUID][spellID], srcFlags);
end

View File

@ -15,7 +15,6 @@ function Rekt:AddInterruptCD(cooldown, srcFlags)
end
end
local ir = Rekt.interrupts;
ir["count"] = ir["count"] + 1;
@ -97,7 +96,8 @@ function Rekt:UpdateIBCDs()
if found then
self.interrupts["count"] = self.interrupts["count"] - count;
self.interrupts["spells"] = Rekt.NormalizeTable(self.interrupts["spells"]);
--self:Print("Count:" .. count .. " self.interruptscount: " .. self.interrupts["count"]);
self.interrupts["spells"] = Rekt:NormalizeTable(self.interrupts["spells"]);
end
return found;
@ -116,9 +116,12 @@ end
for k, v in pairs(table) do
if v then
tmp[i] = v;
i = i + 1;
end
end
--self:Print("normalize i: " .. i);
return tmp;
end

View File

@ -232,6 +232,48 @@ function Rekt:getTargetandFocusOptions()
Rekt:setColorFrameSize("interruptbar", v);
end
},
warnHeader = {
type = "header", name = "Warn Frame's settings", order = 40
},
warntoggle = {
type = "toggle", name = "Warn Frame", desc = "Enable/Disable showing the Warn Frame", order = 41,
get = function() return Rekt:isPartEnabled("interruptbar") end,
set = function(_, v)
Rekt:SetPartEnabledOrDisabled("interruptbar", v);
end
},
warnrange = {
type = "range", name = "Warn Frame's size", order = 42, min = 10, max = 150, step = 1,
get = function() return Rekt:getFrameSize("interruptbar") end,
set = function(_, v)
Rekt:setFrameSize("interruptbar", v);
end
},
warntextsizerange = {
type = "range", name = "Text size", desc = "Warn Frame's Text size. Set it to 0 to disable it!",
order = 43, min = 1, max = 30, step = 1,
get = function() return Rekt:getDRNumSize("targetdr") end,
set = function(_, v)
Rekt:setDRNumSize("targetdr", v);
end
},
warntextposselect = {
type = "select", style = "dropdown", name = "Warn Frame Text Position",
desc = "Change the target's DR's number's position.", order = 44,
values = {
["1"] = "Up",
["2"] = "Right",
["3"] = "Down",
["4"] = "Left",
["5"] = "Middle"
},
get = function() return Rekt:getDRNumPosition("targetdr") end,
set = function(_, v)
Rekt:setDRNumPosition("targetdr", v);
end
},
}
return args;
end