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,
|
||||
specdetection = true,
|
||||
petcdguessing = true,
|
||||
drtime = 15,
|
||||
target = {
|
||||
enabled = true,
|
||||
size = 27,
|
||||
|
12
data/drs.lua
12
data/drs.lua
@ -21,7 +21,7 @@ function Rekt:DRDebuffGained(spellID, dstGUID, isPlayer)
|
||||
Rekt:UpdateDRs(dstGUID);
|
||||
|
||||
if not Rekt.drs[dstGUID][drCat] then
|
||||
local cd = 18;
|
||||
local cd = Rekt:getDRTime();
|
||||
local currentTime = GetTime();
|
||||
local endTime = currentTime + cd;
|
||||
local diminished = 1;
|
||||
@ -45,7 +45,7 @@ function Rekt:DRDebuffGained(spellID, dstGUID, isPlayer)
|
||||
return;
|
||||
end
|
||||
|
||||
local cd = 18;
|
||||
local cd = Rekt:getDRTime();
|
||||
local currentTime = GetTime();
|
||||
local endTime = currentTime + cd;
|
||||
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][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
|
||||
Rekt.drs[dstGUID][drCat][6] = 1;
|
||||
end
|
||||
@ -94,7 +94,7 @@ function Rekt:DRDebuffFaded(spellID, dstGUID, isPlayer)
|
||||
--means we didn't see it applied
|
||||
Rekt:DRDebuffGained(spellID, dstGUID, isPlayer);
|
||||
else
|
||||
local cd = 18;
|
||||
local cd = Rekt:getDRTime();
|
||||
local currentTime = GetTime();
|
||||
local endTime = currentTime + cd;
|
||||
Rekt.drs[dstGUID][drCat][1] = currentTime;
|
||||
@ -137,7 +137,7 @@ function Rekt:DRDebuffRefreshed(spellID, dstGUID, isPlayer)
|
||||
Rekt:DRDebuffGained(spellID, dstGUID, isPlayer);
|
||||
return;
|
||||
else
|
||||
local cd = 18;
|
||||
local cd = Rekt:getDRTime();
|
||||
local currentTime = GetTime();
|
||||
local endTime = currentTime + cd;
|
||||
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][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
|
||||
Rekt.drs[dstGUID][drCat][6] = 1;
|
||||
end
|
||||
|
@ -445,4 +445,14 @@ end
|
||||
function Rekt:setIBSelfCDRegister(v)
|
||||
local db = Rekt.db.profile;
|
||||
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
|
@ -273,7 +273,7 @@ function Rekt:getTargetandFocusOptions()
|
||||
Rekt:setDRNumPosition("targetdr", v);
|
||||
end
|
||||
},
|
||||
]]--
|
||||
]]--
|
||||
}
|
||||
return args;
|
||||
end
|
||||
@ -707,6 +707,18 @@ function Rekt:getGlobalOptions()
|
||||
Rekt:setColor("uncategorized", r, g, b, a);
|
||||
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;
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user