mirror of
https://github.com/Relintai/Relintais-Enemy-Kooldown-Tracker-WotLK.git
synced 2024-11-08 10:12:11 +01:00
-Added an option to set the DR time.
-The default DR time is now 15 seconds, because my tests show that servers use flat 15 seconds.
This commit is contained in:
parent
6423c69476
commit
b2cf208b1a
1
Rekt.lua
1
Rekt.lua
@ -43,6 +43,7 @@ Rekt.defaults = {
|
|||||||
selfIBCDRegister = false,
|
selfIBCDRegister = false,
|
||||||
specdetection = true,
|
specdetection = true,
|
||||||
petcdguessing = true,
|
petcdguessing = true,
|
||||||
|
drtime = 15,
|
||||||
target = {
|
target = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
size = 27,
|
size = 27,
|
||||||
|
12
data/drs.lua
12
data/drs.lua
@ -21,7 +21,7 @@ function Rekt:DRDebuffGained(spellID, dstGUID, isPlayer)
|
|||||||
Rekt:UpdateDRs(dstGUID);
|
Rekt:UpdateDRs(dstGUID);
|
||||||
|
|
||||||
if not Rekt.drs[dstGUID][drCat] then
|
if not Rekt.drs[dstGUID][drCat] then
|
||||||
local cd = 18;
|
local cd = Rekt:getDRTime();
|
||||||
local currentTime = GetTime();
|
local currentTime = GetTime();
|
||||||
local endTime = currentTime + cd;
|
local endTime = currentTime + cd;
|
||||||
local diminished = 1;
|
local diminished = 1;
|
||||||
@ -45,7 +45,7 @@ function Rekt:DRDebuffGained(spellID, dstGUID, isPlayer)
|
|||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
|
|
||||||
local cd = 18;
|
local cd = Rekt:getDRTime();
|
||||||
local currentTime = GetTime();
|
local currentTime = GetTime();
|
||||||
local endTime = currentTime + cd;
|
local endTime = currentTime + cd;
|
||||||
Rekt.drs[dstGUID][drCat][1] = currentTime;
|
Rekt.drs[dstGUID][drCat][1] = currentTime;
|
||||||
@ -56,7 +56,7 @@ function Rekt:DRDebuffGained(spellID, dstGUID, isPlayer)
|
|||||||
Rekt.drs[dstGUID][drCat][7] = false;
|
Rekt.drs[dstGUID][drCat][7] = false;
|
||||||
Rekt.drs[dstGUID][drCat][9] = GetTime();
|
Rekt.drs[dstGUID][drCat][9] = GetTime();
|
||||||
|
|
||||||
--reset it back to 1, x > 3 means, the server updated the dr in less than 18 sec.
|
--reset it back to 1, x > 3 means, the server updated the dr in less than Rekt:getDRTime() sec.
|
||||||
if Rekt.drs[dstGUID][drCat][6] > 3 then
|
if Rekt.drs[dstGUID][drCat][6] > 3 then
|
||||||
Rekt.drs[dstGUID][drCat][6] = 1;
|
Rekt.drs[dstGUID][drCat][6] = 1;
|
||||||
end
|
end
|
||||||
@ -94,7 +94,7 @@ function Rekt:DRDebuffFaded(spellID, dstGUID, isPlayer)
|
|||||||
--means we didn't see it applied
|
--means we didn't see it applied
|
||||||
Rekt:DRDebuffGained(spellID, dstGUID, isPlayer);
|
Rekt:DRDebuffGained(spellID, dstGUID, isPlayer);
|
||||||
else
|
else
|
||||||
local cd = 18;
|
local cd = Rekt:getDRTime();
|
||||||
local currentTime = GetTime();
|
local currentTime = GetTime();
|
||||||
local endTime = currentTime + cd;
|
local endTime = currentTime + cd;
|
||||||
Rekt.drs[dstGUID][drCat][1] = currentTime;
|
Rekt.drs[dstGUID][drCat][1] = currentTime;
|
||||||
@ -137,7 +137,7 @@ function Rekt:DRDebuffRefreshed(spellID, dstGUID, isPlayer)
|
|||||||
Rekt:DRDebuffGained(spellID, dstGUID, isPlayer);
|
Rekt:DRDebuffGained(spellID, dstGUID, isPlayer);
|
||||||
return;
|
return;
|
||||||
else
|
else
|
||||||
local cd = 18;
|
local cd = Rekt:getDRTime();
|
||||||
local currentTime = GetTime();
|
local currentTime = GetTime();
|
||||||
local endTime = currentTime + cd;
|
local endTime = currentTime + cd;
|
||||||
Rekt.drs[dstGUID][drCat][1] = currentTime;
|
Rekt.drs[dstGUID][drCat][1] = currentTime;
|
||||||
@ -148,7 +148,7 @@ function Rekt:DRDebuffRefreshed(spellID, dstGUID, isPlayer)
|
|||||||
Rekt.drs[dstGUID][drCat][7] = false;
|
Rekt.drs[dstGUID][drCat][7] = false;
|
||||||
Rekt.drs[dstGUID][drCat][9] = GetTime();
|
Rekt.drs[dstGUID][drCat][9] = GetTime();
|
||||||
|
|
||||||
--reset it back to 1, x > 3 means, the server updated the dr in less than 18 sec.
|
--reset it back to 1, x > 3 means, the server updated the dr in less than Rekt:getDRTime() sec.
|
||||||
if Rekt.drs[dstGUID][drCat][6] > 3 then
|
if Rekt.drs[dstGUID][drCat][6] > 3 then
|
||||||
Rekt.drs[dstGUID][drCat][6] = 1;
|
Rekt.drs[dstGUID][drCat][6] = 1;
|
||||||
end
|
end
|
||||||
|
@ -445,4 +445,14 @@ end
|
|||||||
function Rekt:setIBSelfCDRegister(v)
|
function Rekt:setIBSelfCDRegister(v)
|
||||||
local db = Rekt.db.profile;
|
local db = Rekt.db.profile;
|
||||||
db["selfIBCDRegister"] = v;
|
db["selfIBCDRegister"] = v;
|
||||||
|
end
|
||||||
|
|
||||||
|
function Rekt:getDRTime()
|
||||||
|
local db = Rekt.db.profile;
|
||||||
|
return db["drtime"];
|
||||||
|
end
|
||||||
|
|
||||||
|
function Rekt:setDRTime(v)
|
||||||
|
local db = Rekt.db.profile;
|
||||||
|
db["drtime"] = v;
|
||||||
end
|
end
|
@ -273,7 +273,7 @@ function Rekt:getTargetandFocusOptions()
|
|||||||
Rekt:setDRNumPosition("targetdr", v);
|
Rekt:setDRNumPosition("targetdr", v);
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
]]--
|
]]--
|
||||||
}
|
}
|
||||||
return args;
|
return args;
|
||||||
end
|
end
|
||||||
@ -707,6 +707,18 @@ function Rekt:getGlobalOptions()
|
|||||||
Rekt:setColor("uncategorized", r, g, b, a);
|
Rekt:setColor("uncategorized", r, g, b, a);
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
||||||
|
--70+
|
||||||
|
globalotherHeader = {
|
||||||
|
type = "header", name = "Other settings", order = 70
|
||||||
|
},
|
||||||
|
drtimerange = {
|
||||||
|
type = "range", name = "Diminishing Return time", order = 71, min = 1, max = 25, step = 1,
|
||||||
|
get = function() return Rekt:getDRTime() end,
|
||||||
|
set = function(_, v)
|
||||||
|
Rekt:setDRTime(v);
|
||||||
|
end
|
||||||
|
},
|
||||||
}
|
}
|
||||||
return args;
|
return args;
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user