-Now, if an aura is removed, but the addon doesn't get the proper event, the DR icon will wait for 10 sec + the DR reset duration.

(it won't actually start counting, because that will be more misleading.)
-Incremented version.
(Port from the WotLK version)
This commit is contained in:
Relintai 2016-05-31 14:58:29 +02:00
parent b00d151fe3
commit cad1f50161
3 changed files with 7 additions and 4 deletions

View File

@ -2,11 +2,11 @@
## Author: Relintai ## Author: Relintai
## Name: Rekt ## Name: Rekt
## Title: Rekt ## Title: Rekt
## Notes: Relintai's Enemy "Kooldown" Tracker V1.1 ## Notes: Relintai's Enemy "Kooldown" Tracker V1.11
## DefaultState: Enabled ## DefaultState: Enabled
## OptionalDeps: Ace3 ## OptionalDeps: Ace3
## SavedVariables: RektDB ## SavedVariables: RektDB
## Version: 1.1 ## Version: 1.11
embeds.xml embeds.xml
data\global.lua data\global.lua

View File

@ -327,6 +327,7 @@ function Rekt:CreateDRFrames(which)
t:SetPoint("CENTER", frame, "CENTER", 0, 0); t:SetPoint("CENTER", frame, "CENTER", 0, 0);
t:SetFont("Fonts\\FRIZQT__.TTF", 11, "OUTLINE, MONOCHROME") t:SetFont("Fonts\\FRIZQT__.TTF", 11, "OUTLINE, MONOCHROME")
--frame:Hide(); --frame:Hide();
Rekt.frames[which][i] = {} Rekt.frames[which][i] = {}
Rekt.frames[which][i]["frame"] = frame; Rekt.frames[which][i]["frame"] = frame;
Rekt.frames[which][i]["texture"] = text; Rekt.frames[which][i]["texture"] = text;
@ -410,13 +411,15 @@ function Rekt:UpdateDRs(unitGUID)
if not self.drs[unitGUID] then return end if not self.drs[unitGUID] then return end
local t = GetTime(); local t = GetTime();
local found = false; local found = false;
--let's check if one of the cooldowns finished --let's check if one of the cooldowns finished
for k, v in pairs(self.drs[unitGUID]) do for k, v in pairs(self.drs[unitGUID]) do
if (v[7] == true and v[2] <= t) or (v[2] + 25 <= t) then if (v[7] == true and v[2] <= t) or (v[2] + 10 + Rekt:getDRTime() <= t) then
self.drs[unitGUID][v[8]] = nil; self.drs[unitGUID][v[8]] = nil;
found = true; found = true;
end end
end end
return found; return found;
end end

View File

@ -2,7 +2,7 @@
Rekt = LibStub("AceAddon-3.0"):NewAddon("Rekt", "AceConsole-3.0", "AceEvent-3.0") Rekt = LibStub("AceAddon-3.0"):NewAddon("Rekt", "AceConsole-3.0", "AceEvent-3.0")
Rekt.appName = "Rekt" Rekt.appName = "Rekt"
Rekt.dbName = "RektDB" Rekt.dbName = "RektDB"
Rekt.version = "1.05" Rekt.version = "1.11"
Rekt.modules = {} Rekt.modules = {}