configurable DR duration
This commit is contained in:
parent
6de5a60309
commit
4c239cd599
2
Lang.lua
2
Lang.lua
@ -406,6 +406,8 @@ elseif GetLocale() == "deDE" then
|
|||||||
L["Categories"] = "Kategorien"
|
L["Categories"] = "Kategorien"
|
||||||
L["Force Icon"] = "Erzwinge Symbol"
|
L["Force Icon"] = "Erzwinge Symbol"
|
||||||
L["Icon of the DR"] = "Symbol des DR"
|
L["Icon of the DR"] = "Symbol des DR"
|
||||||
|
L["DR Duration"] = "DR Dauer"
|
||||||
|
L["Change the DR Duration in seconds (DR is dynamic between 15-20s)"] = "Verändere die DR Dauer in Sekunden (DR ist dynamisch zwischen 15-20s)"
|
||||||
|
|
||||||
-- ExportImport.lua
|
-- ExportImport.lua
|
||||||
L["Export Import"] = "Exportieren Importieren"
|
L["Export Import"] = "Exportieren Importieren"
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
local select = select
|
local select = select
|
||||||
local pairs,ipairs,tbl_sort,tinsert,format = pairs,ipairs,table.sort,tinsert,format
|
local pairs,ipairs,tbl_sort,tinsert,format = pairs,ipairs,table.sort,tinsert,format
|
||||||
|
|
||||||
local drDuration = 18
|
|
||||||
|
|
||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
local CreateFrame = CreateFrame
|
local CreateFrame = CreateFrame
|
||||||
local GetTime = GetTime
|
local GetTime = GetTime
|
||||||
@ -47,7 +45,8 @@ local Diminishings = Gladdy:NewModule("Diminishings", nil, {
|
|||||||
drQuarterColor = {r = 1, g = 0.7, b = 0, a = 1 },
|
drQuarterColor = {r = 1, g = 0.7, b = 0, a = 1 },
|
||||||
drNullColor = {r = 1, g = 0, b = 0, a = 1 },
|
drNullColor = {r = 1, g = 0, b = 0, a = 1 },
|
||||||
drWidthFactor = 1,
|
drWidthFactor = 1,
|
||||||
drCategories = defaultCategories()
|
drCategories = defaultCategories(),
|
||||||
|
drDuration = 18
|
||||||
})
|
})
|
||||||
|
|
||||||
local function getDiminishColor(dr)
|
local function getDiminishColor(dr)
|
||||||
@ -296,14 +295,14 @@ function Diminishings:AuraFade(unit, spellID)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
lastIcon.dr = drCat
|
lastIcon.dr = drCat
|
||||||
lastIcon.timeLeft = drDuration
|
lastIcon.timeLeft = Gladdy.db.drDuration
|
||||||
lastIcon.diminishing = DRData:NextDR(lastIcon.diminishing)
|
lastIcon.diminishing = DRData:NextDR(lastIcon.diminishing)
|
||||||
if Gladdy.db.drBorderColorsEnabled then
|
if Gladdy.db.drBorderColorsEnabled then
|
||||||
lastIcon.border:SetVertexColor(getDiminishColor(lastIcon.diminishing))
|
lastIcon.border:SetVertexColor(getDiminishColor(lastIcon.diminishing))
|
||||||
else
|
else
|
||||||
lastIcon.border:SetVertexColor(Gladdy.db.drBorderColor.r, Gladdy.db.drBorderColor.g, Gladdy.db.drBorderColor.b, Gladdy.db.drBorderColor.a)
|
lastIcon.border:SetVertexColor(Gladdy.db.drBorderColor.r, Gladdy.db.drBorderColor.g, Gladdy.db.drBorderColor.b, Gladdy.db.drBorderColor.a)
|
||||||
end
|
end
|
||||||
lastIcon.cooldown:SetCooldown(GetTime(), drDuration)
|
lastIcon.cooldown:SetCooldown(GetTime(), Gladdy.db.drDuration)
|
||||||
if Gladdy.db.drCategories[drCat].forceIcon then
|
if Gladdy.db.drCategories[drCat].forceIcon then
|
||||||
lastIcon.texture:SetTexture(Gladdy.db.drCategories[drCat].icon)
|
lastIcon.texture:SetTexture(Gladdy.db.drCategories[drCat].icon)
|
||||||
else
|
else
|
||||||
@ -359,11 +358,20 @@ function Diminishings:GetOptions()
|
|||||||
desc = L["Enabled DR module"],
|
desc = L["Enabled DR module"],
|
||||||
order = 3,
|
order = 3,
|
||||||
}),
|
}),
|
||||||
|
drDuration = Gladdy:option({
|
||||||
|
type = "range",
|
||||||
|
name = L["DR Duration"],
|
||||||
|
desc = L["Change the DR Duration in seconds (DR is dynamic between 15-20s)"],
|
||||||
|
order = 4,
|
||||||
|
min = 15,
|
||||||
|
max = 20,
|
||||||
|
step = .1,
|
||||||
|
}),
|
||||||
group = {
|
group = {
|
||||||
type = "group",
|
type = "group",
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
name = L["Frame"],
|
name = L["Frame"],
|
||||||
order = 4,
|
order = 5,
|
||||||
args = {
|
args = {
|
||||||
icon = {
|
icon = {
|
||||||
type = "group",
|
type = "group",
|
||||||
|
Loading…
Reference in New Issue
Block a user