From c582b94a43cc488b29b0256d329958d4879d619e Mon Sep 17 00:00:00 2001 From: ManneN1 Date: Fri, 17 Sep 2021 23:33:04 +0200 Subject: [PATCH 001/227] Added optional DR immunity level text to DR icon TODO: Add translation support. It's hardcoded English right now. --- Modules/Diminishings.lua | 70 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index 780c188..4f2375d 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -44,6 +44,9 @@ local Diminishings = Gladdy:NewModule("Diminishings", nil, { drHalfColor = {r = 1, g = 1, b = 0, a = 1 }, drQuarterColor = {r = 1, g = 0.7, b = 0, a = 1 }, drNullColor = {r = 1, g = 0, b = 0, a = 1 }, + drLevelTextEnabled = false, + drLevelTextFont = "DorisPP", + drLevelTextFontScale = 1, drWidthFactor = 1, drCategories = defaultCategories(), drDuration = 18 @@ -59,6 +62,16 @@ local function getDiminishColor(dr) end end +local function getDiminishText(dr) + if dr == 0.5 then + return "½" + elseif dr == 0.25 then + return "¼" + else + return "ø" + end +end + function Diminishings:Initialize() self.frames = {} self:RegisterMessage("UNIT_DEATH", "ResetUnit", "AURA_FADE", "UNIT_DESTROYED") @@ -131,6 +144,15 @@ function Diminishings:CreateFrame(unit) icon.timeText:SetShadowColor(0, 0, 0, 1) icon.timeText:SetJustifyH("CENTER") icon.timeText:SetPoint("CENTER", icon, "CENTER", 0, 1) + + icon.drLevelText = icon.cooldownFrame:CreateFontString(nil, "OVERLAY") + icon.drLevelText:SetDrawLayer("OVERLAY") + icon.drLevelText:SetFont(Gladdy:SMFetch("font", "drLevelTextFont"), 10, "OUTLINE") + icon.drLevelText:SetTextColor(getDiminishColor(1)) + icon.drLevelText:SetShadowOffset(1, -1) + icon.drLevelText:SetShadowColor(0, 0, 0, 1) + icon.drLevelText:SetJustifyH("CENTER") + icon.drLevelText:SetPoint("BOTTOM", icon, "BOTTOM", 0, 0) icon.diminishing = 1 @@ -188,6 +210,8 @@ function Diminishings:UpdateFrame(unit) icon.text:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a) icon.timeText:SetFont(Gladdy:SMFetch("font", "drFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drFontScale, "OUTLINE") icon.timeText:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a) + icon.drLevelText:SetFont(Gladdy:SMFetch("font", "drLevelTextFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drLevelTextFontScale, "OUTLINE") + icon.drLevelText:SetTextColor(getDiminishColor(icon.diminishing)) icon.cooldown:SetWidth(icon:GetWidth() - icon:GetWidth()/16) icon.cooldown:SetHeight(icon:GetHeight() - icon:GetHeight()/16) @@ -204,6 +228,13 @@ function Diminishings:UpdateFrame(unit) else icon.border:SetVertexColor(Gladdy.db.drBorderColor.r, Gladdy.db.drBorderColor.g, Gladdy.db.drBorderColor.b, Gladdy.db.drBorderColor.a) end + + if Gladdy.db.drLevelTextEnabled then + icon.drLevelText:Show() + icon.drLevelText:SetText(getDiminishText(icon.diminishing)) + else + icon.drLevelText:Hide() + end icon:ClearAllPoints() if (Gladdy.db.drCooldownPos == "LEFT") then @@ -539,11 +570,48 @@ function Diminishings:GetOptions() width = "full", }), }, + }, + level = { + type = "group", + name = "Level Text", + order = 5, + args = { + headerBorder = { + type = "header", + name = "DR Level", + order = 30, + }, + drLevelTextEnabled = Gladdy:option({ + type = "toggle", + name = "DR Level Text Enabled", + desc = "Shows the current DR Level in the bottom right corner of the DR icon.", + order = 1, + width = "full", + }), + drLevelTextFont = Gladdy:option({ + type = "select", + name = L["Font"], + desc = L["Font of the cooldown"], + order = 11, + dialogControl = "LSM30_Font", + values = AceGUIWidgetLSMlists.font, + }), + drLevelTextFontScale = Gladdy:option({ + type = "range", + name = L["Font scale"], + desc = L["Scale of the text"], + order = 33, + min = 0.1, + max = 2, + step = 0.1, + width = "full", + }), + }, }, border = { type = "group", name = L["Border"], - order = 5, + order = 6, args = { headerBorder = { type = "header", -- 2.39.5 From 01f907f71c031d62ef35812d60b2782be593f208 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 18 Sep 2021 13:15:27 +0200 Subject: [PATCH 002/227] fix import for TW and general issue with BuffsDebuffs --- Libs/LibClassAuras-1.0/LibClassAuras-1.0.lua | 39 +++++++++++++++----- Modules/BuffsDebuffs.lua | 18 +++++++-- 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/Libs/LibClassAuras-1.0/LibClassAuras-1.0.lua b/Libs/LibClassAuras-1.0/LibClassAuras-1.0.lua index 396f988..1a67d4c 100644 --- a/Libs/LibClassAuras-1.0/LibClassAuras-1.0.lua +++ b/Libs/LibClassAuras-1.0/LibClassAuras-1.0.lua @@ -7,6 +7,7 @@ LibClassAuras.debuffs = {} LibClassAuras.debuffToId = {} LibClassAuras.buffs = {} LibClassAuras.buffToId = {} +LibClassAuras.altNames = {} local function Spell(id, opts, class, spellTable, idTable) if not opts or not class then @@ -26,9 +27,20 @@ local function Spell(id, opts, class, spellTable, idTable) return end if opts.altName then - idTable[opts.altName] = {id = id , class = class} + for _,v in ipairs(id) do + LibClassAuras.altNames[v] = opts.altName + end + if idTable[opts.altName] then + tinsert(idTable[opts.altName], {id = id , class = class}) + else + idTable[opts.altName] = {[1] = {id = id , class = class}} + end else - idTable[spellName] = {id = id , class = class} + if idTable[spellName] then + tinsert(idTable[spellName], {id = id , class = class}) + else + idTable[spellName] = {[1] = {id = id , class = class}} + end end if type(id) == "table" then @@ -54,9 +66,11 @@ LibClassAuras.Buff = Buff local function getClassDebuffs(class) local classSpells = {} - for k,v in pairs(LibClassAuras.debuffToId) do - if v.class == class then - tinsert(classSpells, {name = k, id = v.id}) + for name, spells in pairs(LibClassAuras.debuffToId) do + for _, spellInfo in ipairs(spells) do + if spellInfo.class == class then + tinsert(classSpells, {name = name, id = spellInfo.id}) + end end end return classSpells @@ -65,9 +79,11 @@ LibClassAuras.GetClassDebuffs = getClassDebuffs local function getClassBuffs(class) local classSpells = {} - for k,v in pairs(LibClassAuras.buffToId) do - if v.class == class then - tinsert(classSpells, {name = k, id = v.id}) + for name, spells in pairs(LibClassAuras.buffToId) do + for _, spellInfo in ipairs(spells) do + if spellInfo.class == class then + tinsert(classSpells, {name = name, id = spellInfo.id}) + end end end return classSpells @@ -82,4 +98,9 @@ local function getSpellNameToId(auraType) end end -LibClassAuras.GetSpellNameToId = getSpellNameToId \ No newline at end of file +LibClassAuras.GetSpellNameToId = getSpellNameToId + +local function getAltName(spellID) + return LibClassAuras.altNames[spellID] +end +LibClassAuras.GetAltName = getAltName \ No newline at end of file diff --git a/Modules/BuffsDebuffs.lua b/Modules/BuffsDebuffs.lua index 7940fd6..61eed84 100644 --- a/Modules/BuffsDebuffs.lua +++ b/Modules/BuffsDebuffs.lua @@ -138,7 +138,8 @@ function BuffsDebuffs:Test(unit) BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_DEBUFF) BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_BUFF) - + --BuffsDebuffs:AURA_GAIN(unit, AURA_TYPE_BUFF, 1243, select(1, GetSpellInfo(1243)), select(3, GetSpellInfo(1243)), 10, GetTime() + 10, 1, "physical") + --self:AURA_GAIN(unit, AURA_TYPE_DEBUFF, 31117, select(1, GetSpellInfo(31117)), select(3, GetSpellInfo(31117)), 10, GetTime() + 10, 1, "physical") local i = 1 for spellID, enabled in pairs(Gladdy.db.trackedDebuffs) do if i > 4 then @@ -197,13 +198,24 @@ function BuffsDebuffs:AURA_GAIN(unit, auraType, spellID, spellName, texture, dur return end local auraFrame = self.frames[unit] + spellName = LibClassAuras.GetAltName(spellID) or spellName local aura = Gladdy:GetImportantAuras()[spellName] and Gladdy.db.auraListDefault[tostring(Gladdy:GetImportantAuras()[spellName].spellID)].enabled if aura and Gladdy.db.buffsShowAuraDebuffs then aura = false end local auraNames = LibClassAuras.GetSpellNameToId(auraType) - local spellId = auraNames[spellName] and auraNames[spellName].id[1] - if not aura and spellID and spellId and expirationTime and (Gladdy.db.trackedBuffs[tostring(spellId)] or Gladdy.db.trackedDebuffs[tostring(spellId)]) then + local spellId + local isTracked = false + if auraNames[spellName] then + for _, spellInfo in ipairs(auraNames[spellName]) do + spellId = spellInfo.id[1] + if (Gladdy.db.trackedBuffs[tostring(spellId)] or Gladdy.db.trackedDebuffs[tostring(spellId)]) then + isTracked = true + break + end + end + end + if not aura and spellID and expirationTime and isTracked then local index if auraType == AURA_TYPE_DEBUFF then auraFrame.numDebuffs = auraFrame.numDebuffs + 1 -- 2.39.5 From df2721f1cf1e822fb75052da573d1234197e58cd Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 18 Sep 2021 15:00:00 +0200 Subject: [PATCH 003/227] cleanup --- Modules/ExportImport.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Modules/ExportImport.lua b/Modules/ExportImport.lua index 1bafaaa..a1c709e 100644 --- a/Modules/ExportImport.lua +++ b/Modules/ExportImport.lua @@ -14,12 +14,6 @@ local function table_copy(t, str) end for k,v in pairs(t) do if type(v) == "table" then - if k == "drCategories" then - for key,val in pairs(v) do - --Gladdy:Print("TableCopy", str .. "." .. key) - end - end - t2[k] = table_copy(v, str .. "." .. k); else @@ -94,7 +88,7 @@ end) import:AddChild(importClearButton) import.clearButton = importClearButton -local deletedOptions = { --TODO backward compatibility Imports on deleted options +local deletedOptions = { -- backwards compatibility growUp = true, freezetrap = true, repentance = true -- 2.39.5 From 548234aaaa078ac16eda86e0357e4b9892c7c689 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 18 Sep 2021 15:00:16 +0200 Subject: [PATCH 004/227] grounding totem effect fix --- Constants.lua | 2 +- Modules/Auras.lua | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Constants.lua b/Constants.lua index cbffad3..5595fe2 100644 --- a/Constants.lua +++ b/Constants.lua @@ -649,7 +649,7 @@ local importantAuras = { -- Grounding Totem Effect [GetSpellInfo(8178)] = { track = AURA_TYPE_BUFF, - duration = 4, + duration = 0, priority = 20, spellID = 8178 }, diff --git a/Modules/Auras.lua b/Modules/Auras.lua index abf93c8..b1f0900 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -106,8 +106,12 @@ function Auras:CreateFrame(unit) if (self.timeLeft <= 0) then Auras:AURA_FADE(self.unit, self.track) else + if self.spellID == 8178 then + self.text:SetText("") + else + Gladdy:FormatTimer(self.text, self.timeLeft, self.timeLeft < 10) + end self.timeLeft = self.timeLeft - elapsed - Gladdy:FormatTimer(self.text, self.timeLeft, self.timeLeft < 10) end else self:SetAlpha(0.01) @@ -359,7 +363,8 @@ function Auras:AURA_GAIN(unit, auraType, spellID, spellName, icon, duration, exp auraFrame.startTime = expirationTime - duration auraFrame.endTime = expirationTime auraFrame.name = spellName - auraFrame.timeLeft = expirationTime - GetTime() + auraFrame.spellID = spellID + auraFrame.timeLeft = spellID == 8178 and 45 or expirationTime - GetTime() auraFrame.priority = Gladdy.db.auraListDefault[tostring(self.auras[spellName].spellID)].priority auraFrame.icon:SetTexture(Gladdy:GetImportantAuras()[GetSpellInfo(self.auras[spellName].spellID)] and Gladdy:GetImportantAuras()[GetSpellInfo(self.auras[spellName].spellID)].texture or icon) auraFrame.track = auraType @@ -373,9 +378,11 @@ function Auras:AURA_GAIN(unit, auraType, spellID, spellName, icon, duration, exp else auraFrame.icon.overlay:SetVertexColor(Gladdy.db.frameBorderColor.r, Gladdy.db.frameBorderColor.g, Gladdy.db.frameBorderColor.b, Gladdy.db.frameBorderColor.a) end - if not Gladdy.db.auraDisableCircle then + if not Gladdy.db.auraDisableCircle and spellID ~= 8178 then auraFrame.cooldown:Show() auraFrame.cooldown:SetCooldown(auraFrame.startTime, duration) + else + auraFrame.cooldown:Hide() end end -- 2.39.5 From ff4799ceef3e8c6bc0246b1865ffa6ab1ec98c09 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 18 Sep 2021 15:00:34 +0200 Subject: [PATCH 005/227] add option cooldown number alpha --- Modules/Auras.lua | 16 ++++++++++++++++ Modules/BuffsDebuffs.lua | 28 ++++++++++++++++++++++------ Modules/Cooldowns.lua | 16 ++++++++++++++++ Modules/Diminishings.lua | 16 ++++++++++++++++ Modules/Racial.lua | 20 +++++++++++++++----- Modules/Trinket.lua | 20 +++++++++++++++----- 6 files changed, 100 insertions(+), 16 deletions(-) diff --git a/Modules/Auras.lua b/Modules/Auras.lua index b1f0900..63c2b4f 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -557,6 +557,22 @@ function Auras:GetOptions() order = 4, width = "full", }), + auraCooldownNumberAlpha = { + type = "range", + name = L["Cooldown number alpha"], + min = 0, + max = 1, + step = 0.1, + order = 5, + width = "full", + set = function(info, value) + Gladdy.db.auraFontColor.a = value + Gladdy:UpdateFrame() + end, + get = function(info) + return Gladdy.db.auraFontColor.a + end, + }, } }, font = { diff --git a/Modules/BuffsDebuffs.lua b/Modules/BuffsDebuffs.lua index 61eed84..0a4faeb 100644 --- a/Modules/BuffsDebuffs.lua +++ b/Modules/BuffsDebuffs.lua @@ -279,7 +279,7 @@ local function styleIcon(aura, auraType) aura.cooldown:SetFont(Gladdy:SMFetch("font", "buffsFont"), (Gladdy.db.buffsIconSize/2 - 1) * Gladdy.db.buffsFontScale, "OUTLINE") aura.cooldown:SetTextColor(Gladdy.db.buffsFontColor.r, Gladdy.db.buffsFontColor.g, Gladdy.db.buffsFontColor.b, Gladdy.db.buffsFontColor.a) aura.stacks:SetFont(Gladdy:SMFetch("font", "buffsFont"), (Gladdy.db.buffsIconSize/3 - 1) * Gladdy.db.buffsFontScale, "OUTLINE") - aura.stacks:SetTextColor(Gladdy.db.buffsFontColor.r, Gladdy.db.buffsFontColor.g, Gladdy.db.buffsFontColor.b, Gladdy.db.buffsFontColor.a) + aura.stacks:SetTextColor(Gladdy.db.buffsFontColor.r, Gladdy.db.buffsFontColor.g, Gladdy.db.buffsFontColor.b, 1) end function BuffsDebuffs:UpdateFrame(unit) @@ -486,15 +486,15 @@ local function iconTimer(auraFrame, elapsed) auraFrame.timeLeft = timeLeftMilliSec if Gladdy.db.buffsDynamicColor then if timeLeftSec >= 60 then - auraFrame.cooldown:SetTextColor(0.7, 1, 0) + auraFrame.cooldown:SetTextColor(0.7, 1, 0, Gladdy.db.buffsFontColor.a) elseif timeLeftSec < 60 and timeLeftSec >= 11 then - auraFrame.cooldown:SetTextColor(0.7, 1, 0) + auraFrame.cooldown:SetTextColor(0.7, 1, 0, Gladdy.db.buffsFontColor.a) elseif timeLeftSec <= 10 and timeLeftSec >= 5 then - auraFrame.cooldown:SetTextColor(1, 0.7, 0) + auraFrame.cooldown:SetTextColor(1, 0.7, 0, Gladdy.db.buffsFontColor.a) elseif timeLeftSec <= 4 and timeLeftSec >= 3 then - auraFrame.cooldown:SetTextColor(1, 0, 0) + auraFrame.cooldown:SetTextColor(1, 0, 0, Gladdy.db.buffsFontColor.a) elseif timeLeftMilliSec <= 3 and timeLeftMilliSec > 0 then - auraFrame.cooldown:SetTextColor(1, 0, 0) + auraFrame.cooldown:SetTextColor(1, 0, 0, Gladdy.db.buffsFontColor.a) end end if timeLeftMilliSec < 0 then @@ -911,6 +911,22 @@ function BuffsDebuffs:GetOptions() order = 10, width = "full", }), + buffsCooldownNumberAlpha = { + type = "range", + name = L["Cooldown number alpha"], + min = 0, + max = 1, + step = 0.1, + order = 11, + width = "full", + set = function(info, value) + Gladdy.db.buffsFontColor.a = value + Gladdy:UpdateFrame() + end, + get = function(info) + return Gladdy.db.buffsFontColor.a + end, + }, }, }, font = { diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 97c0a15..c2ed7b9 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -663,6 +663,22 @@ function Cooldowns:GetOptions() order = 9, width = "full", }), + cooldownCooldownNumberAlpha = { + type = "range", + name = L["Cooldown number alpha"], + min = 0, + max = 1, + step = 0.1, + order = 10, + width = "full", + set = function(info, value) + Gladdy.db.cooldownFontColor.a = value + Gladdy:UpdateFrame() + end, + get = function(info) + return Gladdy.db.cooldownFontColor.a + end, + }, }, }, font = { diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index 780c188..e999943 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -456,6 +456,22 @@ function Diminishings:GetOptions() order = 9, width = "full", }), + drCooldownNumberAlpha = { + type = "range", + name = L["Cooldown number alpha"], + min = 0, + max = 1, + step = 0.1, + order = 10, + width = "full", + set = function(info, value) + Gladdy.db.drFontColor.a = value + Gladdy:UpdateFrame() + end, + get = function(info) + return Gladdy.db.drFontColor.a + end, + }, }, }, font = { diff --git a/Modules/Racial.lua b/Modules/Racial.lua index 94fb049..aaf3731 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -19,6 +19,7 @@ local Racial = Gladdy:NewModule("Racial", nil, { racialBorderColor = { r = 0, g = 0, b = 0, a = 1 }, racialDisableCircle = false, racialCooldownAlpha = 1, + racialCooldownNumberAlpha = 1, }) local ANCHORS = { ["LEFT"] = "RIGHT", ["RIGHT"] = "LEFT", ["BOTTOM"] = "TOP", ["TOP"] = "BOTTOM"} @@ -43,19 +44,19 @@ local function iconTimer(self,elapsed) local timeLeft = ceil(self.timeLeft) if timeLeft >= 60 then - self.cooldownFont:SetTextColor(1, 1, 0) + self.cooldownFont:SetTextColor(1, 1, 0, Gladdy.db.racialCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), (self:GetWidth()/2 - 0.15* self:GetWidth()) * Gladdy.db.racialFontScale, "OUTLINE") elseif timeLeft < 60 and timeLeft >= 30 then - self.cooldownFont:SetTextColor(1, 1, 0) + self.cooldownFont:SetTextColor(1, 1, 0, Gladdy.db.racialCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE") elseif timeLeft < 30 and timeLeft >= 11 then - self.cooldownFont:SetTextColor(1, 0.7, 0) + self.cooldownFont:SetTextColor(1, 0.7, 0, Gladdy.db.racialCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE") elseif timeLeft < 10 and timeLeft >= 5 then - self.cooldownFont:SetTextColor(1, 0.7, 0) + self.cooldownFont:SetTextColor(1, 0.7, 0, Gladdy.db.racialCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE") elseif timeLeft < 5 and timeLeft > 0 then - self.cooldownFont:SetTextColor(1, 0, 0) + self.cooldownFont:SetTextColor(1, 0, 0, Gladdy.db.racialCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE") end Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 10, true) @@ -270,6 +271,15 @@ function Racial:GetOptions() order = 8, width = "full", }), + racialCooldownNumberAlpha = Gladdy:option({ + type = "range", + name = L["Cooldown number alpha"], + min = 0, + max = 1, + step = 0.1, + order = 9, + width = "full", + }), }, }, font = { diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index 3a71c6a..53126e4 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -17,6 +17,7 @@ local Trinket = Gladdy:NewModule("Trinket", nil, { trinketBorderColor = { r = 0, g = 0, b = 0, a = 1 }, trinketDisableCircle = false, trinketCooldownAlpha = 1, + trinketCooldownNumberAlpha = 1, }) LibStub("AceComm-3.0"):Embed(Trinket) @@ -39,19 +40,19 @@ local function iconTimer(self, elapsed) local timeLeft = ceil(self.timeLeft) if timeLeft >= 60 then - self.cooldownFont:SetTextColor(1, 1, 0) + self.cooldownFont:SetTextColor(1, 1, 0, Gladdy.db.trinketCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 0.15*self:GetWidth()) * Gladdy.db.trinketFontScale, "OUTLINE") elseif timeLeft < 60 and timeLeft >= 30 then - self.cooldownFont:SetTextColor(1, 1, 0) + self.cooldownFont:SetTextColor(1, 1, 0, Gladdy.db.trinketCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE") elseif timeLeft < 30 and timeLeft >= 11 then - self.cooldownFont:SetTextColor(1, 0.7, 0) + self.cooldownFont:SetTextColor(1, 0.7, 0, Gladdy.db.trinketCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE") elseif timeLeft <= 10 and timeLeft >= 5 then - self.cooldownFont:SetTextColor(1, 0.7, 0) + self.cooldownFont:SetTextColor(1, 0.7, 0, Gladdy.db.trinketCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE") elseif timeLeft < 5 and timeLeft > 0 then - self.cooldownFont:SetTextColor(1, 0, 0) + self.cooldownFont:SetTextColor(1, 0, 0, Gladdy.db.trinketCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE") end Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 10, true) @@ -276,6 +277,15 @@ function Trinket:GetOptions() order = 8, width = "full", }), + trinketCooldownNumberAlpha = Gladdy:option({ + type = "range", + name = L["Cooldown number alpha"], + min = 0, + max = 1, + step = 0.1, + order = 9, + width = "full", + }), }, }, font = { -- 2.39.5 From 4925195de63342d374c3a149f3cc6b5fdf2a407a Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 19 Sep 2021 12:42:35 +0200 Subject: [PATCH 006/227] update klimp profile --- ImportStrings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ImportStrings.lua b/ImportStrings.lua index 80e7914..b2c8dba 100644 --- a/ImportStrings.lua +++ b/ImportStrings.lua @@ -1,7 +1,7 @@ local Gladdy = LibStub("Gladdy") function Gladdy:GetKlimpProfile() - return "4XzTCTTCBJZK(HzVoUiaibbV0kjoX1M44FlNAMPQP0ekjAlUrh8ssTZ45I8SV9jEMurmX5IzmdjqJgnA0N(A7fQf3Vy(6SzhYwNK96dBpKHViEXnQfZxs))hP)Fg()lGFgV)XKxVjz1xV9WFNKnlo7(K)PyXSfZxfNxa)ZXOKhrjpIsEiLwdd6W21h(79xU9Pn84wN9M084LBtEDA2QTjlwwt2hBssVl8hMOfzP7)AsrpQ8usX7tI3wSbi17tsFCtXIBSW82)09hks2D724IKCIpUC7Fh)C(9XzpMuKSgNBw8Q04T3EiFX87U(DV)(gu72KSvj7lIFmbLaYI3tcCvqGZ33AcCEoxe8FlE4vbMH3a1Y3k(fj9YJp8q(m8)vk0Ex2H)(nPzjRkspSFX8p82RG16)ljlh(N)1U4)Ndz)1(J74tW2dD2NU)(p9rAVNLS7q2vh2dl8BoKLMF7T0M7p(eSqjfaJ775BurbbAyd488egp(yw8hsZlEtYdXh3wG7sByOh(ZK9OGFnYZpLLc0S45f347HcN4vFfwM3o7ZxDfUt1HATzAtrPnbbtBkg)qVOrNIkOAkvRHNXZnT1iiWmX9UrzTQPnfTXg5pTPyukv45S3BkHDNqCn8HsGVBIRIoqho19IVACbMYR3XOXZpy8JXbo3DrUX1gndES77M4MWhUonUOAWfr55p(ImW(2P06PXuHQjQ8c6HTMXYwSKU)nkNV9SUc2yxhzC2PXvbA)XNXWlInA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LLU1L)Be0wJXGEmA6uKogxR67Fb1eUR)9gvgGTa(2JPffPKJZLvDV7(gPL1AcABoPHDR7)7tEkB1awrRhlZRi3oD(1m97x43jW2UTuHQQ(RQgWtPgcwSpOz1lQCXI))Jf(1Ge" end function Gladdy:GetClassicProfile() -- 2.39.5 From 033aa260f44e0185945df27cf4f1fedca2b8ee81 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 19 Sep 2021 12:43:20 +0200 Subject: [PATCH 007/227] bump version --- Gladdy.lua | 2 +- Gladdy.toc | 2 +- README.md | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Gladdy.lua b/Gladdy.lua index 35a68b1..6923c67 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -26,7 +26,7 @@ local MAJOR, MINOR = "Gladdy", 4 local Gladdy = LibStub:NewLibrary(MAJOR, MINOR) local L Gladdy.version_major_num = 1 -Gladdy.version_minor_num = 0.21 +Gladdy.version_minor_num = 0.22 Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num Gladdy.version_releaseType = RELEASE_TYPES.release Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType diff --git a/Gladdy.toc b/Gladdy.toc index e011806..cfb91f4 100644 --- a/Gladdy.toc +++ b/Gladdy.toc @@ -1,6 +1,6 @@ ## Interface: 20502 ## Title: Gladdy - TBC -## Version: 1.21-Release +## Version: 1.22-Release ## Notes: The most powerful arena AddOn for WoW 2.5.1 ## Author: XiconQoo, DnB_Junkee, Knall ## X-Email: contact me on discord Knall#1751 diff --git a/README.md b/README.md index eaa9f30..7408ec7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Gladdy - TBC ### The most powerful arena addon for WoW TBC 2.5.1 -## [v1.21-Release Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.21-Release/Gladdy_TBC-Classic_v1.21-Release.zip) +## [v1.22-Release Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.22-Release/Gladdy_TBC-Classic_v1.22-Release.zip) ###### Please consider donating if you like my work @@ -62,6 +62,12 @@ The goal is to make Gladdy highly configurable in it's appearance. Everything ca ### Changes +### v1.22-Release +- fixed import for some localizations not working +- added cooldown number alpha configurations for Auras, BuffsDebuffs, Cooldowns, Diminishings, Racial & Trinket +- grounding totem effect fix +- fixed some buffs/debuffs not being present in BuffsDebuffs + ### v1.21-Release - fixed error when hiding blizzard frames ArenaEnemyFrames related to ElvUI - added Pummel cooldown -- 2.39.5 From bd454b5b466f1b20ef65b540a5a9b24bbfd0bac2 Mon Sep 17 00:00:00 2001 From: ManneN1 Date: Tue, 21 Sep 2021 22:22:52 +0200 Subject: [PATCH 008/227] Added translation support --- Modules/Diminishings.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index 4f2375d..41c58a6 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -573,18 +573,18 @@ function Diminishings:GetOptions() }, level = { type = "group", - name = "Level Text", + name = L["Level Text"], order = 5, args = { headerBorder = { type = "header", - name = "DR Level", + name = L["DR Level"], order = 30, }, drLevelTextEnabled = Gladdy:option({ type = "toggle", - name = "DR Level Text Enabled", - desc = "Shows the current DR Level in the bottom right corner of the DR icon.", + name = L["DR Level Text Enabled"], + desc = L["Shows the current DR Level on the DR icon."], order = 1, width = "full", }), -- 2.39.5 From 1010d59bd3c2ba600ae63936033cff419a3c0976 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 22 Sep 2021 17:12:10 +0200 Subject: [PATCH 009/227] pixel perfect option added --- Frame.lua | 1 + Gladdy.lua | 26 ++++++++++++++++++++++++++ Options.lua | 18 +++++++++++++----- 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/Frame.lua b/Frame.lua index 5ed139a..f1f5bc4 100644 --- a/Frame.lua +++ b/Frame.lua @@ -190,6 +190,7 @@ function Gladdy:UpdateFrame() end self.frame:SetScale(self.db.frameScale) + self:PixelPerfectScale(false) self.frame:SetWidth(width) self.frame:SetHeight(height) self.frame:ClearAllPoints() diff --git a/Gladdy.lua b/Gladdy.lua index 6923c67..428005a 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -5,6 +5,7 @@ local select = select local pairs = pairs local tinsert = table.insert local tsort = table.sort +local str_lower = string.lower local GetTime = GetTime local CreateFrame = CreateFrame local DEFAULT_CHAT_FRAME = DEFAULT_CHAT_FRAME @@ -66,10 +67,20 @@ end Gladdy.events = CreateFrame("Frame") Gladdy.events.registered = {} Gladdy.events:RegisterEvent("PLAYER_LOGIN") +Gladdy.events:RegisterEvent("CVAR_UPDATE") +hooksecurefunc("VideoOptionsFrameOkay_OnClick", function(self, button, down, apply) + if (self:GetName() == "VideoOptionsFrameApply") then + Gladdy:PixelPerfectScale(true) + end +end) Gladdy.events:SetScript("OnEvent", function(self, event, ...) if (event == "PLAYER_LOGIN") then Gladdy:OnInitialize() Gladdy:OnEnable() + elseif (event == "CVAR_UPDATE") then + if (str_lower(select(1, ...)) == "uiscale") then + Gladdy:PixelPerfectScale(true) + end else local func = self.registered[event] @@ -186,6 +197,21 @@ function Gladdy:DeleteUnknownOptions(tbl, refTbl, str) end end +function Gladdy:PixelPerfectScale(update) + local physicalWidth, physicalHeight = GetPhysicalScreenSize() + local perfectUIScale = 768/physicalHeight--768/select(2, strsplit("x",({ GetScreenResolutions()})[GetCurrentResolution()])) + if self.db and self.db.pixelPerfect and self.frame then + self.frame:SetIgnoreParentScale(true) + self.frame:SetScale(perfectUIScale) + --self.db.frameScale = perfectUIScale --(GetCVar("useUiScale") == "1" and 1 + perfectUIScale - GetCVar("UIScale") or perfectUIScale) + if update then + self:UpdateFrame() + end + elseif self.frame then + self.frame:SetIgnoreParentScale(false) + end +end + function Gladdy:OnInitialize() self.dbi = LibStub("AceDB-3.0"):New("GladdyXZ", self.defaults) self.dbi.RegisterCallback(self, "OnProfileChanged", "OnProfileChanged") diff --git a/Options.lua b/Options.lua index e0c7f37..4eec88a 100644 --- a/Options.lua +++ b/Options.lua @@ -50,6 +50,7 @@ Gladdy.defaults = { growUp = false, growDirection = "BOTTOM", frameScale = 1, + pixelPerfect = false, padding = 1, barWidth = 180, bottomMargin = 2, @@ -298,11 +299,18 @@ function Gladdy:SetupOptions() name = L["Frame General"], order = 3, }, + pixelPerfect = { + type = "toggle", + name = L["Pixel Perfect Scale"], + desc = L["Enables Pixel Perfect Scale - disables manual "].. L["Frame scale"], + order = 4, + }, frameScale = { type = "range", name = L["Frame scale"], desc = L["Scale of the frame"], - order = 4, + disabled = function() return Gladdy.db.pixelPerfect end, + order = 5, min = .1, max = 2, step = .01, @@ -311,7 +319,7 @@ function Gladdy:SetupOptions() type = "range", name = L["Frame padding"], desc = L["Padding of the frame"], - order = 5, + order = 6, min = 0, max = 20, step = 1, @@ -320,7 +328,7 @@ function Gladdy:SetupOptions() type = "range", name = L["Frame width"], desc = L["Width of the bars"], - order = 6, + order = 7, min = 10, max = 500, step = 5, @@ -329,7 +337,7 @@ function Gladdy:SetupOptions() type = "range", name = L["Margin"], desc = L["Margin between each button"], - order = 7, + order = 8, min = -200, max = 200, step = 1, @@ -338,7 +346,7 @@ function Gladdy:SetupOptions() type = "color", name = L["Background color"], desc = L["Background Color of the frame"], - order = 8, + order = 9, hasAlpha = true, get = getColorOpt, set = setColorOpt, -- 2.39.5 From 3f28947b05555066835ec49e5b8432c98deef259 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 24 Sep 2021 15:51:24 +0200 Subject: [PATCH 010/227] move modules with mouse --- Gladdy.lua | 51 +++++++++++++++++++++++++++++++++++++ Modules/BuffsDebuffs.lua | 9 +++++++ Modules/Castbar.lua | 5 ++++ Modules/CombatIndicator.lua | 4 +++ Modules/Cooldowns.lua | 4 +++ Modules/Diminishings.lua | 5 ++++ Modules/Pets.lua | 4 +++ 7 files changed, 82 insertions(+) diff --git a/Gladdy.lua b/Gladdy.lua index 428005a..7cdf5a0 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -6,6 +6,7 @@ local pairs = pairs local tinsert = table.insert local tsort = table.sort local str_lower = string.lower +local math_abs = math.abs local GetTime = GetTime local CreateFrame = CreateFrame local DEFAULT_CHAT_FRAME = DEFAULT_CHAT_FRAME @@ -172,6 +173,56 @@ function Gladdy:NewModule(name, priority, defaults) return module end +function Gladdy:CreateMover(frame, x, y, name, points) + if not frame.mover then + frame.mover = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate") + frame.mover:SetFrameStrata("TOOLTIP") + frame.mover:SetPoint(points[1], frame, points[2], 0, 0) + local backdrop = { + bgFile = "Interface/Tooltips/UI-Tooltip-Background", + edgeFile = "", + tile = true, tileSize = 16, edgeSize = 10, + insets = {left = 0, right = 0, top = 0, bottom = 0} + } + + frame.mover:SetBackdrop(backdrop) + frame.mover:SetBackdropColor(0,0,0,0.8) + frame.mover:SetHeight(15) + frame.mover:SetWidth(60) + frame.mover.text = frame.mover:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") + frame.mover.text:SetText(name) + frame.mover.text:SetPoint("CENTER") + + frame.mover:SetMovable(true) + frame.mover:EnableMouse(true) + + frame.mover:SetScript("OnMouseDown", function(self) + self.point = { frame:GetPoint() } + self.start = { frame:GetCenter() } + frame:StartMoving() + self:StartMoving() + end) + frame.mover:SetScript("OnMouseUp", function(self) + frame:StopMovingOrSizing() + self:StopMovingOrSizing() + self.stop = { frame:GetCenter() } + local diffX = math_abs(self.start[1] - self.stop[1]) + diffX = self.start[1] > self.stop[1] and -diffX or diffX + local diffY = math_abs(self.start[2] - self.stop[2]) + diffY = self.start[2] > self.stop[2] and -diffY or diffY + frame:ClearAllPoints() + frame:SetPoint(self.point[1], self.point[2], self.point[3], self.point[4] + diffX, self.point[5] + diffY) + Gladdy.db[x] = self.point[4] + diffX + Gladdy.db[y] = self.point[5] + diffY + Gladdy:UpdateFrame() + end) + else + frame.mover:ClearAllPoints() + frame.mover:SetPoint(points[1], frame, points[2], 0, 0) + end + +end + --------------------------- -- INIT diff --git a/Modules/BuffsDebuffs.lua b/Modules/BuffsDebuffs.lua index 0a4faeb..966e459 100644 --- a/Modules/BuffsDebuffs.lua +++ b/Modules/BuffsDebuffs.lua @@ -235,11 +235,13 @@ end function BuffsDebuffs:CreateFrame(unit) local verticalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding local debuffFrame = CreateFrame("Frame", "GladdyDebuffs" .. unit, Gladdy.buttons[unit]) + debuffFrame:SetMovable(true) debuffFrame:SetHeight(Gladdy.db.buffsIconSize) debuffFrame:SetWidth(1) debuffFrame:SetPoint("BOTTOMLEFT", Gladdy.buttons[unit].healthBar, "TOPLEFT", 0, verticalMargin) debuffFrame.unit = unit local buffFrame = CreateFrame("Frame", "GladdyBuffs" .. unit, Gladdy.buttons[unit]) + buffFrame:SetMovable(true) buffFrame:SetHeight(Gladdy.db.buffsIconSize) buffFrame:SetWidth(1) buffFrame:SetPoint("BOTTOMLEFT", Gladdy.buttons[unit].healthBar, "TOPLEFT", 0, verticalMargin) @@ -328,6 +330,9 @@ function BuffsDebuffs:UpdateFrame(unit) self.frames[unit].debuffFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset) end end + if (unit == "arena1") then + Gladdy:CreateMover(self.frames[unit].debuffFrame, "buffsXOffset", "buffsYOffset", L["Debuffs"], {"BOTTOMLEFT", "TOPLEFT"}) + end --BUFFS self.frames[unit].buffFrame:SetHeight(Gladdy.db.buffsBuffsIconSize) @@ -422,6 +427,10 @@ function BuffsDebuffs:UpdateFrame(unit) self.frames[unit].buffFrame:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset) end end + if (unit == "arena1") then + Gladdy:CreateMover(self.frames[unit].buffFrame, "buffsBuffsXOffset", "buffsBuffsYOffset", L["Buffs"], {"BOTTOMLEFT", "TOPLEFT"}) + end + for i=1, #self.frames[unit].auras[AURA_TYPE_BUFF] do styleIcon(self.frames[unit].auras[AURA_TYPE_BUFF][i], AURA_TYPE_BUFF) end diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 17d62e7..b0a07b3 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -59,6 +59,7 @@ end function Castbar:CreateFrame(unit) local castBar = CreateFrame("Frame", nil, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate") castBar:EnableMouse(false) + castBar:SetMovable(true) castBar.unit = unit castBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "castBarBorderStyle"), @@ -191,6 +192,10 @@ function Castbar:UpdateFrame(unit) castBar.icon.texture.overlay:SetTexture(Gladdy.db.castBarIconStyle) castBar.icon.texture.overlay:SetVertexColor(Gladdy.db.castBarIconColor.r, Gladdy.db.castBarIconColor.g, Gladdy.db.castBarIconColor.b, Gladdy.db.castBarIconColor.a) + + if (unit == "arena1") then + Gladdy:CreateMover(castBar, "castBarXOffset", "castBarYOffset", L["Cast Bar"], {"BOTTOMLEFT", "TOPLEFT"}) + end end --------------------------- diff --git a/Modules/CombatIndicator.lua b/Modules/CombatIndicator.lua index 54a8b76..572e0b1 100644 --- a/Modules/CombatIndicator.lua +++ b/Modules/CombatIndicator.lua @@ -38,6 +38,7 @@ function CombatIndicator:CreateFrame(unit) end local ciFrame = CreateFrame("Frame", "GladdyCombatindicator" .. unit, button) ciFrame:EnableMouse(false) + ciFrame:SetMovable(true) ciFrame:SetFrameStrata("HIGH") ciFrame:SetHeight(Gladdy.db.ciSize) ciFrame:SetWidth(Gladdy.db.ciSize * Gladdy.db.ciWidthFactor) @@ -77,6 +78,9 @@ function CombatIndicator:UpdateFrame(unit) else ciFrame:Show() end + if (unit == "arena1") then + Gladdy:CreateMover(ciFrame, "ciXOffset", "ciYOffset", L["Combat Indicator"], {"BOTTOMLEFT", "TOPLEFT"}) + end end function CombatIndicator:Test() diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index c2ed7b9..90bb6a4 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -94,6 +94,7 @@ function Cooldowns:CreateFrame(unit) -- Cooldown frame local spellCooldownFrame = CreateFrame("Frame", nil, button) spellCooldownFrame:EnableMouse(false) + spellCooldownFrame:SetMovable(true) for x = 1, 14 do local icon = CreateFrame("Frame", nil, spellCooldownFrame) icon:EnableMouse(false) @@ -166,6 +167,9 @@ function Cooldowns:UpdateFrame(unit) button.spellCooldownFrame:SetHeight(Gladdy.db.cooldownSize) button.spellCooldownFrame:SetWidth(1) button.spellCooldownFrame:Show() + if (unit == "arena1") then + Gladdy:CreateMover(button.spellCooldownFrame, "cooldownXOffset", "cooldownYOffset", L["Cooldown"], {"BOTTOMLEFT", "TOPLEFT"}) + end -- Update each cooldown icon local o = 1 for j = 1, 14 do diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index e999943..f11f872 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -67,6 +67,7 @@ end function Diminishings:CreateFrame(unit) local drFrame = CreateFrame("Frame", nil, Gladdy.buttons[unit]) drFrame:EnableMouse(false) + drFrame:SetMovable(true) for i = 1, 16 do local icon = CreateFrame("Frame", "GladdyDr" .. unit .. "Icon" .. i, drFrame) @@ -177,6 +178,10 @@ function Diminishings:UpdateFrame(unit) drFrame:SetWidth(Gladdy.db.drIconSize * 16) drFrame:SetHeight(Gladdy.db.drIconSize) + if (unit == "arena1") then + Gladdy:CreateMover(drFrame, "drXOffset", "drYOffset", L["Diminishings"], + Gladdy.db.drCooldownPos == "RIGHT" and {"BOTTOMLEFT", "TOPLEFT"} or {"BOTTOMRIGHT", "TOPRIGHT"}) + end for i = 1, 16 do local icon = drFrame["icon" .. i] diff --git a/Modules/Pets.lua b/Modules/Pets.lua index 994a8b5..780febf 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -134,6 +134,7 @@ function Pets:CreateFrame(unitId) return end local button = CreateFrame("Frame", "GladdyButtonFramePet" .. unit, Gladdy.frame) + button:SetMovable(true) --button:SetAlpha(0) button:SetPoint("LEFT", Gladdy.buttons[unitId].healthBar, "RIGHT", Gladdy.db.petXOffset, Gladdy.db.petYOffset) @@ -289,6 +290,9 @@ function Pets:UpdateFrame(unitId) end healthBar.nameText:SetTextColor(Gladdy.db.petHealthBarFontColor.r, Gladdy.db.petHealthBarFontColor.g, Gladdy.db.petHealthBarFontColor.b, Gladdy.db.petHealthBarFontColor.a) healthBar.healthText:SetTextColor(Gladdy.db.petHealthBarFontColor.r, Gladdy.db.petHealthBarFontColor.g, Gladdy.db.petHealthBarFontColor.b, Gladdy.db.petHealthBarFontColor.a) + if (unit == "arenapet1") then + Gladdy:CreateMover(self.frames[unit], "petXOffset", "petYOffset", L["Pets"], {"BOTTOMLEFT", "TOPLEFT"}) + end end function Pets:SetHealthText(healthBar, health, healthMax) -- 2.39.5 From fabd9ae0483f99a73d20da2e3b4345850867c439 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 24 Sep 2021 16:40:36 +0200 Subject: [PATCH 011/227] grouping of pets first step --- Modules/Pets.lua | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/Modules/Pets.lua b/Modules/Pets.lua index 780febf..4cb8196 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -23,6 +23,8 @@ local Pets = Gladdy:NewModule("Pets", nil, { petHealthPercentage = true, petXOffset = 1, petYOffset = -62, + petGroup = false, + petMargin = 1, }) function Pets:Initialize() @@ -251,6 +253,18 @@ function Pets:UpdateFrame(unitId) self.frames[unit]:SetWidth(Gladdy.db.petWidth) self.frames[unit]:SetHeight(Gladdy.db.petHeight) self.frames[unit]:SetPoint("LEFT", Gladdy.buttons[unitId].healthBar, "RIGHT", Gladdy.db.petXOffset, Gladdy.db.petYOffset) + if (Gladdy.db.petGroup) then + if (unit == "arenapet1") then + self.frames[unit]:SetPoint("LEFT", Gladdy.buttons[unitId].healthBar, "RIGHT", Gladdy.db.petXOffset, Gladdy.db.petYOffset) + else + local previousPet = "arenapet" .. string_gsub(unit, "arenapet", "") - 1 + self.frames[unit]:ClearAllPoints() + self.frames[unit]:SetPoint("TOPLEFT", self.frames[previousPet], "BOTTOMLEFT", 0, - Gladdy.db.petMargin) + end + else + self.frames[unit]:ClearAllPoints() + self.frames[unit]:SetPoint("LEFT", Gladdy.buttons[unitId].healthBar, "RIGHT", Gladdy.db.petXOffset, Gladdy.db.petYOffset) + end healthBar.portrait:SetHeight(Gladdy.db.petHeight) healthBar.portrait:SetWidth(Gladdy.db.petHeight) @@ -384,11 +398,28 @@ function Pets:GetOptions() step = 1, width = "full", }), + petGroup = option({ + type = "toggle", + name = L["Group Pets"], + order = 5, + }), + petMargin = option({ + type = "range", + name = L["Margin"], + desc = L["Height of the bar"], + order = 6, + disabled = function() + return not Gladdy.db.petGroup + end, + min = 0, + max = 50, + step = .1, + }), petHealthBarTexture = option({ type = "select", name = L["Bar texture"], desc = L["Texture of the bar"], - order = 5, + order = 7, dialogControl = "LSM30_Statusbar", values = AceGUIWidgetLSMlists.statusbar, }), @@ -396,14 +427,14 @@ function Pets:GetOptions() type = "color", name = L["Health color"], desc = L["Color of the status bar"], - order = 6, + order = 8, hasAlpha = true, }), petHealthBarBgColor = Gladdy:colorOption({ type = "color", name = L["Background color"], desc = L["Color of the status bar background"], - order = 7, + order = 9, hasAlpha = true, }), }, -- 2.39.5 From ebb56c41278f2eb1ee14fd4b8236ff658182458f Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 25 Sep 2021 14:03:57 +0200 Subject: [PATCH 012/227] testmode only movable frames --- Frame.lua | 2 ++ Gladdy.lua | 46 ++++++++++++++++++++++------------------ Modules/BuffsDebuffs.lua | 10 +++++++-- Modules/Castbar.lua | 2 +- Modules/Cooldowns.lua | 4 +++- Modules/Diminishings.lua | 6 +++++- Modules/Pets.lua | 2 +- 7 files changed, 45 insertions(+), 27 deletions(-) diff --git a/Frame.lua b/Frame.lua index f1f5bc4..128452d 100644 --- a/Frame.lua +++ b/Frame.lua @@ -305,6 +305,7 @@ end function Gladdy:ToggleFrame(i) self:Reset() if (self.frame and self.frame:IsShown() and i == self.curBracket) then + self.frame.testing = nil self:HideFrame() else self.curBracket = i @@ -312,6 +313,7 @@ function Gladdy:ToggleFrame(i) if (not self.frame) then self:CreateFrame() end + self.frame.testing = true for o = 1, self.curBracket do local unit = "arena" .. o diff --git a/Gladdy.lua b/Gladdy.lua index 7cdf5a0..4538015 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -8,10 +8,10 @@ local tsort = table.sort local str_lower = string.lower local math_abs = math.abs local GetTime = GetTime +local InCombatLockdown = InCombatLockdown local CreateFrame = CreateFrame local DEFAULT_CHAT_FRAME = DEFAULT_CHAT_FRAME local IsAddOnLoaded = IsAddOnLoaded -local IsInInstance = IsInInstance local GetBattlefieldStatus = GetBattlefieldStatus local IsActiveBattlefieldArena = IsActiveBattlefieldArena local RELEASE_TYPES = { alpha = "Alpha", beta = "Beta", release = "Release"} @@ -173,23 +173,28 @@ function Gladdy:NewModule(name, priority, defaults) return module end -function Gladdy:CreateMover(frame, x, y, name, points) +function Gladdy:CreateMover(frame, xConfig, yConfig, name, points, width, height, xOffset, yOffset) if not frame.mover then frame.mover = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate") - frame.mover:SetFrameStrata("TOOLTIP") - frame.mover:SetPoint(points[1], frame, points[2], 0, 0) + frame.mover:SetFrameStrata("DIALOG") + frame.mover:SetPoint(points[1], frame, points[2], xOffset or 0, yOffset or 0) + frame.mover:SetHeight(height or frame:GetHeight()) + frame.mover:SetWidth(width or frame:GetWidth()) + local backdrop = { bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "", tile = true, tileSize = 16, edgeSize = 10, insets = {left = 0, right = 0, top = 0, bottom = 0} } - frame.mover:SetBackdrop(backdrop) - frame.mover:SetBackdropColor(0,0,0,0.8) - frame.mover:SetHeight(15) - frame.mover:SetWidth(60) - frame.mover.text = frame.mover:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") + frame.mover:SetBackdropColor(0,1,0,0.5) + frame.mover.border = CreateFrame("Frame", nil, frame.mover, BackdropTemplateMixin and "BackdropTemplate") + frame.mover.border:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = 2 }) + frame.mover.border:SetAllPoints(frame.mover) + frame.mover.border:SetBackdropBorderColor(0,1,0,1) + + frame.mover.text = frame.mover.border:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") frame.mover.text:SetText(name) frame.mover.text:SetPoint("CENTER") @@ -212,15 +217,21 @@ function Gladdy:CreateMover(frame, x, y, name, points) diffY = self.start[2] > self.stop[2] and -diffY or diffY frame:ClearAllPoints() frame:SetPoint(self.point[1], self.point[2], self.point[3], self.point[4] + diffX, self.point[5] + diffY) - Gladdy.db[x] = self.point[4] + diffX - Gladdy.db[y] = self.point[5] + diffY + Gladdy.db[xConfig] = self.point[4] + diffX + Gladdy.db[yConfig] = self.point[5] + diffY Gladdy:UpdateFrame() end) else frame.mover:ClearAllPoints() - frame.mover:SetPoint(points[1], frame, points[2], 0, 0) + frame.mover:SetPoint(points[1], frame, points[2], xOffset or 0, yOffset or 0) + frame.mover:SetHeight(height or frame:GetHeight()) + frame.mover:SetWidth(width or frame:GetWidth()) + end + if self.frame and self.frame.testing then + frame.mover:Show() + else + frame.mover:Hide() end - end --------------------------- @@ -298,7 +309,6 @@ function Gladdy:OnInitialize() self.guids = {} self.curBracket = nil self.curUnit = 1 - self.lastInstance = nil self:SetupOptions() @@ -402,16 +412,10 @@ function Gladdy:PLAYER_ENTERING_WORLD() LibStub("AceConfigDialog-3.0"):Open("Gladdy", nil, LibStub("AceConfigDialog-3.0"):SelectGroup("Gladdy", "XiconProfiles")) self.showConfig = nil end - local instance = select(2, IsInInstance()) - if (instance ~= "arena" and self.frame and self.frame:IsVisible() and not self.frame.testing) then + if (self.frame and self.frame:IsVisible()) then self:Reset() self:HideFrame() end - if (instance == "arena") then - self:Reset() - self:HideFrame() - end - self.lastInstance = instance end function Gladdy:UPDATE_BATTLEFIELD_STATUS(_, index) diff --git a/Modules/BuffsDebuffs.lua b/Modules/BuffsDebuffs.lua index 966e459..0590c9c 100644 --- a/Modules/BuffsDebuffs.lua +++ b/Modules/BuffsDebuffs.lua @@ -331,7 +331,10 @@ function BuffsDebuffs:UpdateFrame(unit) end end if (unit == "arena1") then - Gladdy:CreateMover(self.frames[unit].debuffFrame, "buffsXOffset", "buffsYOffset", L["Debuffs"], {"BOTTOMLEFT", "TOPLEFT"}) + Gladdy:CreateMover(self.frames[unit].debuffFrame, "buffsXOffset", "buffsYOffset", L["Debuffs"], + Gladdy.db.buffsCooldownGrowDirection == "LEFT" and {"TOPRIGHT", "TOPRIGHT"} or {"TOPLEFT", "TOPLEFT"}, + Gladdy.db.buffsIconSize * Gladdy.db.buffsWidthFactor, + Gladdy.db.buffsIconSize, Gladdy.db.buffsCooldownGrowDirection == "LEFT"and -1 or 1, 0) end --BUFFS @@ -428,7 +431,10 @@ function BuffsDebuffs:UpdateFrame(unit) end end if (unit == "arena1") then - Gladdy:CreateMover(self.frames[unit].buffFrame, "buffsBuffsXOffset", "buffsBuffsYOffset", L["Buffs"], {"BOTTOMLEFT", "TOPLEFT"}) + Gladdy:CreateMover(self.frames[unit].buffFrame, "buffsBuffsXOffset", "buffsBuffsYOffset", L["Buffs"], + Gladdy.db.buffsBuffsCooldownGrowDirection == "LEFT" and {"TOPRIGHT", "TOPRIGHT"} or {"TOPLEFT", "TOPLEFT"}, + Gladdy.db.buffsBuffsIconSize * Gladdy.db.buffsBuffsWidthFactor, + Gladdy.db.buffsBuffsIconSize, Gladdy.db.buffsBuffsCooldownGrowDirection == "LEFT"and -1 or 1, 0) end for i=1, #self.frames[unit].auras[AURA_TYPE_BUFF] do diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index b0a07b3..4717563 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -194,7 +194,7 @@ function Castbar:UpdateFrame(unit) castBar.icon.texture.overlay:SetVertexColor(Gladdy.db.castBarIconColor.r, Gladdy.db.castBarIconColor.g, Gladdy.db.castBarIconColor.b, Gladdy.db.castBarIconColor.a) if (unit == "arena1") then - Gladdy:CreateMover(castBar, "castBarXOffset", "castBarYOffset", L["Cast Bar"], {"BOTTOMLEFT", "TOPLEFT"}) + Gladdy:CreateMover(castBar, "castBarXOffset", "castBarYOffset", L["Cast Bar"], {"TOPLEFT", "TOPLEFT"}, Gladdy.db.castBarWidth, Gladdy.db.castBarHeight, 0, 0) end end diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 90bb6a4..1ab006d 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -168,7 +168,9 @@ function Cooldowns:UpdateFrame(unit) button.spellCooldownFrame:SetWidth(1) button.spellCooldownFrame:Show() if (unit == "arena1") then - Gladdy:CreateMover(button.spellCooldownFrame, "cooldownXOffset", "cooldownYOffset", L["Cooldown"], {"BOTTOMLEFT", "TOPLEFT"}) + Gladdy:CreateMover(button.spellCooldownFrame, "cooldownXOffset", "cooldownYOffset", L["Cooldown"], + Gladdy.db.cooldownXPos == "RIGHT" and {"TOPRIGHT", "TOPRIGHT"} or {"TOPLEFT", "TOPLEFT"}, + Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor, Gladdy.db.cooldownSize) end -- Update each cooldown icon local o = 1 diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index f11f872..3d46253 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -180,7 +180,11 @@ function Diminishings:UpdateFrame(unit) drFrame:SetHeight(Gladdy.db.drIconSize) if (unit == "arena1") then Gladdy:CreateMover(drFrame, "drXOffset", "drYOffset", L["Diminishings"], - Gladdy.db.drCooldownPos == "RIGHT" and {"BOTTOMLEFT", "TOPLEFT"} or {"BOTTOMRIGHT", "TOPRIGHT"}) + Gladdy.db.drCooldownPos == "RIGHT" and {"TOPLEFT", "TOPLEFT"} or {"TOPRIGHT", "TOPRIGHT"}, --point + Gladdy.db.drIconSize * Gladdy.db.drWidthFactor, -- width + Gladdy.db.drIconSize, + 0, --xoffset + 0) --yoffset end for i = 1, 16 do diff --git a/Modules/Pets.lua b/Modules/Pets.lua index 4cb8196..9039ce8 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -305,7 +305,7 @@ function Pets:UpdateFrame(unitId) healthBar.nameText:SetTextColor(Gladdy.db.petHealthBarFontColor.r, Gladdy.db.petHealthBarFontColor.g, Gladdy.db.petHealthBarFontColor.b, Gladdy.db.petHealthBarFontColor.a) healthBar.healthText:SetTextColor(Gladdy.db.petHealthBarFontColor.r, Gladdy.db.petHealthBarFontColor.g, Gladdy.db.petHealthBarFontColor.b, Gladdy.db.petHealthBarFontColor.a) if (unit == "arenapet1") then - Gladdy:CreateMover(self.frames[unit], "petXOffset", "petYOffset", L["Pets"], {"BOTTOMLEFT", "TOPLEFT"}) + Gladdy:CreateMover(self.frames[unit], "petXOffset", "petYOffset", L["Pets"], {"TOPLEFT", "TOPLEFT"}) end end -- 2.39.5 From 09a47e81f1e65b3dda16e8f4051433ffc96f442c Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 26 Sep 2021 14:06:50 +0200 Subject: [PATCH 013/227] CI movable frames --- Gladdy.lua | 2 ++ Modules/CombatIndicator.lua | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Gladdy.lua b/Gladdy.lua index 4538015..2b0b28c 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -17,6 +17,7 @@ local IsActiveBattlefieldArena = IsActiveBattlefieldArena local RELEASE_TYPES = { alpha = "Alpha", beta = "Beta", release = "Release"} local PREFIX = "TBC-Classic_v" local VERSION_REGEX = PREFIX .. "(%d+%.%d+)%-(%a)" +local LibStub = LibStub --------------------------- @@ -219,6 +220,7 @@ function Gladdy:CreateMover(frame, xConfig, yConfig, name, points, width, height frame:SetPoint(self.point[1], self.point[2], self.point[3], self.point[4] + diffX, self.point[5] + diffY) Gladdy.db[xConfig] = self.point[4] + diffX Gladdy.db[yConfig] = self.point[5] + diffY + LibStub("AceConfigRegistry-3.0"):NotifyChange("Gladdy") Gladdy:UpdateFrame() end) else diff --git a/Modules/CombatIndicator.lua b/Modules/CombatIndicator.lua index 572e0b1..91447ad 100644 --- a/Modules/CombatIndicator.lua +++ b/Modules/CombatIndicator.lua @@ -79,7 +79,7 @@ function CombatIndicator:UpdateFrame(unit) ciFrame:Show() end if (unit == "arena1") then - Gladdy:CreateMover(ciFrame, "ciXOffset", "ciYOffset", L["Combat Indicator"], {"BOTTOMLEFT", "TOPLEFT"}) + Gladdy:CreateMover(ciFrame, "ciXOffset", "ciYOffset", L["Combat Indicator"], {"TOPLEFT", "TOPLEFT"}) end end -- 2.39.5 From 69c1eca49b9e3a5efb89c0a5682a5d5e412baf29 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Mon, 27 Sep 2021 13:38:40 +0200 Subject: [PATCH 014/227] add contributors --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 7408ec7..b427e3d 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,15 @@ The goal is to make Gladdy highly configurable in it's appearance. Everything ca +## Contributors + +- [ManneN1](https://github.com/ManneN1) +- [AlexFolland](https://github.com/AlexFolland) +- [dfherr](https://github.com/dfherr) +- [miraage](https://github.com/miraage) + +Thank you! + ## Special Thanks - **miraage** - the origininal author of Gladdy! Your work set the foundation for this edit. Thanks! -- 2.39.5 From 41f74f589603c84c93bcf4038eae203905907b2c Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Mon, 27 Sep 2021 13:40:02 +0200 Subject: [PATCH 015/227] DR Level Icon Text by ManneN1 --- Modules/Diminishings.lua | 71 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index 3d46253..2a2c1d2 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -44,6 +44,9 @@ local Diminishings = Gladdy:NewModule("Diminishings", nil, { drHalfColor = {r = 1, g = 1, b = 0, a = 1 }, drQuarterColor = {r = 1, g = 0.7, b = 0, a = 1 }, drNullColor = {r = 1, g = 0, b = 0, a = 1 }, + drLevelTextEnabled = false, + drLevelTextFont = "DorisPP", + drLevelTextFontScale = 1, drWidthFactor = 1, drCategories = defaultCategories(), drDuration = 18 @@ -59,6 +62,16 @@ local function getDiminishColor(dr) end end +local function getDiminishText(dr) + if dr == 0.5 then + return "½" + elseif dr == 0.25 then + return "¼" + else + return "ø" + end +end + function Diminishings:Initialize() self.frames = {} self:RegisterMessage("UNIT_DEATH", "ResetUnit", "AURA_FADE", "UNIT_DESTROYED") @@ -133,6 +146,15 @@ function Diminishings:CreateFrame(unit) icon.timeText:SetJustifyH("CENTER") icon.timeText:SetPoint("CENTER", icon, "CENTER", 0, 1) + icon.drLevelText = icon.cooldownFrame:CreateFontString(nil, "OVERLAY") + icon.drLevelText:SetDrawLayer("OVERLAY") + icon.drLevelText:SetFont(Gladdy:SMFetch("font", "drLevelTextFont"), 10, "OUTLINE") + icon.drLevelText:SetTextColor(getDiminishColor(1)) + icon.drLevelText:SetShadowOffset(1, -1) + icon.drLevelText:SetShadowColor(0, 0, 0, 1) + icon.drLevelText:SetJustifyH("CENTER") + icon.drLevelText:SetPoint("BOTTOM", icon, "BOTTOM", 0, 0) + icon.diminishing = 1 drFrame["icon" .. i] = icon @@ -198,6 +220,9 @@ function Diminishings:UpdateFrame(unit) icon.timeText:SetFont(Gladdy:SMFetch("font", "drFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drFontScale, "OUTLINE") icon.timeText:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a) + icon.drLevelText:SetFont(Gladdy:SMFetch("font", "drLevelTextFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drLevelTextFontScale, "OUTLINE") + icon.drLevelText:SetTextColor(getDiminishColor(icon.diminishing)) + icon.cooldown:SetWidth(icon:GetWidth() - icon:GetWidth()/16) icon.cooldown:SetHeight(icon:GetHeight() - icon:GetHeight()/16) icon.cooldown:ClearAllPoints() @@ -214,6 +239,13 @@ function Diminishings:UpdateFrame(unit) icon.border:SetVertexColor(Gladdy.db.drBorderColor.r, Gladdy.db.drBorderColor.g, Gladdy.db.drBorderColor.b, Gladdy.db.drBorderColor.a) end + if Gladdy.db.drLevelTextEnabled then + icon.drLevelText:Show() + icon.drLevelText:SetText(getDiminishText(icon.diminishing)) + else + icon.drLevelText:Hide() + end + icon:ClearAllPoints() if (Gladdy.db.drCooldownPos == "LEFT") then if (i == 1) then @@ -565,10 +597,47 @@ function Diminishings:GetOptions() }), }, }, + level = { + type = "group", + name = L["Level Text"], + order = 5, + args = { + headerBorder = { + type = "header", + name = L["DR Level"], + order = 1, + }, + drLevelTextEnabled = Gladdy:option({ + type = "toggle", + name = L["DR Level Text Enabled"], + desc = L["Shows the current DR Level on the DR icon."], + order = 2, + width = "full", + }), + drLevelTextFont = Gladdy:option({ + type = "select", + name = L["Font"], + desc = L["Font of the cooldown"], + order = 3, + dialogControl = "LSM30_Font", + values = AceGUIWidgetLSMlists.font, + }), + drLevelTextFontScale = Gladdy:option({ + type = "range", + name = L["Font scale"], + desc = L["Scale of the text"], + order = 4, + min = 0.1, + max = 2, + step = 0.1, + width = "full", + }), + }, + }, border = { type = "group", name = L["Border"], - order = 5, + order = 6, args = { headerBorder = { type = "header", -- 2.39.5 From 91c25edcfee12bf5595a9f7b12d2a83b262fae2c Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Mon, 10 Jan 2022 23:59:08 +0100 Subject: [PATCH 016/227] zhCN Locale --- Lang.lua | 428 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 428 insertions(+) diff --git a/Lang.lua b/Lang.lua index ce0ec8d..740b673 100644 --- a/Lang.lua +++ b/Lang.lua @@ -985,6 +985,434 @@ elseif GetLocale() == "zhTW" then L["Background Color of the frame"] = "框架的背景顏色" L["Gladdy"] = "Gladdy目標框架" --Line 210, 709, 727 +elseif GetLocale() == "zhCN" then + -- Announcements.lua + L["Announcements"] = "通知" + L["RESURRECTING: %s (%s)"] = "复活: %s (%s) " + L["SPEC DETECTED: %s - %s (%s)"] = "敌方天赋: %s - %s (%s)" + L["LOW HEALTH: %s (%s)"] = "低生命值: %s (%s)" + L["TRINKET USED: %s (%s)"] = "饰品已使用: %s (%s)" + L["TRINKET READY: %s (%s)"] = "饰品就绪: %s (%s)" + L["DRINKING: %s (%s)"] = "正在喝水: %s (%s)" + L["Self"] = "玩家" + L["Party"] = "队伍" + L["Raid Warning"] = "团队警告" + L["Blizzard's Floating Combat Text"] = "Blizzard 战斗浮动文字" + L["Trinket used"] = "饰品已使用" + L["Announce when an enemy's trinket is used"] = "当敌方使用饰品时发出通知" + L["Trinket ready"] = "饰品就緒" + L["Announce when an enemy's trinket is ready again"] = "当敌方饰品就绪时发出通报" + L["Drinking"] = "正在喝水" + L["Announces when enemies sit down to drink"] = "当敌方喝水时发出通报" + L["Resurrection"] = "复活" + L["Announces when an enemy tries to resurrect a teammate"] = "当敌方尝试复活队友时发出通报" + L["New enemies"] = "新的敌人" + L["Announces when new enemies are discovered"] = "当发现新的敌人时发出通报" + L["Spec Detection"] = "天赋侦测" + L["Announces when the spec of an enemy was detected"] = "当侦测到敌方天赋时发出通报" + L["Low health"] = "低生命值" + L["Announces when an enemy drops below a certain health threshold"] = "当敌方生命值低于一定条件时发出通报" + L["Low health threshold"] = "低生命值门槛" + L["Choose how low an enemy must be before low health is announced"] = "设定低生命值通报门槛" + L["Destination"] = "发送通报至" + L["Choose how your announcements are displayed"] = "选择通报发送至哪个频道" + + -- ArenaCountDown.lua + L["Arena Countdown"] = "竞技场计时" + L["Turns countdown before the start of an arena match on/off."] = "在竞技场开始前倒数剩余秒数" + L["Size"] = "大小" + + -- Auras.lua + L["Auras"] = "光环" + L["Frame"] = "框架" + L["Cooldown"] = "冷却时间" + L["No Cooldown Circle"] = "取消图示冷却倒数阴影" + L["Cooldown circle alpha"] = "冷却倒数阴影alpha值" + L["Font"] = "字体" + L["Font of the cooldown"] = "設定冷卻時間字型" + L["Font scale"] = "字体大小" + L["Scale of the text"] = "设定字体大小" + L["Font color"] = "字体颜色" + L["Color of the text"] = "设定字体颜色" + L["Border"] = "边框" + L["Border style"] = "边框样式" + L["Buff color"] = "增益顏色" + L["Debuff color"] = "减益顏色" + L["Check All"] = "全选" + L["Uncheck All"] = "取消全选" + L["Enabled"] = "启用" + L["Priority"] = "优先" + L["Interrupt Spells School Colors"] = "打断法术分类颜色" + L["Enable Interrupt Spell School Colors"] = "启用" + L["Will use Debuff Color if disabled"] = "若未启用则使用一般减益颜色" + L["Buffs"] = "增益" --Line 573 + L["Debuffs"] = "減益" --Line 566 + L["Interrupts"] = "打断" --Line 580 + + -- BuffsDebuffs.lua + L["Buffs and Debuffs"] = "增益与减益" + L["Enabled Buffs and Debuffs module"] = "启用增益与减益模块" + L["Show CC"] = "显示控场" + L["Shows all debuffs, which are displayed on the ClassIcon as well"] = "显示所有减益效果,这些减益效果也显示在职业图标上" + L["Buffs"] = "增益" + L["Size & Padding"] = "大小与內距" + L["Icon Size"] = "图标大小" + L["Size of the DR Icons"] = "递减图标大小" + L["Icon Width Factor"] = "图标宽度比例" + L["Stretches the icon"] = "图标宽度" + L["Icon Padding"] = "图标內距" + L["Space between Icons"] = "图标间距" + L["Position"] = "位置" + L["Aura Position"] = "光环位置" + L["Position of the aura icons"] = "光环图标位置" + L["Top"] = "顶部" + L["Bottom"] = "底部" + L["Left"] = "左" + L["Right"] = "右" + --L["Grow Direction"] = "" + L["Grow Direction of the aura icons"] = "光环图标的延伸方向" + L["Horizontal offset"] = "水平偏移" + L["Vertical offset"] = "垂直偏移" + L["Alpha"] = "Alpha值" + L["Debuffs"] = "减益" + L["Dynamic Timer Color"] = "动态计时条颜色" + L["Show dynamic color on cooldown numbers"] = "冷却时间数字以动态颜色显示" + L["Color of the cooldown timer and stacks"] = "Farbe der Abklingzeit und Stapel" + L["Spell School Colors"] = "法术种类颜色" + L["Spell School Colors Enabled"] = "启用" + L["Show border colors by spell school"] = "根据不同法术显示不同边框颜色" + L["Curse"] = "诅咒" + L["Color of the border"] = "边框颜色" + L["Magic"] = "魔法" + L["Poison"] = "中毒" + L["Physical"] = "物理" + L["Immune"] = "免疫" + L["Disease"] = "疾病" + L["Aura"] = "光环" + L["Form"] = "形态" + L["Font"] = "字体" --Line 906 + L["Border"] = "边框" --Line 949 + L["Debuff Lists"] = "减益列表" --Line 1036 + L["Buff Lists"] = "增益列表" --Line 1051 + + -- Castbar.lua + L["Cast Bar"] = "施法条" + L["Bar"] = "施法条" + L["Bar Size"] = "施法条大小" + L["Bar height"] = "高度" + L["Height of the bar"] = "计量条高度" + L["Bar width"] = "宽度" + L["Width of the bars"] = "计量条宽度" + L["Texture"] = "材质" + L["Bar texture"] = "施法条材质" + L["Texture of the bar"] = "计量条材质" + L["Bar color"] = "施法条颜色" + L["Color of the cast bar"] = "计量条颜色" + L["Background color"] = "背景颜色" + L["Color of the cast bar background"] = "施法条背景顏色" + L["Border size"] = "边框大小" + L["Status Bar border"] = "状态条边框" + L["Status Bar border color"] = "状态条边框颜色" + L["Icon"] = "图标" + L["Icon size"] = "图标大小" + L["Icon border"] = "图标边框" + L["Icon border color"] = "图标边框颜色" + L["If test is running, type \"/gladdy test\" again"] = "如果测试已经开始,调整此选项后请输入/gladdy test以重新开始测试" + L["Spark"] = "尾部发亮" + L["Spark enabled"] = "启用" + L["Spark color"] = "颜色" + L["Color of the cast bar spark"] = "计时条进度的尾部颜色" + L["Font of the castbar"] = "施法条字体" + L["Font size"] = "字体大小" + L["Size of the text"] = "施法条字体大小" + L["Format"] = "格式" + L["Timer Format"] = "时间格式" + L["Remaining"] = "剩余时间" + L["Total"] = "总时间" + L["Both"] = "两者" + L["Castbar position"] = "施法条位置" + L["Icon position"] = "图标位置" + L["Offsets"] = "偏移" + + -- Classicon.lua + L["Class Icon"] = "职业图标" + L["Balance"] = "平衡" + L["Feral"] = "野性" + L["Restoration"] = "恢复" + L["Beast Mastery"] = "兽王" + L["Marksmanship"] = "射击" + L["Survival"] = "生存" + L["Arcane"] = "奥术" + L["Fire"] = "火焰" + L["Frost"] = "冰霜" + L["Holy"] = "神圣" + L["Protection"] = "防护" + L["Retribution"] = "惩戒" + L["Discipline"] = "戒律" + L["Shadow"] = "暗影" + L["Assassination"] = "刺杀" + L["Combat"] = "战斗" + L["Subtlety"] = "敏锐" + L["Elemental"] = "元素" + L["Enhancement"] = "增强" + L["Affliction"] = "痛苦" + L["Demonology"] = "恶魔" + L["Destruction"] = "毁灭" + L["Arms"] = "武器" + L["Fury"] = "狂怒" + L["Show Spec Icon"] = "显示天赋图标" + L["Shows Spec Icon once spec is detected"] = "若侦测到天赋则显示天赋图标" + L["Icon width factor"] = "图标宽度比例" + L["This changes positions with trinket"] = "调整职业图标位置" + L["Border color"] = "边框颜色" + + --CombatIndicator.lua + L["Combat Indicator"] = "战斗指示器" + L["Enable Combat Indicator icon"] = "显示是否进入战斗" + L["Anchor"] = "锚点" + L["This changes the anchor of the ci icon"] = "调整战斗指示器显示锚点" + L["This changes position relative to its anchor of the ci icon"] = "调整战斗指示器位置" + + -- Constants.lua + L["Physical"] = "物理" --Line 749 + L["Holy"] = "神圣" --Line 750 + L["Fire"] = "火焰" --Line 751 + L["Nature"] = "自然" --Line 752 + L["Frost"] = "冰霜" --Line 753 + L["Shadow"] = "暗影" --Line 754 + L["Arcane"] = "奥术" --Line 755 + L["Unknown"] = "未知" --Line 756 + + -- Cooldowns.lua + L["Cooldowns"] = "技能冷却监控" + L["Enabled cooldown module"] = "启用冷却时间监控模块" + L["Cooldown size"] = "大小" + L["Size of each cd icon"] = "冷却时间图标" + L["Icon Width Factor"] = "宽度" + L["Max Icons per row"] = "每行图标数量" + L["Scale of the font"] = "字体大小" + L["Anchor of the cooldown icons"] = "冷却图标锚点" + L["Grow Direction of the cooldown icons"] = "冷却图标延伸方向" + L["Offset"] = "偏移" + L["BloodElf"] = "血精灵" + L["NightElf"] = "暗夜精灵" + L["Scourge"] = "亡灵" + + -- Diminishings.lua + L["Diminishings"] = "控场递减" + L["Enabled DR module"] = "启用递减模块" + L["DR Cooldown position"] = "递减冷却时间位置" + L["Position of the cooldown icons"] = "递减冷却时间图标位置" + L["DR Border Colors"] = "DR边框颜色" + L["Dr Border Colors Enabled"] = "启用" + L["Colors borders of DRs in respective DR-color below"] = "边框颜色依递减设定为以下颜色" + L["Half"] = "二分之一" + L["Quarter"] = "四分之一" + L["Categories"] = "法术列表" + L["Force Icon"] = "使用自定义图标" + L["Icon of the DR"] = "选择此图标取代原始技能图标" + + -- ExportImport.lua + L["Export Import"] = "导出/导入" + L["Profile Export Import"] = "设置导出/导入" + L["Export"] = "导出" --Line 138 + L["Export your current profile to share with others or your various accounts."] = "导出您目前的设置" --Line 139 + L["Import"] = "导入" --Line 162 + L["This will overwrite your current profile!"] = "这将会覆盖您目前的设置" --Line 163 + + -- Healthbar.lua + L["Health Bar"] = "血量条" + L["DEAD"] = "死亡" + L["LEAVE"] = "暂离" + L["General"] = "一般" + L["Color of the status bar background"] = "状态条背景颜色" + L["Font of the bar"] = "字体" + L["Name font size"] = "名称字体大小" + L["Size of the name text"] = "设定名称字体大小" + L["Health font size"] = "生命值字体大小" + L["Size of the health text"] = "设定生命值字体大小" + L["Size of the border"] = "边框大小" + L["Health Bar Text"] = "血量条文字" + L["Show name text"] = "显示名字" + L["Show the units name"] = "显示单位名称" + L["Show ArenaX"] = "显示编号" + L["Show 1-5 as name instead"] = "使用编号1-5代替角色名字" + L["Show the actual health"] = "显示目前生命值" + L["Show the actual health on the health bar"] = "在血量条上显示目前生命值" + L["Show max health"] = "显示最大生命值" + L["Show max health on the health bar"] = "在血量条上显示最大生命值" + L["Show health percentage"] = "显示百分比" + L["Show health percentage on the health bar"] = "在血量条上显示生命值百分比" + + -- Highlight.lua + L["Highlight"] = "高亮提示" + L["Show Inside"] = "显示在框架內" + L["Show Highlight border inside of frame"] = "將高亮边框显示于框架內侧" + L["Colors"] = "边框颜色" + L["Target border color"] = "目标" + L["Color of the selected targets border"] = "目标的边框顏色" + L["Focus border color"] = "焦点" + L["Color of the focus border"] = "焦点目标边框顏色" + L["Highlight target"] = "高亮目标" + L["Toggle if the selected target should be highlighted"] = "是否高亮当前目标" + L["Show border around target"] = "显示目标边框" + L["Toggle if a border should be shown around the selected target"] = "是否显示当前目标的边框" + L["Show border around focus"] = "显示焦点边框" + L["Toggle of a border should be shown around the current focus"] = "是否显示当前焦点目标的边框" + + -- Pets.lua + L["Pets"] = "宠物" + L["Enables Pets module"] = "启用宠物模块" + L["Width of the bar"] = "宠物条宽度" + L["Health color"] = "生命值顏色" + L["Color of the status bar"] = "状态条顏色" + L["Portrait"] = "头像" + L["Health Values"] = "生命值" + + -- Powerbar.lua + L["Power Bar"] = "法力/能量条" + L["Power Bar Text"] = "法力/能量条文字" + L["Power Texts"] = "法力/能量条文字" + L["Show race"] = "显示种族" + L["Show spec"] = "显示天赋" + L["Show the actual power"] = "显示目前法力/能量" + L["Show the actual power on the power bar"] = "在计量条中显示目前法力/能量值" + L["Show max power"] = "显示最大法力/能量值" + L["Show max power on the power bar"] = "在计量条中显示最大法力/能量值" + L["Show power percentage"] = "显示法力/能量百分比" + L["Show power percentage on the power bar"] = "在计量条中显示目前法力/能量百分比" + + -- Racial.lua + L["Racial"] = "种族" + L["Enable racial icon"] = "启用种族图标" + L["This changes the anchor of the racial icon"] = "调整种族图标锚点" + L["This changes position relative to its anchor of the racial icon"] = "调整种族图标位置" + + -- TotemPlates.lua + L["Totem Plates"] = "图腾栏" + L["Customize Totems"] = "自定义图腾" + L["Custom totem name"] = "自定义图腾名字" + L["Totem General"] = "图腾通用设置" + L["Turns totem icons instead of nameplates on or off. (Requires reload)"] = "是否显示图腾名字(需重新加载)" + L["Show friendly"] = "显示右方图腾" + L["Show enemy"] = "显示敌方图腾" + L["Totem size"] = "图腾大小" + L["Size of totem icons"] = "图腾图标大小" + L["Font of the custom totem name"] = "自定义图腾字体" + L["Apply alpha when no target"] = "图腾非目标时使用alpha值" + L["Always applies alpha, even when you don't have a target. Else it is 1."] = "若图腾未被选为目标,其图标使用alpha值設定" + L["Apply alpha when targeted"] = "图腾为目标时使用alpha值" + L["Always applies alpha, even when you target the totem. Else it is 1."] = "图腾被选为目标时,其图标使用alpha值設定" + L["All totem border alphas (configurable per totem)"] = "图腾 Alpha值 " + L["Totem icon border style"] = "图腾边框样式" + L["All totem border color"] = "图腾边框顏色" + + -- Trinket.lua + L["Trinket"] = "饰品" + L["Enable trinket icon"] = "启用饰品图标" + L["This changes positions of the trinket"] = "调整饰品图标位置" + + -- XiconProfiles.lua + L["Profile"] = "样式" + L["XiconProfiles"] = "框架外观" --Line 4 + L[" No Pet"] = "(无宠物)" --Line 109, 119 + + -- Frame.lua + L["Gladdy - drag to move"] = "Gladdy - 拖拽移动" + + -- Gladdy.lua + L["Welcome to Gladdy!"] = "欢迎使用 Gladdy!" + L["First run has been detected, displaying test frame."] = "第一次使用时,显示此测试框架。" + L["Valid slash commands are:"] = "可用的指令为:" + L["If this is not your first run please lock or move the frame to prevent this from happening."] = "若非第一次使用,请移动或锁定框架以免此提示再次出现。" + + -- Clicks.lua + L["Action #%d"] = "动作 #%d" + L["Target"] = "目标" --Line 15 + L["Focus"] = "焦点" --Line 16 + L["Clicks"] = "点击动作" + L["Left button"] = "左键" + L["Right button"] = "右键" + L["Middle button"] = "中键" + L["Button 4"] = "鼠标按键4" + L["Button 5"] = "鼠标按键5" + L["Select what action this mouse button does"] = "设置输入按键后欲执行的动作" + L["Modifier"] = "修饰键" + L["Select which modifier to use"] = "设置欲使用的修饰键" + L["Button"] = "按键" + L["Select which mouse button to use"] = "设置欲使用的鼠标按键" + L["Name"] = "名称" + L["Select the name of the click option"] = "设置动作名称" + L["Action"] = "动作" + L["Cast Spell / Macro"] = "施放法术/宏" + + --RangeCheck.lua + L["Range Check"] = "距离检测" + L["Spells"] = "法术" + L["Fade"] = "变暗" + L["Out of Range Darkening Level"] = "超出距离时变暗程度" + L["Higher is darker"] = "数值越高越暗" + L["yds"] = " 码" --Line 366, 388 + L["Changing the spellID only applies to your player class!\n\nExample: If you are a Paladin and wish to change your range check spell to Repentance, edit the Paladin spellID to 20066."] = "对应您的职业修改欲使用监控距离的技能。\n\n例:若您为圣骑士且想以忏悔技能用于距离监控,请将圣骑士的法术ID改为20066。" --Line 352 + + --ShadowsightTimer.lua + L["Shadowsight Timer"] = "暗影视界计时" + L["Locked"] = "锁定" + L["Announce"] = "通报" + L["Scale"] = "大小" + L["Shadowsight up in %ds"] = "暗影视界於%d秒后就绪" + L["Shadowsight up!"] = "暗影视界已就绪" + + -- Options.lua + L["settings"] = "设置" + L["Reset module"] = "重置模块" + L["Reset module to defaults"] = "将模块重置为初始值" + L["No settings"] = "无设置" + L["Module has no settings"] = "模块没有设置" + L["General settings"] = "通用设置" + L["Lock frame"] = "锁定框架" + L["Toggle if frame can be moved"] = "调整框架是否可移动" + L["Grow frame upwards"] = "框架向上延伸" + L["If enabled the frame will grow upwards instead of downwards"] = "开启次选项时框架向上延伸" + L["Down"] = "下" + L["Up"] = "上" + L["Frame General"] = "框架" + L["Frame scale"] = "框架大小" + L["Scale of the frame"] = "框架的尺寸" + L["Frame padding"] = "框架內距" + L["Padding of the frame"] = "框架的內距" + L["Frame width"] = "框架宽度" + L["Margin"] = "框架间距" + L["Margin between each button"] = "框架的间距" + L["Cooldown General"] = "冷却" + L["Font General"] = "字体" + L["General Font"] = "通用字体" + L["Font color text"] = "文字顏色" + L["Font color timer"] = "计时器文字顏色" + L["Color of the timers"] = "计时器顏色" + L["Icons General"] = "图标" + L["Icon border style"] = "图标边框样式" + L["This changes the border style of all icons"] = "调整所有图标的边框样式" + L["This changes the border color of all icons"] = "调整所有图标的边框顏色" + L["Statusbar General"] = "状态条" + L["Statusbar texture"] = "状态条材质" + L["This changes the texture of all statusbar frames"] = "调整所有状态条的材质" + L["Statusbar border style"] = "状态条边框样式" + L["This changes the border style of all statusbar frames"] = "调整所有状态条的边框样式" + L["Statusbar border offset divider (smaller is higher offset)"] = "状态条边框距离" + L["Offset of border to statusbar (in case statusbar shows beyond the border)"] = "调整状态条边框距离" + L["Statusbar border color"] = "状态条边框顏色" + L["This changes the border color of all statusbar frames"] = "调整所有状态条的边框颜色" + L["Hide Blizzard"] = "隐藏暴雪框架" + L["Grow Direction"] = "框架延伸方向" + L["Arena only"] = "只在竞技场中" + L["Never"] = "从不" + L["Always"] = "一直" + L["Load configuration"] = "设置选项" --Line 713 + L["Load configuration options"] = "加载设置选项" --Line 714 + L["Background Color of the frame"] = "框架的背景顏色" + + L["Gladdy"] = "Gladdy框架" --Line 210, 709, 727 end -- 2.39.5 From 92322a4d9bf921cd5e78ba2b22bf2d45966a5168 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Mon, 10 Jan 2022 23:59:20 +0100 Subject: [PATCH 017/227] spell interrupt announce --- Modules/Announcements.lua | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/Modules/Announcements.lua b/Modules/Announcements.lua index aeb5fd5..4b63595 100644 --- a/Modules/Announcements.lua +++ b/Modules/Announcements.lua @@ -26,6 +26,7 @@ local Announcements = Gladdy:NewModule("Announcements", nil, { healthThreshold = 20, trinketUsed = true, trinketReady = false, + spellInterrupt = true, dest = "party", }, }) @@ -48,6 +49,7 @@ function Announcements:Initialize() self:RegisterMessage("TRINKET_USED") self:RegisterMessage("TRINKET_READY") self:RegisterMessage("SHADOWSIGHT") + self:RegisterMessage("SPELL_INTERRUPT") end function Announcements:Reset() @@ -138,6 +140,14 @@ function Announcements:TRINKET_READY(unit) self:Send(L["TRINKET READY: %s (%s)"]:format(button.name, button.classLoc), 3, RAID_CLASS_COLORS[button.class]) end +function Announcements:SPELL_INTERRUPT(destUnit,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool) + local button = Gladdy.buttons[destUnit] + if (not button or not Gladdy.db.announcements.spellInterrupt) then + return + end + self:Send(L["INTERRUPTED: %s (%s)"]:format(extraSpellName, button.name or ""), 3, RAID_CLASS_COLORS[button.class]) +end + function Announcements:CheckDrink(unit, aura) local button = Gladdy.buttons[unit] if (not button or not Gladdy.db.announcements.drinks) then @@ -237,41 +247,47 @@ function Announcements:GetOptions() desc = L["Announce when an enemy's trinket is ready again"], order = 4, }), + spellInterrupt = option({ + type = "toggle", + name = L["Interrupts"], + desc = L["Announces when enemies' spells are interrupted"], + order = 5, + }), drinks = option({ type = "toggle", name = L["Drinking"], desc = L["Announces when enemies sit down to drink"], - order = 5, + order = 6, }), resurrections = option({ type = "toggle", name = L["Resurrection"], desc = L["Announces when an enemy tries to resurrect a teammate"], - order = 6, + order = 7, }), enemy = option({ type = "toggle", name = L["New enemies"], desc = L["Announces when new enemies are discovered"], - order = 7, + order = 8, }), spec = option({ type = "toggle", name = L["Spec Detection"], desc = L["Announces when the spec of an enemy was detected"], - order = 8, + order = 9, }), health = option({ type = "toggle", name = L["Low health"], desc = L["Announces when an enemy drops below a certain health threshold"], - order = 9, + order = 10, }), healthThreshold = option({ type = "range", name = L["Low health threshold"], desc = L["Choose how low an enemy must be before low health is announced"], - order = 10, + order = 11, min = 1, max = 100, step = 1, @@ -283,7 +299,7 @@ function Announcements:GetOptions() type = "select", name = L["Destination"], desc = L["Choose how your announcements are displayed"], - order = 11, + order = 12, values = destValues, }), } -- 2.39.5 From fed5d1c3416835836b159622115934cdf268d7b4 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Mon, 10 Jan 2022 23:59:33 +0100 Subject: [PATCH 018/227] reload during arena --- EventListener.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/EventListener.lua b/EventListener.lua index 4d87a28..7d96b78 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -33,6 +33,16 @@ function EventListener:JOINED_ARENA() self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START") self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED") self:SetScript("OnEvent", EventListener.OnEvent) + + -- in case arena has started already we check for units + for i=1,Gladdy.curBracket do + if UnitExists("arena" .. i) then + Gladdy:SpotEnemy("arena" .. i, true) + end + if UnitExists("arenapet" .. i) then + Gladdy:SendMessage("PET_SPOTTED", "arenapet" .. i) + end + end end function EventListener:Reset() -- 2.39.5 From b2c8ed9c44ab8beb6f1793cff70a47ec81cc2eda Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 00:00:17 +0100 Subject: [PATCH 019/227] fixed spec detection --- Modules/Cooldowns.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 1ab006d..bf30c5d 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -338,13 +338,24 @@ function Cooldowns:CooldownReady(button, spellId, frame) end end +local function notIn(spec, list) + for _,v in ipairs(list) do + if spec == v then + return false + end + end + return true +end + function Cooldowns:DetectSpec(unit, spec) local button = Gladdy.buttons[unit] if (not button or not spec or button.spec) then return end - if button.class == "PALADIN" and (spec ~= L["Holy"] or spec ~= L["Retribution"]) then + if button.class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) + or button.class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) + or button.class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then return end -- 2.39.5 From e2a78c717b75dabd444d1217db40540557f95311 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 00:01:57 +0100 Subject: [PATCH 020/227] fixed DRs Hibernate/Chastice/Dragonsbreath/ImpConcussiveShot/Counterattack --- Libs/DRData-1.0/DRData-1.0.lua | 38 +++++++++++++++++++--------------- Modules/ExportImport.lua | 6 +++++- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/Libs/DRData-1.0/DRData-1.0.lua b/Libs/DRData-1.0/DRData-1.0.lua index e6bd775..6b7d0e7 100644 --- a/Libs/DRData-1.0/DRData-1.0.lua +++ b/Libs/DRData-1.0/DRData-1.0.lua @@ -188,9 +188,9 @@ Data.spells = { --[[ SLEEPS ]]-- -- Hibernate - [2637] = "sleep", - [18657] = "sleep", - [18658] = "sleep", + [2637] = "disorient", + [18657] = "disorient", + [18658] = "disorient", -- Wyvern Sting [19386] = "disorient", @@ -199,19 +199,19 @@ Data.spells = { [27068] = "disorient", --[[ MISC ]]-- - -- Chastise (Maybe this shares DR with Imp HS?) - [44041] = "root", - [44043] = "root", - [44044] = "root", - [44045] = "root", - [44046] = "root", - [44047] = "root", + -- Chastise + [44041] = "chastise", + [44043] = "chastise", + [44044] = "chastise", + [44045] = "chastise", + [44046] = "chastise", + [44047] = "chastise", -- Dragon's Breath - [31661] = "dragonsbreath", -- Dragon's Breath - [33041] = "dragonsbreath", -- Dragon's Breath - [33042] = "dragonsbreath", -- Dragon's Breath - [33043] = "dragonsbreath", -- Dragon's Breath + [31661] = "scatters", -- Dragon's Breath + [33041] = "scatters", -- Dragon's Breath + [33042] = "scatters", -- Dragon's Breath + [33043] = "scatters", -- Dragon's Breath -- Repentance [20066] = "disorient", @@ -224,9 +224,9 @@ Data.spells = { [14309] = "disorient", -- Improved Conc Shot - [19410] = "impconc", - [22915] = "impconc", - [28445] = "impconc", + [19410] = "rndstun", + [22915] = "rndstun", + [28445] = "rndstun", -- Death Coil [6789] = "dc", @@ -242,6 +242,9 @@ Data.spells = { [605] = "charm", [10911] = "charm", [10912] = "charm", + + -- Counterattack + [19306] = "counterattack" } -- DR Category names @@ -264,6 +267,7 @@ Data.typeNames = { ["repentance"] = "Repentance", ["dragonsbreath"] = "Dragon's Breath", ["ua"] = "Unstable Affliction Silence", + ["counterattack"] = "Counterattack Immobilize" } -- Categories that have DR in PvE as well as PvP diff --git a/Modules/ExportImport.lua b/Modules/ExportImport.lua index a1c709e..330499a 100644 --- a/Modules/ExportImport.lua +++ b/Modules/ExportImport.lua @@ -89,7 +89,11 @@ import:AddChild(importClearButton) import.clearButton = importClearButton local deletedOptions = { -- backwards compatibility - growUp = true, + --deleted DR-categories + repentance = true, + sleep = true, + impconc = true, + dragonsbreath = true, freezetrap = true, repentance = true } -- 2.39.5 From 7db32cceef1efb53d1885ed1b777154e1863ac21 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 00:02:10 +0100 Subject: [PATCH 021/227] fix grow up positioning --- Frame.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Frame.lua b/Frame.lua index 128452d..b3d1e78 100644 --- a/Frame.lua +++ b/Frame.lua @@ -58,7 +58,7 @@ function Gladdy:CreateFrame() local scale = f:GetEffectiveScale() self.db.x = f:GetLeft() * scale - self.db.y = (self.db.growUp and f:GetBottom() or f:GetTop()) * scale + self.db.y = (self.db.growDirection == "TOP" and f:GetBottom() or f:GetTop()) * scale end end) @@ -82,7 +82,7 @@ function Gladdy:CreateFrame() local scale = self.frame:GetEffectiveScale() self.db.x = self.frame:GetLeft() * scale - self.db.y = (self.db.growUp and self.frame:GetBottom() or self.frame:GetTop()) * scale + self.db.y = (self.db.growDirection == "TOP" and self.frame:GetBottom() or self.frame:GetTop()) * scale end end) self.anchor:SetScript("OnClick", function() -- 2.39.5 From 2dcdc9c9786fb3775cac6cd6ffee1c8144ef6b47 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 00:02:21 +0100 Subject: [PATCH 022/227] fix dr level text --- Modules/Diminishings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index 2a2c1d2..069efb0 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -221,7 +221,6 @@ function Diminishings:UpdateFrame(unit) icon.timeText:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a) icon.drLevelText:SetFont(Gladdy:SMFetch("font", "drLevelTextFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drLevelTextFontScale, "OUTLINE") - icon.drLevelText:SetTextColor(getDiminishColor(icon.diminishing)) icon.cooldown:SetWidth(icon:GetWidth() - icon:GetWidth()/16) icon.cooldown:SetHeight(icon:GetHeight() - icon:GetHeight()/16) @@ -241,7 +240,6 @@ function Diminishings:UpdateFrame(unit) if Gladdy.db.drLevelTextEnabled then icon.drLevelText:Show() - icon.drLevelText:SetText(getDiminishText(icon.diminishing)) else icon.drLevelText:Hide() end @@ -368,6 +366,8 @@ function Diminishings:AuraFade(unit, spellID) lastIcon.active = true self:Positionate(unit) lastIcon:Show() + lastIcon.drLevelText:SetText(getDiminishText(lastIcon.diminishing)) + lastIcon.drLevelText:SetTextColor(getDiminishColor(lastIcon.diminishing)) end function Diminishings:Positionate(unit) -- 2.39.5 From f923f471d89a627277d64ff17f5934fef0a79573 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 00:03:36 +0100 Subject: [PATCH 023/227] detect spelllock and devour magic --- EventListener.lua | 4 ++++ Modules/Pets.lua | 1 + 2 files changed, 5 insertions(+) diff --git a/EventListener.lua b/EventListener.lua index 7d96b78..530f482 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -112,6 +112,10 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() end end if srcUnit then + srcUnit = string_gsub(srcUnit, "pet", "") + if (not UnitExists(srcUnit)) then + return + end if (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_AURA_APPLIED") then local unitRace = Gladdy.buttons[srcUnit].race -- cooldown tracker diff --git a/Modules/Pets.lua b/Modules/Pets.lua index 9039ce8..36a32d2 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -65,6 +65,7 @@ function Pets:ResetUnit(unitId) end function Pets:PET_SPOTTED(unit) + Gladdy.guids[UnitGUID(unit)] = unit if Gladdy.db.petEnabled then self.frames[unit].healthBar:SetAlpha(1) self.frames[unit].healthBar.hp:SetStatusBarColor(Gladdy.db.petHealthBarColor.r, Gladdy.db.petHealthBarColor.g, Gladdy.db.petHealthBarColor.b, Gladdy.db.petHealthBarColor.a) -- 2.39.5 From 0a5176aaed0bff1728778cdbbfc7b0d064efa6b1 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 00:04:08 +0100 Subject: [PATCH 024/227] detect arena and pets faster on reload --- Gladdy.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Gladdy.lua b/Gladdy.lua index 2b0b28c..a605d9b 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -14,6 +14,8 @@ local DEFAULT_CHAT_FRAME = DEFAULT_CHAT_FRAME local IsAddOnLoaded = IsAddOnLoaded local GetBattlefieldStatus = GetBattlefieldStatus local IsActiveBattlefieldArena = IsActiveBattlefieldArena +local IsInInstance = IsInInstance +local GetNumArenaOpponents = GetNumArenaOpponents local RELEASE_TYPES = { alpha = "Alpha", beta = "Beta", release = "Release"} local PREFIX = "TBC-Classic_v" local VERSION_REGEX = PREFIX .. "(%d+%.%d+)%-(%a)" @@ -422,7 +424,9 @@ end function Gladdy:UPDATE_BATTLEFIELD_STATUS(_, index) local status, mapName, instanceID, levelRangeMin, levelRangeMax, teamSize, isRankedArena, suspendedQueue, bool, queueType = GetBattlefieldStatus(index) - if (status == "active" and teamSize > 0 and IsActiveBattlefieldArena()) then + local instanceType = select(2, IsInInstance()) + Gladdy:Debug("INFO", "UPDATE_BATTLEFIELD_STATUS", instanceType, status, teamSize) + if ((instanceType == "arena" or GetNumArenaOpponents() > 0) and status == "active" and teamSize > 0) then self.curBracket = teamSize self:JoinedArena() end -- 2.39.5 From 1b2311fea2640acd2390e92997ca65ad0b3d4e89 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 00:04:54 +0100 Subject: [PATCH 025/227] debug messages --- Gladdy.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Gladdy.lua b/Gladdy.lua index a605d9b..1b3f4ba 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -37,6 +37,8 @@ Gladdy.version_releaseType = RELEASE_TYPES.release Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType Gladdy.VERSION_REGEX = VERSION_REGEX +Gladdy.debug = false + LibStub("AceTimer-3.0"):Embed(Gladdy) LibStub("AceComm-3.0"):Embed(Gladdy) Gladdy.modules = {} @@ -58,6 +60,17 @@ function Gladdy:Print(...) end function Gladdy:Warn(...) + local text = "|cfff29f05Gladdy|r:" + local val + for i = 1, select("#", ...) do + val = select(i, ...) + if (type(val) == 'boolean') then val = val and "true" or false end + text = text .. " " .. tostring(val) + end + DEFAULT_CHAT_FRAME:AddMessage(text) +end + +function Gladdy:Error(...) local text = "|cfffc0303Gladdy|r:" local val for i = 1, select("#", ...) do @@ -68,6 +81,18 @@ function Gladdy:Warn(...) DEFAULT_CHAT_FRAME:AddMessage(text) end +function Gladdy:Debug(lvl, ...) + if Gladdy.debug then + if lvl == "INFO" then + Gladdy:Print(...) + elseif lvl == "WARN" then + Gladdy:Warn(...) + elseif lvl == "ERROR" then + Gladdy:Error(...) + end + end +end + Gladdy.events = CreateFrame("Frame") Gladdy.events.registered = {} Gladdy.events:RegisterEvent("PLAYER_LOGIN") -- 2.39.5 From 8df7aae3b6466de42834132994f260b08fb1d07a Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 00:05:31 +0100 Subject: [PATCH 026/227] detect fear ward cd when buffed pre arena start --- EventListener.lua | 33 ++++++++++++++++++++++++++------- Modules/Cooldowns.lua | 4 ++-- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 530f482..e867791 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -1,13 +1,14 @@ -local select, string_gsub, tostring = select, string.gsub, tostring +local select, string_gsub, tostring, pairs = select, string.gsub, tostring, pairs local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo local AURA_TYPE_DEBUFF = AURA_TYPE_DEBUFF local AURA_TYPE_BUFF = AURA_TYPE_BUFF -local UnitName, UnitAura, UnitRace, UnitClass, UnitGUID, UnitIsUnit = UnitName, UnitAura, UnitRace, UnitClass, UnitGUID, UnitIsUnit +local UnitName, UnitAura, UnitRace, UnitClass, UnitGUID, UnitIsUnit, UnitExists = UnitName, UnitAura, UnitRace, UnitClass, UnitGUID, UnitIsUnit, UnitExists local UnitCastingInfo, UnitChannelInfo = UnitCastingInfo, UnitChannelInfo local GetSpellInfo = GetSpellInfo local FindAuraByName = AuraUtil.FindAuraByName +local GetTime = GetTime local Gladdy = LibStub("Gladdy") local Cooldowns = Gladdy.modules["Cooldowns"] @@ -50,9 +51,9 @@ function EventListener:Reset() self:SetScript("OnEvent", nil) end -function Gladdy:DetectSpec(unit, specSpell) - if specSpell then - self.modules["Cooldowns"]:DetectSpec(unit, specSpell) +function Gladdy:DetectSpec(unit, spec) + if spec then + self.modules["Cooldowns"]:DetectSpec(unit, spec) end end @@ -73,11 +74,18 @@ function Gladdy:SpotEnemy(unit, auraScan) end if auraScan and not button.spec then for n = 1, 30 do - local spellName,_,_,_,_,_,unitCaster = UnitAura(unit, n, "HELPFUL") + local spellName,_,_,_,_,expirationTime,unitCaster = UnitAura(unit, n, "HELPFUL") if ( not spellName ) then break end - if Gladdy.specBuffs[spellName] then + if Gladdy.cooldownBuffs[spellName] then -- Check for auras that detect used CDs (like Fear Ward) + for arenaUnit,v in pairs(self.buttons) do + if (UnitIsUnit(arenaUnit, unitCaster)) then + Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, expirationTime - GetTime()) + end + end + end + if Gladdy.specBuffs[spellName] then -- Check for auras that detect a spec local unitPet = string_gsub(unit, "%d$", "pet%1") if UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster) then Gladdy:DetectSpec(unit, Gladdy.specBuffs[spellName]) @@ -202,6 +210,10 @@ Gladdy.exceptionNames = { -- TODO MOVE ME TO CLASSBUFFS LIB [27010] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), } +Gladdy.cooldownBuffs = { + [GetSpellInfo(6346)] = { cd = 180, spellId = 6346 }, -- Fear Ward +} + function EventListener:UNIT_AURA(unit) local button = Gladdy.buttons[unit] if not button then @@ -220,6 +232,13 @@ function EventListener:UNIT_AURA(unit) Gladdy:SendMessage("AURA_GAIN_LIMIT", unit, auraType, n - 1) break end + if Gladdy.cooldownBuffs[spellName] then -- Check for auras that hint used CDs (like Fear Ward) + for arenaUnit,v in pairs(Gladdy.buttons) do + if (UnitIsUnit(arenaUnit, unitCaster)) then + Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, expirationTime - GetTime()) + end + end + end if not button.spec and Gladdy.specBuffs[spellName] then local unitPet = string_gsub(unit, "%d$", "pet%1") if unitCaster and (UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster)) then diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index bf30c5d..0ce1594 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -502,7 +502,7 @@ function Cooldowns:UpdateCooldowns(button) end end -function Cooldowns:CooldownUsed(unit, unitClass, spellId) +function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSeconds) local button = Gladdy.buttons[unit] if not button then return @@ -547,7 +547,7 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId) if (Gladdy.db.cooldown) then -- start cooldown - self:CooldownStart(button, spellId, cd) + self:CooldownStart(button, spellId, expirationTimeInSeconds or cd) end --[[ announcement -- 2.39.5 From be292401cc1aef152a7b69ce9393c910ed200998 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 00:05:57 +0100 Subject: [PATCH 027/227] pixel perfect scale minor adjustments --- Gladdy.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Gladdy.lua b/Gladdy.lua index 1b3f4ba..f84824f 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -8,6 +8,7 @@ local tsort = table.sort local str_lower = string.lower local math_abs = math.abs local GetTime = GetTime +local GetPhysicalScreenSize = GetPhysicalScreenSize local InCombatLockdown = InCombatLockdown local CreateFrame = CreateFrame local DEFAULT_CHAT_FRAME = DEFAULT_CHAT_FRAME @@ -290,15 +291,17 @@ end function Gladdy:PixelPerfectScale(update) local physicalWidth, physicalHeight = GetPhysicalScreenSize() - local perfectUIScale = 768/physicalHeight--768/select(2, strsplit("x",({ GetScreenResolutions()})[GetCurrentResolution()])) + local perfectUIScale = 768.0/physicalHeight--768/select(2, strsplit("x",({ GetScreenResolutions()})[GetCurrentResolution()])) if self.db and self.db.pixelPerfect and self.frame then self.frame:SetIgnoreParentScale(true) self.frame:SetScale(perfectUIScale) - --self.db.frameScale = perfectUIScale --(GetCVar("useUiScale") == "1" and 1 + perfectUIScale - GetCVar("UIScale") or perfectUIScale) + --local adaptiveScale = (GetCVar("useUiScale") == "1" and 1.0 + perfectUIScale - GetCVar("UIScale") or perfectUIScale) + --self.frame:SetScale(adaptiveScale) if update then self:UpdateFrame() end elseif self.frame then + self.frame:SetScale(self.db.frameScale) self.frame:SetIgnoreParentScale(false) end end -- 2.39.5 From adb06d0c7fc23b23ee7f14123a63e313b15ff64a Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 00:13:31 +0100 Subject: [PATCH 028/227] add spec detection spells: - Expose Weakness (Survival Hunter) - Slow (Arcane Mage) - Improved Blink (Fire Mage) - Vindication (Retribution Paladin) - Holy Shield (Protection Paladin) - Vampiric Embrace (Shadow Priest) - Blade Flurry (Combat Rogue) - Unleashed Rage (Enhancement Shaman) - Flurry (Enhancement Shaman) - Shamanistic Rage (Enhancement Shaman) - Healing Way (Restoration Shaman) - Totem of Wrath (Elemental Shaman) - Dark Pact (Affliction Warlock) - Conflagate (Destruction Warlock) - Shield Slam (Protection Warrior) Added Cooldowns: - Scare Beast (Hunter) - Feign Death (Hunter) - Viper Sting (Hunter) - Flare (Hunter) - Fear Ward (Priest) - Shadow Word: Death (Priest) - Evocation (Mage) - Grounding Totem (Shaman) - Spell Lock (Warlock) - Devour Magic (Warlock) - Intercept (Warrior) Added Auras: - Scare Beast (Hunter) - Fear Ward (Priest) --- Constants.lua | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/Constants.lua b/Constants.lua index 5595fe2..1e431b8 100644 --- a/Constants.lua +++ b/Constants.lua @@ -26,13 +26,16 @@ local specBuffs = { [GetSpellInfo(20895)] = L["Beast Mastery"], -- Spirit Bond [GetSpellInfo(34455)] = L["Beast Mastery"], -- Ferocious Inspiration [GetSpellInfo(27066)] = L["Marksmanship"], -- Trueshot Aura + [GetSpellInfo(34501)] = L["Survival"], -- Expose Weakness -- MAGE [GetSpellInfo(33405)] = L["Frost"], -- Ice Barrier [GetSpellInfo(11129)] = L["Fire"], -- Combustion [GetSpellInfo(12042)] = L["Arcane"], -- Arcane Power [GetSpellInfo(12043)] = L["Arcane"], -- Presence of Mind + [GetSpellInfo(31589)] = L["Arcane"], -- Slow [GetSpellInfo(12472)] = L["Frost"], -- Icy Veins + [GetSpellInfo(46989)] = L["Fire"], -- Improved Blink -- PALADIN [GetSpellInfo(31836)] = L["Holy"], -- Light's Grace @@ -41,9 +44,12 @@ local specBuffs = { [GetSpellInfo(20375)] = L["Retribution"], -- Seal of Command [GetSpellInfo(20049)] = L["Retribution"], -- Vengeance [GetSpellInfo(20218)] = L["Retribution"], -- Sanctity Aura + [GetSpellInfo(26018)] = L["Retribution"], -- Vindication + [GetSpellInfo(27179)] = L["Protection"], -- Holy Shield -- PRIEST [GetSpellInfo(15473)] = L["Shadow"], -- Shadowform + [GetSpellInfo(15286)] = L["Shadow"], -- Vampiric Embrace [GetSpellInfo(45234)] = L["Discipline"], -- Focused Will [GetSpellInfo(27811)] = L["Discipline"], -- Blessed Recovery [GetSpellInfo(33142)] = L["Holy"], -- Blessed Resilience @@ -59,11 +65,15 @@ local specBuffs = { [GetSpellInfo(36563)] = L["Subtlety"], -- Shadowstep DMG [GetSpellInfo(14278)] = L["Subtlety"], -- Ghostly Strike [GetSpellInfo(31233)] = L["Assassination"], -- Find Weakness + [GetSpellInfo(13877)] = L["Combat"], -- Blade Flurry --Shaman + [GetSpellInfo(30807)] = L["Enhancement"], -- Unleashed Rage + [GetSpellInfo(16280)] = L["Enhancement"], -- Flurry + [GetSpellInfo(30823)] = L["Enhancement"], -- Shamanistic Rage [GetSpellInfo(16190)] = L["Restoration"], -- Mana Tide Totem [GetSpellInfo(32594)] = L["Restoration"], -- Earth Shield - [GetSpellInfo(30823)] = L["Enhancement"], -- Shamanistic Rage + [GetSpellInfo(29202)] = L["Restoration"], -- Healing Way -- WARLOCK [GetSpellInfo(19028)] = L["Demonology"], -- Soul Link @@ -122,11 +132,13 @@ local specSpells = { [GetSpellInfo(34861)] = L["Holy"], -- Circle of Healing [GetSpellInfo(15473)] = L["Shadow"], -- Shadowform [GetSpellInfo(34917)] = L["Shadow"], -- Vampiric Touch + [GetSpellInfo(15286)] = L["Shadow"], -- Vampiric Embrace -- ROGUE [GetSpellInfo(34413)] = L["Assassination"], -- Mutilate [GetSpellInfo(14177)] = L["Assassination"], -- Cold Blood [GetSpellInfo(13750)] = L["Combat"], -- Adrenaline Rush + [GetSpellInfo(13877)] = L["Combat"], -- Blade Flurry [GetSpellInfo(14185)] = L["Subtlety"], -- Preparation [GetSpellInfo(16511)] = L["Subtlety"], -- Hemorrhage [GetSpellInfo(36554)] = L["Subtlety"], -- Shadowstep @@ -135,6 +147,7 @@ local specSpells = { -- SHAMAN [GetSpellInfo(16166)] = L["Elemental"], -- Elemental Mastery + [GetSpellInfo(30706)] = L["Elemental"], -- Totem of Wrath [GetSpellInfo(30823)] = L["Enhancement"], -- Shamanistic Rage [GetSpellInfo(17364)] = L["Enhancement"], -- Stormstrike [GetSpellInfo(16190)] = L["Restoration"], -- Mana Tide Totem @@ -143,8 +156,10 @@ local specSpells = { -- WARLOCK [GetSpellInfo(30405)] = L["Affliction"], -- Unstable Affliction + [GetSpellInfo(18220)] = L["Affliction"], -- Dark Pact --[GetSpellInfo(30911)] = L["Affliction"], -- Siphon Life [GetSpellInfo(30414)] = L["Destruction"], -- Shadowfury + [GetSpellInfo(30912)] = L["Destruction"], -- Conflagrate -- WARRIOR [GetSpellInfo(30330)] = L["Arms"], -- Mortal Strike @@ -152,6 +167,7 @@ local specSpells = { [GetSpellInfo(30335)] = L["Fury"], -- Bloodthirst [GetSpellInfo(12809)] = L["Protection"], -- Concussion Blow [GetSpellInfo(30022)] = L["Protection"], -- Devastation + [GetSpellInfo(30356)] = L["Protection"], -- Shield Slam } function Gladdy:GetSpecSpells() return specSpells @@ -264,6 +280,16 @@ local importantAuras = { onDamage = true, spellID = 19503, }, + -- Scare Beast + [GetSpellInfo(14327)] = { + track = AURA_TYPE_DEBUFF, + duration = 8, + priority = 40, + onDamage = true, + fear = true, + magic = true, + spellID = 14327, + }, -- Silencing Shot [GetSpellInfo(34490)] = { track = AURA_TYPE_DEBUFF, @@ -446,6 +472,13 @@ local importantAuras = { priority = 10, spellID = 33206, }, + -- Fear Ward + [GetSpellInfo(6346)] = { + track = AURA_TYPE_BUFF, + duration = 180, + priority = 9, + spellID = 6346, + }, -- Sap @@ -796,7 +829,7 @@ local cooldownList = { ["MAGE"] = { [1953] = 15, -- Blink --[122] = 22, -- Frost Nova - --[12051] = 480, --Evocation + [12051] = 480, --Evocation [2139] = 24, -- Counterspell [45438] = { cd = 300, [L["Frost"]] = 240, }, -- Ice Block [12472] = { cd = 180, spec = L["Frost"], }, -- Icy Veins @@ -828,6 +861,8 @@ local cooldownList = { [10060] = { cd = 180, spec = L["Discipline"], }, -- Power Infusion [33206] = { cd = 120, spec = L["Discipline"], }, -- Pain Suppression [34433] = 300, -- Shadowfiend + [32379] = 12, -- Shadow Word: Death + [6346] = 180, -- Fear Ward }, -- Druid @@ -853,6 +888,7 @@ local cooldownList = { [16166] = { cd = 180, spec = L["Elemental"], }, -- Elemental Mastery [16188] = { cd = 180, spec = L["Restoration"], }, -- Natures Swiftness [16190] = { cd = 300, spec = L["Restoration"], }, -- Mana Tide Totem + [8177] = 15, -- Grounding Totem }, -- Paladin @@ -882,7 +918,8 @@ local cooldownList = { ["WARLOCK"] = { [17928] = 40, -- Howl of Terror [27223] = 120, -- Death Coil - --[19647] = { cd = 24 }, -- Spell Lock; how will I handle pet spells? + [19647] = 24, -- Spell Lock + [27277] = 8, -- Devour Magic [30414] = { cd = 20, spec = L["Destruction"], }, -- Shadowfury [17877] = { cd = 15, spec = L["Destruction"], }, -- Shadowburn [18708] = { cd = 900, spec = L["Demonology"], }, -- Feldom @@ -907,6 +944,7 @@ local cooldownList = { [18499] = 30, -- Berserker Rage --[2565] = 60, -- Shield Block [12292] = { cd = 180, spec = L["Arms"], }, -- Death Wish + [20252] = { cd = 30, [L["Arms"]] = 20 }, -- Intercept [12975] = { cd = 180, spec = L["Protection"], }, -- Last Stand [12809] = { cd = 30, spec = L["Protection"], }, -- Concussion Blow @@ -915,6 +953,7 @@ local cooldownList = { -- Hunter ["HUNTER"] = { [19503] = 30, -- Scatter Shot + [14327] = 30, -- Scare Beast [19263] = 300, -- Deterrence; not on BM but can't do 2 specs [14311] = { cd = 30, -- Freezing Trap sharedCD = { @@ -938,6 +977,9 @@ local cooldownList = { [19386] = { cd = 60, spec = L["Survival"], }, -- Wyvern Sting [19577] = { cd = 60, spec = L["Beast Mastery"], }, -- Intimidation [38373] = { cd = 120, spec = L["Beast Mastery"], }, -- The Beast Within + [5384] = 30, -- Feign Death + [3034] = 15, -- Viper Sting + [1543] = 20, -- Flare }, -- Rogue -- 2.39.5 From 59da6f34c6f00bc769f30b663c00fb3dea608b8b Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 00:29:17 +0100 Subject: [PATCH 029/227] movable frames --- Constants.lua | 55 +++++ Frame.lua | 271 ++++++++++++++++++------ Gladdy.lua | 88 ++------ Modules/BuffsDebuffs.lua | 396 +++++++++++++++++------------------- Modules/Castbar.lua | 82 ++++---- Modules/Classicon.lua | 46 +++-- Modules/CombatIndicator.lua | 50 ++--- Modules/Cooldowns.lua | 193 +++++++++--------- Modules/Diminishings.lua | 94 +++++---- Modules/ExportImport.lua | 19 +- Modules/Pets.lua | 36 +++- Modules/Racial.lua | 50 +++-- Modules/Trinket.lua | 55 +++-- Options.lua | 54 +++-- 14 files changed, 881 insertions(+), 608 deletions(-) diff --git a/Constants.lua b/Constants.lua index 1e431b8..7efeeee 100644 --- a/Constants.lua +++ b/Constants.lua @@ -1180,3 +1180,58 @@ function Gladdy:GetArenaTimer() end end +Gladdy.legacy = { + castBarPos = "LEFT", + buffsCooldownPos = "TOP", + buffsBuffsCooldownPos = "BOTTOM", + classIconPos = "LEFT", + ciAnchor = "healthBar", + ciPos = "TOP", + cooldownYPos = "TOP", + cooldownXPos = "LEFT", + drCooldownPos = "RIGHT", + racialAnchor = "trinket", + racialPos = "RIGHT", + trinketPos = "RIGHT", + padding = 1, + growUp = false, +} + +Gladdy.newDefaults = { + ["bottomMargin"] = 94.99996948242188, + ["newLayout"] = true, + Pets = { + ["petYOffset"] = -81.99993896484375, + ["petXOffset"] = 181, + }, + ClassIcon = { + ["classIconXOffset"] = -74.90008544921875, + }, + Racial = { + ["racialXOffset"] = 255.9000244140625, + }, + Trinket = { + ["trinketXOffset"] = 182, + }, + ["Combat Indicator"] = { + ["ciXOffset"] = 79.99993896484375, + ["ciYOffset"] = -10.99993896484375, + }, + Cooldowns = { + ["cooldownYOffset"] = 31, + }, + ["Buffs and Debuffs"] = { + ["buffsBuffsXOffset"] = 29, + ["buffsBuffsYOffset"] = -82.99993896484375, + ["buffsXOffset"] = 29, + ["buffsYOffset"] = 62.00006103515625, + }, + Diminishings = { + ["drXOffset"] = 329.7999877929688, + ["drYOffset"] = -22.5, + }, + ["Cast Bar"] = { + ["castBarXOffset"] = -235.900146484375, + ["castBarYOffset"] = -30.5, + }, +} \ No newline at end of file diff --git a/Frame.lua b/Frame.lua index b3d1e78..e6d58e0 100644 --- a/Frame.lua +++ b/Frame.lua @@ -1,6 +1,9 @@ local CreateFrame = CreateFrame local UIParent = UIParent local InCombatLockdown = InCombatLockdown +local math_abs = math.abs +local pairs = pairs +local LibStub = LibStub local Gladdy = LibStub("Gladdy") local L = Gladdy.L @@ -45,7 +48,7 @@ function Gladdy:CreateFrame() self.frame:SetClampedToScreen(true) self.frame:EnableMouse(false) self.frame:SetMovable(true) - self.frame:RegisterForDrag("LeftButton") + --self.frame:RegisterForDrag("LeftButton") self.frame:SetScript("OnDragStart", function(f) if (not InCombatLockdown() and not self.db.locked) then @@ -126,72 +129,24 @@ function Gladdy:UpdateFrame() local highlightBorderSize = (self.db.highlightInset and 0 or self.db.highlightBorderSize * 2) local powerBarHeight = self.db.powerBarEnabled and (self.db.powerBarHeight + 1) or 0 - local leftSize = 0 - local rightSize = 0 - --Trinket + Racial - if self.db.trinketEnabled and self.db.trinketPos == "LEFT" then - leftSize = leftSize + self.db.trinketSize * self.db.trinketWidthFactor + self.db.padding - if self.db.racialEnabled and self.db.racialAnchor == "trinket" and self.db.racialPos == "LEFT" then - leftSize = leftSize + self.db.racialSize * self.db.racialWidthFactor + self.db.padding - end - end - if self.db.trinketEnabled and self.db.trinketPos == "RIGHT" then - rightSize = rightSize + self.db.trinketSize * self.db.trinketWidthFactor + self.db.padding - if self.db.racialEnabled and self.db.racialAnchor == "trinket" and self.db.racialPos == "RIGHT" then - rightSize = rightSize + self.db.racialSize * self.db.racialWidthFactor + self.db.padding - end - end - --ClassIcon - if self.db.classIconPos == "LEFT" then - leftSize = leftSize + self.db.classIconSize * self.db.classIconWidthFactor + self.db.padding - else - rightSize = rightSize + self.db.classIconSize * self.db.classIconWidthFactor + self.db.padding - end - --Highlight - if not self.db.highlightInset then - leftSize = leftSize + self.db.highlightBorderSize - rightSize = rightSize + self.db.highlightBorderSize - end local margin = powerBarHeight - local width = self.db.barWidth + leftSize + rightSize local height = (self.db.healthBarHeight + powerBarHeight) * teamSize + (self.db.highlightInset and 0 or self.db.highlightBorderSize * 2 * teamSize) + self.db.bottomMargin * (teamSize - 1) -- Highlight margin = margin + highlightBorderSize - - if (self.db.cooldownYPos == "TOP" or self.db.cooldownYPos == "BOTTOM") and self.db.cooldown then - margin = margin + self.db.cooldownSize - height = height + self.db.cooldownSize * (teamSize - 1) - end - if (self.db.buffsCooldownPos == "TOP" or self.db.buffsCooldownPos == "BOTTOM") and self.db.buffsEnabled then - margin = margin + self.db.buffsIconSize - height = height + self.db.buffsIconSize * (teamSize - 1) - end - if (self.db.buffsBuffsCooldownPos == "TOP" or self.db.buffsBuffsCooldownPos == "BOTTOM") and self.db.buffsEnabled then - margin = margin + self.db.buffsBuffsIconSize - height = height + self.db.buffsBuffsIconSize * (teamSize - 1) - end - if self.db.buffsCooldownPos == "TOP" and self.db.cooldownYPos == "TOP" and self.db.cooldown and self.db.buffsEnabled then - margin = margin + 1 - height = height + (teamSize - 1) - end - if self.db.buffsCooldownPos == "BOTTOM" and self.db.cooldownYPos == "BOTTOM" and self.db.cooldown and self.db.buffsEnabled then - margin = margin + 1 - height = height + (teamSize - 1) - end + margin, height = Gladdy:LegacyPositioning(margin, height, teamSize) -- GrowDirection if (self.db.growDirection == "LEFT" or self.db.growDirection == "RIGHT") then - width = self.db.barWidth * teamSize + (leftSize + rightSize) * teamSize + self.db.bottomMargin * (teamSize - 1) height = self.db.healthBarHeight + powerBarHeight end self.frame:SetScale(self.db.frameScale) self:PixelPerfectScale(false) - self.frame:SetWidth(width) + self.frame:SetWidth(self.db.barWidth + highlightBorderSize) self.frame:SetHeight(height) self.frame:ClearAllPoints() self.frame.background:SetBackdropColor(self.db.backgroundColor.r, self.db.backgroundColor.g, self.db.backgroundColor.b, self.db.backgroundColor.a) @@ -209,14 +164,14 @@ function Gladdy:UpdateFrame() end --Anchor - self.anchor:SetWidth(width) + self.anchor:SetWidth(self.db.barWidth * 2 + highlightBorderSize) self.anchor:ClearAllPoints() if (self.db.growDirection == "TOP") then - self.anchor:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT") + self.anchor:SetPoint("TOP", self.frame, "BOTTOM") elseif self.growDirection == "BOTTOM" or self.growDirection == "RIGHT" then - self.anchor:SetPoint("BOTTOMLEFT", self.frame, "TOPLEFT") + self.anchor:SetPoint("BOTTOM", self.frame, "TOP") else - self.anchor:SetPoint("BOTTOMRIGHT", self.frame, "TOPRIGHT") + self.anchor:SetPoint("BOTTOM", self.frame, "TOP") end if (self.db.locked) then @@ -236,7 +191,7 @@ function Gladdy:UpdateFrame() button.secure:ClearAllPoints() if (self.db.growDirection == "TOP") then if (i == 1) then - button:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", leftSize, powerBarHeight) + button:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", 0, powerBarHeight) button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT") else button:SetPoint("BOTTOMLEFT", self.buttons["arena" .. (i - 1)], "TOPLEFT", 0, margin + self.db.bottomMargin) @@ -244,7 +199,7 @@ function Gladdy:UpdateFrame() end elseif (self.db.growDirection == "BOTTOM") then if (i == 1) then - button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", leftSize, 0) + button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 0, 0) button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT") else button:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "BOTTOMLEFT", 0, -margin - self.db.bottomMargin) @@ -252,18 +207,18 @@ function Gladdy:UpdateFrame() end elseif (self.db.growDirection == "LEFT") then if (i == 1) then - button:SetPoint("TOPRIGHT", self.frame, "TOPRIGHT", -rightSize, 0) + button:SetPoint("TOPRIGHT", self.frame, "TOPRIGHT", -0, 0) button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT") else - button:SetPoint("TOPRIGHT", self.buttons["arena" .. (i - 1)], "TOPLEFT", -rightSize - leftSize - self.db.bottomMargin, 0) + button:SetPoint("TOPRIGHT", self.buttons["arena" .. (i - 1)], "TOPLEFT", - self.db.bottomMargin, 0) button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT") end elseif (self.db.growDirection == "RIGHT") then if (i == 1) then - button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", leftSize, 0) + button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 0, 0) button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT") else - button:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "TOPRIGHT", leftSize + rightSize + self.db.bottomMargin, 0) + button:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "TOPRIGHT", self.db.bottomMargin, 0) button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT") end end @@ -287,6 +242,27 @@ function Gladdy:UpdateFrame() elseif Gladdy.db.hideBlizzard == "never" then Gladdy:BlizzArenaSetAlpha(1) end + if (not Gladdy.db.newLayout) then + Gladdy.db.newLayout = true + --get margin + local arena1Bottom + local arena2Top + if (self.db.growDirection == "BOTTOM") then + arena1Bottom = self.buttons["arena1"].secure:GetBottom() + arena2Top = self.buttons["arena2"].secure:GetTop() + elseif (self.db.growDirection == "TOP") then + arena1Bottom = self.buttons["arena1"].secure:GetTop() + arena2Top = self.buttons["arena2"].secure:GetBottom() + elseif (self.db.growDirection == "LEFT") then + arena1Bottom = self.buttons["arena1"].secure:GetLeft() + arena2Top = self.buttons["arena2"].secure:GetRight() + elseif (self.db.growDirection == "RIGHT") then + arena1Bottom = self.buttons["arena1"].secure:GetRight() + arena2Top = self.buttons["arena2"].secure:GetLeft() + end + Gladdy.db.bottomMargin = math_abs(arena1Bottom - arena2Top) + Gladdy:UpdateFrame() + end end function Gladdy:HideFrame() @@ -381,6 +357,179 @@ function Gladdy:CreateButton(i) self:ResetButton("arena" .. i) end + + +function Gladdy:SetPosition(frame, unit, xOffsetDB, yOffsetDB, newLayout, module) + local button = self.buttons[unit] + if not button or not frame or not xOffsetDB or not yOffsetDB then + return + end + + if (not newLayout) then + --Gladdy:Debug("INFO", name, "old X/Y:", frame:GetCenter()) + local xOffset, yOffset = frame:GetLeft(), frame:GetTop() + local x,y = button.healthBar:GetLeft(), button.healthBar:GetTop() + local newXOffset = math_abs(x - xOffset) * (x > xOffset and -1 or 1) + local newYOffset = math_abs(y - yOffset) * (y > yOffset and -1 or 1) + frame:ClearAllPoints() + frame:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT", newXOffset, newYOffset) + --Gladdy:Debug("INFO", name, "new X/Y:", frame:GetCenter()) + if unit == "arena1" then + Gladdy.db[xOffsetDB] = newXOffset + Gladdy.db[yOffsetDB] = newYOffset + LibStub("AceConfigRegistry-3.0"):NotifyChange("Gladdy") + end + else + frame:ClearAllPoints() + frame:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT", Gladdy.db[xOffsetDB], Gladdy.db[yOffsetDB]) + end + if (self.newDefaults[module.name]) then + for k,v in pairs(self.newDefaults[module.name]) do + module.defaults[k] = v + end + end +end + +function Gladdy:CreateMover(frame, xConfig, yConfig, name, points, width, height, xOffset, yOffset, activated) + if not frame.mover then + frame:EnableMouse(false) + frame:SetMovable(true) + frame.mover = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate") + frame.mover:SetFrameStrata("DIALOG") + frame.mover:SetPoint(points[1], frame, points[2], xOffset or 0, yOffset or 0) + frame.mover:SetHeight(height or frame:GetHeight()) + frame.mover:SetWidth(width or frame:GetWidth()) + + local backdrop = { + bgFile = "Interface/Tooltips/UI-Tooltip-Background", + edgeFile = "", + tile = true, tileSize = 16, edgeSize = 10, + insets = {left = 0, right = 0, top = 0, bottom = 0} + } + frame.mover:SetBackdrop(backdrop) + frame.mover:SetBackdropColor(0,1,0,0.5) + frame.mover.border = CreateFrame("Frame", nil, frame.mover, BackdropTemplateMixin and "BackdropTemplate") + frame.mover.border:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = 2 }) + frame.mover.border:SetAllPoints(frame.mover) + frame.mover.border:SetBackdropBorderColor(0,1,0,1) + + frame.mover.text = frame.mover.border:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") + frame.mover.text:SetText(name) + frame.mover.text:SetPoint("CENTER") + + frame.mover:SetMovable(true) + frame.mover:EnableMouse(true) + + frame.mover:SetScript("OnMouseDown", function(self) + self.point = { frame:GetPoint() } + self.start = { frame:GetCenter() } + frame:StartMoving() + self:StartMoving() + end) + frame.mover:SetScript("OnMouseUp", function(self) + frame:StopMovingOrSizing() + self:StopMovingOrSizing() + self.stop = { frame:GetCenter() } + local diffX = math_abs(self.start[1] - self.stop[1]) + diffX = self.start[1] > self.stop[1] and -diffX or diffX + local diffY = math_abs(self.start[2] - self.stop[2]) + diffY = self.start[2] > self.stop[2] and -diffY or diffY + frame:ClearAllPoints() + frame:SetPoint(self.point[1], self.point[2], self.point[3], self.point[4] + diffX, self.point[5] + diffY) + Gladdy.db[xConfig] = self.point[4] + diffX + Gladdy.db[yConfig] = self.point[5] + diffY + LibStub("AceConfigRegistry-3.0"):NotifyChange("Gladdy") + Gladdy:UpdateFrame() + end) + else + frame.mover:ClearAllPoints() + frame.mover:SetPoint(points[1], frame, points[2], xOffset or 0, yOffset or 0) + frame.mover:SetHeight(height or frame:GetHeight()) + frame.mover:SetWidth(width or frame:GetWidth()) + end + if self.frame and self.frame.testing and self.db.showMover then + frame.mover:Show() + else + frame.mover:Hide() + end +end + +--------------------------- + +-- LAGACY SUPPORT + +--------------------------- + +function Gladdy:LegacyPositioning(margin, height, teamSize) + if not Gladdy.db.newLayout then + for k,v in pairs(Gladdy.legacy) do + if Gladdy.db[k] == nil then + Gladdy:Debug("INFO", "Gladdy:LegacyPositioning write", k,v) + Gladdy.db[k] = v + else + Gladdy:Debug("INFO", "Gladdy:LegacyPositioning found", k,v) + end + end + if (self.db.cooldownYPos == "TOP" or self.db.cooldownYPos == "BOTTOM") and self.db.cooldown then + margin = margin + self.db.cooldownSize + height = height + self.db.cooldownSize * (teamSize - 1) + end + if (self.db.buffsCooldownPos == "TOP" or self.db.buffsCooldownPos == "BOTTOM") and self.db.buffsEnabled then + margin = margin + self.db.buffsIconSize + height = height + self.db.buffsIconSize * (teamSize - 1) + end + if (self.db.buffsBuffsCooldownPos == "TOP" or self.db.buffsBuffsCooldownPos == "BOTTOM") and self.db.buffsEnabled then + margin = margin + self.db.buffsBuffsIconSize + height = height + self.db.buffsBuffsIconSize * (teamSize - 1) + end + if self.db.buffsCooldownPos == "TOP" and self.db.cooldownYPos == "TOP" and self.db.cooldown and self.db.buffsEnabled then + margin = margin + 1 + height = height + (teamSize - 1) + end + if self.db.buffsCooldownPos == "BOTTOM" and self.db.cooldownYPos == "BOTTOM" and self.db.cooldown and self.db.buffsEnabled then + margin = margin + 1 + height = height + (teamSize - 1) + end + end + return margin, height +end + +function Gladdy:PositionButton(button, i, leftSize, rightSize, powerBarHeight, margin) + if (self.db.growDirection == "TOP") then + if (i == 1) then + button:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", leftSize, powerBarHeight) + button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT") + else + button:SetPoint("BOTTOMLEFT", self.buttons["arena" .. (i - 1)], "TOPLEFT", 0, margin + self.db.bottomMargin) + button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT") + end + elseif (self.db.growDirection == "BOTTOM") then + if (i == 1) then + button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", leftSize, 0) + button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT") + else + button:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "BOTTOMLEFT", 0, -margin - self.db.bottomMargin) + button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT") + end + elseif (self.db.growDirection == "LEFT") then + if (i == 1) then + button:SetPoint("TOPRIGHT", self.frame, "TOPRIGHT", -rightSize, 0) + button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT") + else + button:SetPoint("TOPRIGHT", self.buttons["arena" .. (i - 1)], "TOPLEFT", -rightSize - leftSize - self.db.bottomMargin, 0) + button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT") + end + elseif (self.db.growDirection == "RIGHT") then + if (i == 1) then + button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", leftSize, 0) + button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT") + else + button:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "TOPRIGHT", leftSize + rightSize + self.db.bottomMargin, 0) + button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT") + end + end +end + function Gladdy:GetAnchor(unit, position) local anchor = "healthBar" if Gladdy.db.classIconPos == position then diff --git a/Gladdy.lua b/Gladdy.lua index f84824f..d117a96 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -6,7 +6,6 @@ local pairs = pairs local tinsert = table.insert local tsort = table.sort local str_lower = string.lower -local math_abs = math.abs local GetTime = GetTime local GetPhysicalScreenSize = GetPhysicalScreenSize local InCombatLockdown = InCombatLockdown @@ -97,6 +96,7 @@ end Gladdy.events = CreateFrame("Frame") Gladdy.events.registered = {} Gladdy.events:RegisterEvent("PLAYER_LOGIN") +Gladdy.events:RegisterEvent("PLAYER_LOGOUT") Gladdy.events:RegisterEvent("CVAR_UPDATE") hooksecurefunc("VideoOptionsFrameOkay_OnClick", function(self, button, down, apply) if (self:GetName() == "VideoOptionsFrameApply") then @@ -111,6 +111,8 @@ Gladdy.events:SetScript("OnEvent", function(self, event, ...) if (str_lower(select(1, ...)) == "uiscale") then Gladdy:PixelPerfectScale(true) end + elseif (event == "PLAYER_LOGOUT") then + Gladdy:DeleteUnknownOptions(Gladdy.db, Gladdy.defaults.profile) else local func = self.registered[event] @@ -202,68 +204,6 @@ function Gladdy:NewModule(name, priority, defaults) return module end -function Gladdy:CreateMover(frame, xConfig, yConfig, name, points, width, height, xOffset, yOffset) - if not frame.mover then - frame.mover = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate") - frame.mover:SetFrameStrata("DIALOG") - frame.mover:SetPoint(points[1], frame, points[2], xOffset or 0, yOffset or 0) - frame.mover:SetHeight(height or frame:GetHeight()) - frame.mover:SetWidth(width or frame:GetWidth()) - - local backdrop = { - bgFile = "Interface/Tooltips/UI-Tooltip-Background", - edgeFile = "", - tile = true, tileSize = 16, edgeSize = 10, - insets = {left = 0, right = 0, top = 0, bottom = 0} - } - frame.mover:SetBackdrop(backdrop) - frame.mover:SetBackdropColor(0,1,0,0.5) - frame.mover.border = CreateFrame("Frame", nil, frame.mover, BackdropTemplateMixin and "BackdropTemplate") - frame.mover.border:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = 2 }) - frame.mover.border:SetAllPoints(frame.mover) - frame.mover.border:SetBackdropBorderColor(0,1,0,1) - - frame.mover.text = frame.mover.border:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") - frame.mover.text:SetText(name) - frame.mover.text:SetPoint("CENTER") - - frame.mover:SetMovable(true) - frame.mover:EnableMouse(true) - - frame.mover:SetScript("OnMouseDown", function(self) - self.point = { frame:GetPoint() } - self.start = { frame:GetCenter() } - frame:StartMoving() - self:StartMoving() - end) - frame.mover:SetScript("OnMouseUp", function(self) - frame:StopMovingOrSizing() - self:StopMovingOrSizing() - self.stop = { frame:GetCenter() } - local diffX = math_abs(self.start[1] - self.stop[1]) - diffX = self.start[1] > self.stop[1] and -diffX or diffX - local diffY = math_abs(self.start[2] - self.stop[2]) - diffY = self.start[2] > self.stop[2] and -diffY or diffY - frame:ClearAllPoints() - frame:SetPoint(self.point[1], self.point[2], self.point[3], self.point[4] + diffX, self.point[5] + diffY) - Gladdy.db[xConfig] = self.point[4] + diffX - Gladdy.db[yConfig] = self.point[5] + diffY - LibStub("AceConfigRegistry-3.0"):NotifyChange("Gladdy") - Gladdy:UpdateFrame() - end) - else - frame.mover:ClearAllPoints() - frame.mover:SetPoint(points[1], frame, points[2], xOffset or 0, yOffset or 0) - frame.mover:SetHeight(height or frame:GetHeight()) - frame.mover:SetWidth(width or frame:GetWidth()) - end - if self.frame and self.frame.testing then - frame.mover:Show() - else - frame.mover:Hide() - end -end - --------------------------- -- INIT @@ -310,7 +250,7 @@ function Gladdy:OnInitialize() self.dbi = LibStub("AceDB-3.0"):New("GladdyXZ", self.defaults) self.dbi.RegisterCallback(self, "OnProfileChanged", "OnProfileChanged") self.dbi.RegisterCallback(self, "OnProfileCopied", "OnProfileChanged") - self.dbi.RegisterCallback(self, "OnProfileReset", "OnProfileChanged") + self.dbi.RegisterCallback(self, "OnProfileReset", "OnProfileReset") self.db = self.dbi.profile self.LSM = LibStub("LibSharedMedia-3.0") @@ -347,18 +287,32 @@ function Gladdy:OnInitialize() for _, module in self:IterModules() do self:Call(module, "Initialize") -- B.E > A.E :D end - self:DeleteUnknownOptions(self.db, self.defaults.profile) if Gladdy.db.hideBlizzard == "always" then Gladdy:BlizzArenaSetAlpha(0) end + if not self.db.newLayout then + self:ToggleFrame(3) + self:HideFrame() + end +end + +function Gladdy:OnProfileReset() + self.db = self.dbi.profile + Gladdy:Debug("INFO", "OnProfileReset") + self:HideFrame() + self:ToggleFrame(3) + Gladdy.options.args.lock.name = Gladdy.db.locked and L["Unlock frame"] or L["Lock frame"] + Gladdy.options.args.showMover.name = Gladdy.db.showMover and L["Hide Mover"] or L["Show Mover"] + LibStub("AceConfigRegistry-3.0"):NotifyChange("Gladdy") end function Gladdy:OnProfileChanged() self.db = self.dbi.profile - self:DeleteUnknownOptions(self.db, self.defaults.profile) - self:HideFrame() self:ToggleFrame(3) + Gladdy.options.args.lock.name = Gladdy.db.locked and L["Unlock frame"] or L["Lock frame"] + Gladdy.options.args.showMover.name = Gladdy.db.showMover and L["Hide Mover"] or L["Show Mover"] + LibStub("AceConfigRegistry-3.0"):NotifyChange("Gladdy") end function Gladdy:OnEnable() diff --git a/Modules/BuffsDebuffs.lua b/Modules/BuffsDebuffs.lua index 0590c9c..81ff806 100644 --- a/Modules/BuffsDebuffs.lua +++ b/Modules/BuffsDebuffs.lua @@ -31,11 +31,9 @@ local BuffsDebuffs = Gladdy:NewModule("Buffs and Debuffs", nil, { buffsFontScale = 1, buffsFontColor = {r = 1, g = 1, b = 0, a = 1}, buffsDynamicColor = true, - buffsCooldownPos = "TOP", buffsCooldownGrowDirection = "RIGHT", buffsXOffset = 0, buffsYOffset = 0, - buffsBuffsCooldownPos = "BOTTOM", buffsBuffsCooldownGrowDirection = "RIGHT", buffsBuffsXOffset = 0, buffsBuffsYOffset = 0, @@ -51,7 +49,7 @@ local BuffsDebuffs = Gladdy:NewModule("Buffs and Debuffs", nil, { buffsBorderColorImmune = Gladdy:GetAuraTypeColor()["immune"], buffsBorderColorDisease = Gladdy:GetAuraTypeColor()["disease"], buffsBorderColorForm = Gladdy:GetAuraTypeColor()["form"], - buffsBorderColorAura = Gladdy:GetAuraTypeColor()["aura"] + buffsBorderColorAura = Gladdy:GetAuraTypeColor()["aura"], }) local spellSchoolToOptionValueTable @@ -233,18 +231,15 @@ end --------------------------- function BuffsDebuffs:CreateFrame(unit) - local verticalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding local debuffFrame = CreateFrame("Frame", "GladdyDebuffs" .. unit, Gladdy.buttons[unit]) debuffFrame:SetMovable(true) debuffFrame:SetHeight(Gladdy.db.buffsIconSize) debuffFrame:SetWidth(1) - debuffFrame:SetPoint("BOTTOMLEFT", Gladdy.buttons[unit].healthBar, "TOPLEFT", 0, verticalMargin) debuffFrame.unit = unit local buffFrame = CreateFrame("Frame", "GladdyBuffs" .. unit, Gladdy.buttons[unit]) buffFrame:SetMovable(true) buffFrame:SetHeight(Gladdy.db.buffsIconSize) buffFrame:SetWidth(1) - buffFrame:SetPoint("BOTTOMLEFT", Gladdy.buttons[unit].healthBar, "TOPLEFT", 0, verticalMargin) buffFrame.unit = unit self.frames[unit] = {} self.frames[unit].buffFrame = buffFrame @@ -285,156 +280,30 @@ local function styleIcon(aura, auraType) end function BuffsDebuffs:UpdateFrame(unit) - self.frames[unit].debuffFrame:SetHeight(Gladdy.db.buffsIconSize) - self.frames[unit].debuffFrame:ClearAllPoints() - --DEBUFFS - local powerBarHeight = Gladdy.db.powerBarEnabled and (Gladdy.db.powerBarHeight + 1) or 0 - local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) - local verticalMargin = -(Gladdy.db.powerBarHeight)/2 - if Gladdy.db.buffsCooldownPos == "TOP" then - verticalMargin = horizontalMargin + 1 - if Gladdy.db.cooldownYPos == "TOP" and Gladdy.db.cooldown then - verticalMargin = verticalMargin + Gladdy.db.cooldownSize - end - if Gladdy.db.buffsCooldownGrowDirection == "LEFT" then - self.frames[unit].debuffFrame:SetPoint("BOTTOMLEFT", Gladdy.buttons[unit].healthBar, "TOPRIGHT", Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset + verticalMargin) - else - self.frames[unit].debuffFrame:SetPoint("BOTTOMRIGHT", Gladdy.buttons[unit].healthBar, "TOPLEFT", Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset + verticalMargin) - end - elseif Gladdy.db.buffsCooldownPos == "BOTTOM" then - verticalMargin = horizontalMargin + 1 - if Gladdy.db.cooldownYPos == "BOTTOM" and Gladdy.db.cooldown then - verticalMargin = verticalMargin + Gladdy.db.cooldownSize - end - if Gladdy.db.buffsCooldownGrowDirection == "LEFT" then - self.frames[unit].debuffFrame:SetPoint("TOPLEFT", Gladdy.buttons[unit].healthBar, "BOTTOMRIGHT", Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset -verticalMargin - powerBarHeight) - else - self.frames[unit].debuffFrame:SetPoint("TOPRIGHT", Gladdy.buttons[unit].healthBar, "BOTTOMLEFT", Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset -verticalMargin - powerBarHeight) - end - elseif Gladdy.db.buffsCooldownPos == "LEFT" then - horizontalMargin = horizontalMargin - 1 + Gladdy.db.padding - local anchor = Gladdy:GetAnchor(unit, "LEFT") - if anchor == Gladdy.buttons[unit].healthBar then - self.frames[unit].debuffFrame:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin + Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset) - else - self.frames[unit].debuffFrame:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding + Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset) - end - - elseif Gladdy.db.buffsCooldownPos == "RIGHT" then - horizontalMargin = horizontalMargin - 1 + Gladdy.db.padding - local anchor = Gladdy:GetAnchor(unit, "RIGHT") - if anchor == Gladdy.buttons[unit].healthBar then - self.frames[unit].debuffFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset) - else - self.frames[unit].debuffFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset) - end - end + self.frames[unit].debuffFrame:SetHeight(Gladdy.db.buffsIconSize) + Gladdy:SetPosition(self.frames[unit].debuffFrame, unit, "buffsXOffset", "buffsYOffset", BuffsDebuffs:LegacySetPositionDebuffs(unit), BuffsDebuffs) if (unit == "arena1") then Gladdy:CreateMover(self.frames[unit].debuffFrame, "buffsXOffset", "buffsYOffset", L["Debuffs"], - Gladdy.db.buffsCooldownGrowDirection == "LEFT" and {"TOPRIGHT", "TOPRIGHT"} or {"TOPLEFT", "TOPLEFT"}, + {"TOPRIGHT", "TOPRIGHT"}, Gladdy.db.buffsIconSize * Gladdy.db.buffsWidthFactor, - Gladdy.db.buffsIconSize, Gladdy.db.buffsCooldownGrowDirection == "LEFT"and -1 or 1, 0) + Gladdy.db.buffsIconSize, 0, 0) + if not Gladdy.db.buffsEnabled then + self.frames[unit].debuffFrame.mover:Hide() + end end --BUFFS self.frames[unit].buffFrame:SetHeight(Gladdy.db.buffsBuffsIconSize) - self.frames[unit].buffFrame:ClearAllPoints() - horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) - verticalMargin = -(Gladdy.db.powerBarHeight)/2 - if Gladdy.db.buffsBuffsCooldownPos == "TOP" then - verticalMargin = horizontalMargin + 1 - if Gladdy.db.cooldownYPos == "TOP" and Gladdy.db.cooldown then - verticalMargin = verticalMargin + Gladdy.db.cooldownSize - end - if Gladdy.db.buffsBuffsCooldownGrowDirection == "LEFT" then - self.frames[unit].buffFrame:SetPoint("BOTTOMLEFT", Gladdy.buttons[unit].healthBar, "TOPRIGHT", Gladdy.db.buffsXOffset, Gladdy.db.buffsBuffsYOffset + verticalMargin) - else - self.frames[unit].buffFrame:SetPoint("BOTTOMRIGHT", Gladdy.buttons[unit].healthBar, "TOPLEFT", Gladdy.db.buffsXOffset, Gladdy.db.buffsBuffsYOffset + verticalMargin) - end - elseif Gladdy.db.buffsBuffsCooldownPos == "BOTTOM" then - verticalMargin = horizontalMargin + 1 - if Gladdy.db.cooldownYPos == "BOTTOM" and Gladdy.db.cooldown then - verticalMargin = verticalMargin + Gladdy.db.cooldownSize - end - if Gladdy.db.buffsBuffsCooldownGrowDirection == "LEFT" then - self.frames[unit].buffFrame:SetPoint("TOPLEFT", Gladdy.buttons[unit].healthBar, "BOTTOMRIGHT", Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset -verticalMargin - powerBarHeight) - else - self.frames[unit].buffFrame:SetPoint("TOPRIGHT", Gladdy.buttons[unit].healthBar, "BOTTOMLEFT", Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset -verticalMargin - powerBarHeight) - end - elseif Gladdy.db.buffsBuffsCooldownPos == "LEFT" then - horizontalMargin = horizontalMargin - 1 + Gladdy.db.padding - if (Gladdy.db.trinketPos == "LEFT" and Gladdy.db.trinketEnabled) then - horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding - if (Gladdy.db.classIconPos == "LEFT") then - horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding - end - elseif (Gladdy.db.classIconPos == "LEFT") then - horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding - if (Gladdy.db.trinketPos == "LEFT" and Gladdy.db.trinketEnabled) then - horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding - end - end - if (Gladdy.db.drCooldownPos == "LEFT" and Gladdy.db.drEnabled) then - verticalMargin = verticalMargin + Gladdy.db.drIconSize/2 + Gladdy.db.padding/2 - end - if (Gladdy.db.castBarPos == "LEFT") then - verticalMargin = verticalMargin - - (((Gladdy.db.castBarHeight < Gladdy.db.castBarIconSize) and Gladdy.db.castBarIconSize - or Gladdy.db.castBarHeight)/2 + Gladdy.db.padding/2) - end - if (Gladdy.db.cooldownYPos == "LEFT" and Gladdy.db.cooldown) then - verticalMargin = verticalMargin + (Gladdy.db.buffsBuffsIconSize/2 + Gladdy.db.padding/2) - end - --self.frames[unit].buffFrame:SetPoint("RIGHT", Gladdy.buttons[unit].healthBar, "LEFT", -horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset + verticalMargin) - - local anchor = Gladdy:GetAnchor(unit, "LEFT") - horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) - 1 + Gladdy.db.padding - if anchor == Gladdy.buttons[unit].healthBar then - self.frames[unit].buffFrame:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset) - else - self.frames[unit].buffFrame:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset) - end - - elseif Gladdy.db.buffsBuffsCooldownPos == "RIGHT" then - horizontalMargin = horizontalMargin - 1 + Gladdy.db.padding - if (Gladdy.db.trinketPos == "RIGHT" and Gladdy.db.trinketEnabled) then - horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding - if (Gladdy.db.classIconPos == "RIGHT") then - horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding - end - elseif (Gladdy.db.classIconPos == "RIGHT") then - horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding - if (Gladdy.db.trinketPos == "RIGHT" and Gladdy.db.trinketEnabled) then - horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding - end - end - if (Gladdy.db.drCooldownPos == "RIGHT" and Gladdy.db.drEnabled) then - verticalMargin = verticalMargin + Gladdy.db.drIconSize/2 + Gladdy.db.padding/2 - end - if (Gladdy.db.castBarPos == "RIGHT") then - verticalMargin = verticalMargin - - (((Gladdy.db.castBarHeight < Gladdy.db.castBarIconSize) and Gladdy.db.castBarIconSize - or Gladdy.db.castBarHeight)/2 + Gladdy.db.padding/2) - end - if (Gladdy.db.cooldownYPos == "RIGHT" and Gladdy.db.cooldown) then - verticalMargin = verticalMargin + (Gladdy.db.buffsBuffsIconSize/2 + Gladdy.db.padding/2) - end - --self.frames[unit].buffFrame:SetPoint("LEFT", Gladdy.buttons[unit].healthBar, "RIGHT", horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset + verticalMargin) - - local anchor = Gladdy:GetAnchor(unit, "RIGHT") - horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) - 1 + Gladdy.db.padding - if anchor == Gladdy.buttons[unit].healthBar then - self.frames[unit].buffFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset) - else - self.frames[unit].buffFrame:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset) - end - end + Gladdy:SetPosition(self.frames[unit].buffFrame, unit, "buffsBuffsXOffset", "buffsBuffsYOffset", BuffsDebuffs:LegacySetPositionBuffs(unit), BuffsDebuffs) if (unit == "arena1") then Gladdy:CreateMover(self.frames[unit].buffFrame, "buffsBuffsXOffset", "buffsBuffsYOffset", L["Buffs"], - Gladdy.db.buffsBuffsCooldownGrowDirection == "LEFT" and {"TOPRIGHT", "TOPRIGHT"} or {"TOPLEFT", "TOPLEFT"}, + {"TOPRIGHT", "TOPRIGHT"}, Gladdy.db.buffsBuffsIconSize * Gladdy.db.buffsBuffsWidthFactor, - Gladdy.db.buffsBuffsIconSize, Gladdy.db.buffsBuffsCooldownGrowDirection == "LEFT"and -1 or 1, 0) + Gladdy.db.buffsBuffsIconSize, 0, 0) + if not Gladdy.db.buffsEnabled then + self.frames[unit].buffFrame.mover:Hide() + end end for i=1, #self.frames[unit].auras[AURA_TYPE_BUFF] do @@ -456,13 +325,8 @@ end function BuffsDebuffs:UpdateAurasOnUnit(unit) for i=1, #self.frames[unit].auras[AURA_TYPE_BUFF] do if i == 1 then - if Gladdy.db.buffsBuffsCooldownGrowDirection == "LEFT" then - self.frames[unit].auras[AURA_TYPE_BUFF][i]:ClearAllPoints() - self.frames[unit].auras[AURA_TYPE_BUFF][i]:SetPoint("RIGHT", self.frames[unit].buffFrame, "LEFT") - else - self.frames[unit].auras[AURA_TYPE_BUFF][i]:ClearAllPoints() - self.frames[unit].auras[AURA_TYPE_BUFF][i]:SetPoint("LEFT", self.frames[unit].buffFrame, "RIGHT") - end + self.frames[unit].auras[AURA_TYPE_BUFF][i]:ClearAllPoints() + self.frames[unit].auras[AURA_TYPE_BUFF][i]:SetPoint("RIGHT", self.frames[unit].buffFrame, "LEFT") else if Gladdy.db.buffsBuffsCooldownGrowDirection == "LEFT" then self.frames[unit].auras[AURA_TYPE_BUFF][i]:ClearAllPoints() @@ -475,13 +339,8 @@ function BuffsDebuffs:UpdateAurasOnUnit(unit) end for i=1, #self.frames[unit].auras[AURA_TYPE_DEBUFF] do if i == 1 then - if Gladdy.db.buffsCooldownGrowDirection == "LEFT" then - self.frames[unit].auras[AURA_TYPE_DEBUFF][i]:ClearAllPoints() - self.frames[unit].auras[AURA_TYPE_DEBUFF][i]:SetPoint("RIGHT", self.frames[unit].debuffFrame, "LEFT") - else - self.frames[unit].auras[AURA_TYPE_DEBUFF][i]:ClearAllPoints() - self.frames[unit].auras[AURA_TYPE_DEBUFF][i]:SetPoint("LEFT", self.frames[unit].debuffFrame, "RIGHT") - end + self.frames[unit].auras[AURA_TYPE_DEBUFF][i]:ClearAllPoints() + self.frames[unit].auras[AURA_TYPE_DEBUFF][i]:SetPoint("RIGHT", self.frames[unit].debuffFrame, "LEFT") else if Gladdy.db.buffsCooldownGrowDirection == "LEFT" then self.frames[unit].auras[AURA_TYPE_DEBUFF][i]:ClearAllPoints() @@ -602,36 +461,6 @@ end -- OPTIONS ------------ -local function option(params) - local defaults = { - get = function(info) - local key = info.arg or info[#info] - return Gladdy.dbi.profile[key] - end, - set = function(info, value) - local key = info.arg or info[#info] - Gladdy.dbi.profile[key] = value - if Gladdy.db.buffsCooldownPos == "LEFT" then - Gladdy.db.buffsCooldownGrowDirection = "LEFT" - elseif Gladdy.db.buffsCooldownPos == "RIGHT" then - Gladdy.db.buffsCooldownGrowDirection = "RIGHT" - end - if Gladdy.db.buffsBuffsCooldownPos == "LEFT" then - Gladdy.db.buffsBuffsCooldownGrowDirection = "LEFT" - elseif Gladdy.db.buffsBuffsCooldownPos == "RIGHT" then - Gladdy.db.buffsBuffsCooldownGrowDirection = "RIGHT" - end - Gladdy:UpdateFrame() - end, - } - - for k, v in pairs(params) do - defaults[k] = v - end - - return defaults -end - function BuffsDebuffs:GetOptions() return { headerBuffs = { @@ -714,18 +543,6 @@ function BuffsDebuffs:GetOptions() name = L["Position"], order = 5, }, - buffsBuffsCooldownPos = option({ - type = "select", - name = L["Aura Position"], - desc = L["Position of the aura icons"], - order = 21, - values = { - ["TOP"] = L["Top"], - ["BOTTOM"] = L["Bottom"], - ["LEFT"] = L["Left"], - ["RIGHT"] = L["Right"], - }, - }), buffsBuffsCooldownGrowDirection = Gladdy:option({ type = "select", name = L["Grow Direction"], @@ -836,18 +653,6 @@ function BuffsDebuffs:GetOptions() name = L["Position"], order = 5, }, - buffsCooldownPos = option({ - type = "select", - name = L["Aura Position"], - desc = L["Position of the aura icons"], - order = 21, - values = { - ["TOP"] = L["Top"], - ["BOTTOM"] = L["Bottom"], - ["LEFT"] = L["Left"], - ["RIGHT"] = L["Right"], - }, - }), buffsCooldownGrowDirection = Gladdy:option({ type = "select", name = L["Grow Direction"], @@ -1108,3 +913,168 @@ function BuffsDebuffs:GetOptions() } end +--------------------------- + +-- LAGACY HANDLER + +--------------------------- + +function BuffsDebuffs:LegacySetPositionDebuffs(unit) + if Gladdy.db.newLayout then + return Gladdy.db.newLayout + end + self.frames[unit].debuffFrame:ClearAllPoints() + local powerBarHeight = Gladdy.db.powerBarEnabled and (Gladdy.db.powerBarHeight + 1) or 0 + local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + local verticalMargin = -(Gladdy.db.powerBarHeight)/2 + local offset = 0 + if (Gladdy.db.buffsCooldownGrowDirection == "RIGHT") then + offset = Gladdy.db.buffsIconSize * Gladdy.db.buffsWidthFactor + end + local pos = Gladdy.db.buffsCooldownPos + + if pos == "TOP" then + verticalMargin = horizontalMargin + 1 + if Gladdy.db.cooldownYPos == "TOP" and Gladdy.db.cooldown then + verticalMargin = verticalMargin + Gladdy.db.cooldownSize + end + if Gladdy.db.buffsCooldownGrowDirection == "LEFT" then + self.frames[unit].debuffFrame:SetPoint("BOTTOMLEFT", Gladdy.buttons[unit].healthBar, "TOPRIGHT", Gladdy.db.buffsXOffset + offset, Gladdy.db.buffsYOffset + verticalMargin) + else + self.frames[unit].debuffFrame:SetPoint("BOTTOMRIGHT", Gladdy.buttons[unit].healthBar, "TOPLEFT", Gladdy.db.buffsXOffset + offset, Gladdy.db.buffsYOffset + verticalMargin) + end + elseif pos == "BOTTOM" then + verticalMargin = horizontalMargin + 1 + if Gladdy.db.cooldownYPos == "BOTTOM" and Gladdy.db.cooldown then + verticalMargin = verticalMargin + Gladdy.db.cooldownSize + end + if Gladdy.db.buffsCooldownGrowDirection == "LEFT" then + self.frames[unit].debuffFrame:SetPoint("TOPLEFT", Gladdy.buttons[unit].healthBar, "BOTTOMRIGHT", Gladdy.db.buffsXOffset + offset, Gladdy.db.buffsYOffset -verticalMargin - powerBarHeight) + else + self.frames[unit].debuffFrame:SetPoint("TOPRIGHT", Gladdy.buttons[unit].healthBar, "BOTTOMLEFT", Gladdy.db.buffsXOffset + offset, Gladdy.db.buffsYOffset -verticalMargin - powerBarHeight) + end + elseif pos == "LEFT" then + horizontalMargin = horizontalMargin - 1 + Gladdy.db.padding + local anchor = Gladdy:GetAnchor(unit, "LEFT") + if anchor == Gladdy.buttons[unit].healthBar then + self.frames[unit].debuffFrame:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin + Gladdy.db.buffsXOffset + offset, Gladdy.db.buffsYOffset) + else + self.frames[unit].debuffFrame:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding + Gladdy.db.buffsXOffset + offset, Gladdy.db.buffsYOffset) + end + elseif pos == "RIGHT" then + horizontalMargin = horizontalMargin - 1 + Gladdy.db.padding + local anchor = Gladdy:GetAnchor(unit, "RIGHT") + if anchor == Gladdy.buttons[unit].healthBar then + self.frames[unit].debuffFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.buffsXOffset + offset, Gladdy.db.buffsYOffset) + else + self.frames[unit].debuffFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.buffsXOffset + offset, Gladdy.db.buffsYOffset) + end + end + return Gladdy.db.newLayout +end + +function BuffsDebuffs:LegacySetPositionBuffs(unit) + if Gladdy.db.newLayout then + return Gladdy.db.newLayout + end + self.frames[unit].buffFrame:ClearAllPoints() + local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + local verticalMargin = -(Gladdy.db.powerBarHeight)/2 + local powerBarHeight = Gladdy.db.powerBarEnabled and (Gladdy.db.powerBarHeight + 1) or 0 + local offset = 0 + if (Gladdy.db.buffsBuffsCooldownGrowDirection == "RIGHT") then + offset = Gladdy.db.buffsBuffsIconSize * Gladdy.db.buffsBuffsWidthFactor + end + + local pos = Gladdy.db.buffsBuffsCooldownPos + + if pos == "TOP" then + verticalMargin = horizontalMargin + 1 + if Gladdy.db.cooldownYPos == "TOP" and Gladdy.db.cooldown then + verticalMargin = verticalMargin + Gladdy.db.cooldownSize + end + if Gladdy.db.buffsBuffsCooldownGrowDirection == "LEFT" then + self.frames[unit].buffFrame:SetPoint("BOTTOMLEFT", Gladdy.buttons[unit].healthBar, "TOPRIGHT", Gladdy.db.buffsXOffset + offset, Gladdy.db.buffsBuffsYOffset + verticalMargin) + else + self.frames[unit].buffFrame:SetPoint("BOTTOMRIGHT", Gladdy.buttons[unit].healthBar, "TOPLEFT", Gladdy.db.buffsXOffset + offset, Gladdy.db.buffsBuffsYOffset + verticalMargin) + end + elseif pos == "BOTTOM" then + verticalMargin = horizontalMargin + 1 + if Gladdy.db.cooldownYPos == "BOTTOM" and Gladdy.db.cooldown then + verticalMargin = verticalMargin + Gladdy.db.cooldownSize + end + if Gladdy.db.buffsBuffsCooldownGrowDirection == "LEFT" then + self.frames[unit].buffFrame:SetPoint("TOPLEFT", Gladdy.buttons[unit].healthBar, "BOTTOMRIGHT", Gladdy.db.buffsBuffsXOffset + offset, Gladdy.db.buffsBuffsYOffset -verticalMargin - powerBarHeight) + else + self.frames[unit].buffFrame:SetPoint("TOPRIGHT", Gladdy.buttons[unit].healthBar, "BOTTOMLEFT", Gladdy.db.buffsBuffsXOffset + offset, Gladdy.db.buffsBuffsYOffset -verticalMargin - powerBarHeight) + end + elseif pos == "LEFT" then + horizontalMargin = horizontalMargin - 1 + Gladdy.db.padding + if (Gladdy.db.trinketPos == "LEFT" and Gladdy.db.trinketEnabled) then + horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding + if (Gladdy.db.classIconPos == "LEFT") then + horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding + end + elseif (Gladdy.db.classIconPos == "LEFT") then + horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding + if (Gladdy.db.trinketPos == "LEFT" and Gladdy.db.trinketEnabled) then + horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding + end + end + if (Gladdy.db.drCooldownPos == "LEFT" and Gladdy.db.drEnabled) then + verticalMargin = verticalMargin + Gladdy.db.drIconSize/2 + Gladdy.db.padding/2 + end + if (Gladdy.db.castBarPos == "LEFT") then + verticalMargin = verticalMargin - + (((Gladdy.db.castBarHeight < Gladdy.db.castBarIconSize) and Gladdy.db.castBarIconSize + or Gladdy.db.castBarHeight)/2 + Gladdy.db.padding/2) + end + if (Gladdy.db.cooldownYPos == "LEFT" and Gladdy.db.cooldown) then + verticalMargin = verticalMargin + (Gladdy.db.buffsBuffsIconSize/2 + Gladdy.db.padding/2) + end + --self.frames[unit].buffFrame:SetPoint("RIGHT", Gladdy.buttons[unit].healthBar, "LEFT", -horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset + verticalMargin) + + local anchor = Gladdy:GetAnchor(unit, "LEFT") + horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) - 1 + Gladdy.db.padding + if anchor == Gladdy.buttons[unit].healthBar then + self.frames[unit].buffFrame:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin + Gladdy.db.buffsBuffsXOffset + offset, Gladdy.db.buffsBuffsYOffset) + else + self.frames[unit].buffFrame:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding + Gladdy.db.buffsBuffsXOffset + offset, Gladdy.db.buffsBuffsYOffset) + end + + elseif pos == "RIGHT" then + horizontalMargin = horizontalMargin - 1 + Gladdy.db.padding + if (Gladdy.db.trinketPos == "RIGHT" and Gladdy.db.trinketEnabled) then + horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding + if (Gladdy.db.classIconPos == "RIGHT") then + horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding + end + elseif (Gladdy.db.classIconPos == "RIGHT") then + horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding + if (Gladdy.db.trinketPos == "RIGHT" and Gladdy.db.trinketEnabled) then + horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding + end + end + if (Gladdy.db.drCooldownPos == "RIGHT" and Gladdy.db.drEnabled) then + verticalMargin = verticalMargin + Gladdy.db.drIconSize/2 + Gladdy.db.padding/2 + end + if (Gladdy.db.castBarPos == "RIGHT") then + verticalMargin = verticalMargin - + (((Gladdy.db.castBarHeight < Gladdy.db.castBarIconSize) and Gladdy.db.castBarIconSize + or Gladdy.db.castBarHeight)/2 + Gladdy.db.padding/2) + end + if (Gladdy.db.cooldownYPos == "RIGHT" and Gladdy.db.cooldown) then + verticalMargin = verticalMargin + (Gladdy.db.buffsBuffsIconSize/2 + Gladdy.db.padding/2) + end + --self.frames[unit].buffFrame:SetPoint("LEFT", Gladdy.buttons[unit].healthBar, "RIGHT", horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset + verticalMargin) + + local anchor = Gladdy:GetAnchor(unit, "RIGHT") + horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) - 1 + Gladdy.db.padding + if anchor == Gladdy.buttons[unit].healthBar then + self.frames[unit].buffFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.buffsBuffsXOffset + offset, Gladdy.db.buffsBuffsYOffset) + else + self.frames[unit].buffFrame:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + Gladdy.db.buffsBuffsXOffset + offset, Gladdy.db.buffsBuffsYOffset) + end + end + return Gladdy.db.newLayout +end \ No newline at end of file diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 4717563..1eb5b70 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -34,7 +34,6 @@ local Castbar = Gladdy:NewModule("Cast Bar", 70, { castBarBorderColor = { r = 0, g = 0, b = 0, a = 1 }, castBarFontColor = { r = 1, g = 1, b = 1, a = 1 }, castBarGuesses = true, - castBarPos = "LEFT", castBarXOffset = 0, castBarYOffset = 0, castBarIconPos = "LEFT", @@ -57,15 +56,17 @@ end --------------------------- function Castbar:CreateFrame(unit) - local castBar = CreateFrame("Frame", nil, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate") + local castBar = CreateFrame("Frame", nil, Gladdy.buttons[unit]) castBar:EnableMouse(false) castBar:SetMovable(true) castBar.unit = unit - castBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "castBarBorderStyle"), + castBar.backdrop = CreateFrame("Frame", nil, castBar, BackdropTemplateMixin and "BackdropTemplate") + castBar.backdrop:SetAllPoints(castBar) + castBar.backdrop:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "castBarBorderStyle"), edgeSize = Gladdy.db.castBarBorderSize }) - castBar:SetBackdropBorderColor(Gladdy.db.castBarBorderColor.r, Gladdy.db.castBarBorderColor.g, Gladdy.db.castBarBorderColor.b, Gladdy.db.castBarBorderColor.a) - castBar:SetFrameLevel(1) + castBar.backdrop:SetBackdropBorderColor(Gladdy.db.castBarBorderColor.r, Gladdy.db.castBarBorderColor.g, Gladdy.db.castBarBorderColor.b, Gladdy.db.castBarBorderColor.a) + castBar.backdrop:SetFrameLevel(1) castBar.bar = CreateFrame("StatusBar", nil, castBar) castBar.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "castBarTexture")) @@ -130,9 +131,9 @@ function Castbar:UpdateFrame(unit) castBar:SetWidth(Gladdy.db.castBarWidth) castBar:SetHeight(Gladdy.db.castBarHeight) - castBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "castBarBorderStyle"), + castBar.backdrop:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "castBarBorderStyle"), edgeSize = Gladdy.db.castBarBorderSize }) - castBar:SetBackdropBorderColor(Gladdy.db.castBarBorderColor.r, Gladdy.db.castBarBorderColor.g, Gladdy.db.castBarBorderColor.b, Gladdy.db.castBarBorderColor.a) + castBar.backdrop:SetBackdropBorderColor(Gladdy.db.castBarBorderColor.r, Gladdy.db.castBarBorderColor.g, Gladdy.db.castBarBorderColor.b, Gladdy.db.castBarBorderColor.a) castBar.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "castBarTexture")) castBar.bar:ClearAllPoints() @@ -165,24 +166,7 @@ function Castbar:UpdateFrame(unit) leftMargin = Gladdy.db.castBarIconSize + 1 end - castBar:ClearAllPoints() - local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding - if (Gladdy.db.castBarPos == "LEFT") then - local anchor = Gladdy:GetAnchor(unit, "LEFT") - if anchor == Gladdy.buttons[unit].healthBar then - castBar:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin - leftMargin + Gladdy.db.castBarXOffset, Gladdy.db.castBarYOffset) - else - castBar:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding - leftMargin + Gladdy.db.castBarXOffset, Gladdy.db.castBarYOffset) - end - end - if (Gladdy.db.castBarPos == "RIGHT") then - local anchor = Gladdy:GetAnchor(unit, "RIGHT") - if anchor == Gladdy.buttons[unit].healthBar then - castBar:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + rightMargin + Gladdy.db.castBarXOffset, Gladdy.db.castBarYOffset) - else - castBar:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + rightMargin + Gladdy.db.castBarXOffset, Gladdy.db.castBarYOffset) - end - end + Gladdy:SetPosition(castBar, unit, "castBarXOffset", "castBarYOffset", Castbar:LegacySetPosition(castBar, unit, leftMargin, rightMargin), Castbar) castBar.spellText:SetFont(Gladdy:SMFetch("font", "castBarFont"), Gladdy.db.castBarFontSize) castBar.spellText:SetTextColor(Gladdy.db.castBarFontColor.r, Gladdy.db.castBarFontColor.g, Gladdy.db.castBarFontColor.b, Gladdy.db.castBarFontColor.a) @@ -410,7 +394,10 @@ function Castbar:CAST_START(unit, spell, icon, value, maxValue, test) castBar.spellText:SetText(spell) castBar.timeText:SetText(maxValue) castBar.bg:Show() - castBar:Show() + castBar.backdrop:Show() + if Gladdy.db.castBarSparkEnabled then + castBar.spark:Show() + end castBar:SetAlpha(1) castBar.icon:Show() end @@ -430,7 +417,8 @@ function Castbar:CAST_STOP(unit, ...) castBar.timeText:SetText("") castBar.bar:SetValue(0) castBar.bg:Hide() - castBar:Hide() + castBar.backdrop:Hide() + castBar.spark:Hide() castBar.icon:Hide() else castBar.bar:SetStatusBarColor(...) @@ -771,15 +759,6 @@ function Castbar:GetOptions() name = L["Position"], order = 1, }, - castBarPos = option({ - type = "select", - name = L["Castbar position"], - order = 2, - values = { - ["LEFT"] = L["Left"], - ["RIGHT"] = L["Right"], - }, - }), castBarIconPos = option( { type = "select", name = L["Icon position"], @@ -817,4 +796,35 @@ function Castbar:GetOptions() }, }, } +end + +--------------------------- + +-- LAGACY HANDLER + +--------------------------- + +function Castbar:LegacySetPosition(castBar, unit, leftMargin, rightMargin) + if Gladdy.db.newLayout then + return Gladdy.db.newLayout + end + castBar:ClearAllPoints() + local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding + if (Gladdy.db.castBarPos == "LEFT") then + local anchor = Gladdy:GetAnchor(unit, "LEFT") + if anchor == Gladdy.buttons[unit].healthBar then + castBar:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin - leftMargin + Gladdy.db.castBarXOffset, Gladdy.db.castBarYOffset) + else + castBar:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding - leftMargin + Gladdy.db.castBarXOffset, Gladdy.db.castBarYOffset) + end + end + if (Gladdy.db.castBarPos == "RIGHT") then + local anchor = Gladdy:GetAnchor(unit, "RIGHT") + if anchor == Gladdy.buttons[unit].healthBar then + castBar:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + rightMargin + Gladdy.db.castBarXOffset, Gladdy.db.castBarYOffset) + else + castBar:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + rightMargin + Gladdy.db.castBarXOffset, Gladdy.db.castBarYOffset) + end + end + return Gladdy.db.newLayout end \ No newline at end of file diff --git a/Modules/Classicon.lua b/Modules/Classicon.lua index 839b52f..8890d5b 100644 --- a/Modules/Classicon.lua +++ b/Modules/Classicon.lua @@ -4,13 +4,14 @@ local Gladdy = LibStub("Gladdy") local CreateFrame = CreateFrame local GetSpellInfo = GetSpellInfo local L = Gladdy.L -local Classicon = Gladdy:NewModule("Class Icon", 80, { - classIconPos = "LEFT", +local Classicon = Gladdy:NewModule("Class Icon", 81, { classIconSize = 60 + 20 + 1, classIconWidthFactor = 0.9, classIconBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp", classIconBorderColor = { r = 0, g = 0, b = 0, a = 1 }, classIconSpecIcon = false, + classIconXOffset = 0, + classIconYOffset = 0, }) local classIconPath = "Interface\\Addons\\Gladdy\\Images\\Classes\\" @@ -99,13 +100,6 @@ function Classicon:CreateFrame(unit) classIcon:SetFrameStrata("MEDIUM") classIcon:SetFrameLevel(2) - classIcon:ClearAllPoints() - if (Gladdy.db.classIconPos == "RIGHT") then - classIcon:SetPoint("TOPLEFT", Gladdy.buttons[unit].healthBar, "TOPRIGHT", 2, 2) - else - classIcon:SetPoint("TOPRIGHT", Gladdy.buttons[unit].healthBar, "TOPLEFT", -2, 2) - end - Gladdy.buttons[unit].classIcon = classIcon self.frames[unit] = classIcon end @@ -119,12 +113,15 @@ function Classicon:UpdateFrame(unit) classIcon:SetWidth(Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) classIcon:SetHeight(Gladdy.db.classIconSize) - classIcon:ClearAllPoints() - local margin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding - if (Gladdy.db.classIconPos == "LEFT") then - classIcon:SetPoint("TOPRIGHT", Gladdy.buttons[unit].healthBar, "TOPLEFT", -margin, 0) - else - classIcon:SetPoint("TOPLEFT", Gladdy.buttons[unit], "TOPRIGHT", margin, 0) + Gladdy:SetPosition(classIcon, unit, "classIconXOffset", "classIconYOffset", Classicon:LegacySetPosition(classIcon, unit), Classicon) + + if (unit == "arena1") then + Gladdy:CreateMover(classIcon, "classIconXOffset", "classIconYOffset", L["Class Icon"], + {"TOPLEFT", "TOPLEFT"}, + Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor, + Gladdy.db.classIconSize, + 0, + 0) end classIcon.texture:ClearAllPoints() @@ -278,4 +275,23 @@ function Classicon:GetOptions() }, }, } +end + +--------------------------- + +-- LAGACY HANDLER + +--------------------------- + +function Classicon:LegacySetPosition(classIcon, unit) + if Gladdy.db.newLayout then + return Gladdy.db.newLayout + end + classIcon:ClearAllPoints() + local margin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding + if (Gladdy.db.classIconPos == "LEFT") then + classIcon:SetPoint("TOPRIGHT", Gladdy.buttons[unit].healthBar, "TOPLEFT", -margin, 0) + else + classIcon:SetPoint("TOPLEFT", Gladdy.buttons[unit], "TOPRIGHT", margin, 0) + end end \ No newline at end of file diff --git a/Modules/CombatIndicator.lua b/Modules/CombatIndicator.lua index 91447ad..73a016d 100644 --- a/Modules/CombatIndicator.lua +++ b/Modules/CombatIndicator.lua @@ -1,7 +1,6 @@ local select = select local UnitExists, UnitAffectingCombat, GetSpellInfo = UnitExists, UnitAffectingCombat, GetSpellInfo local CreateFrame = CreateFrame -local ANCHORS = { ["LEFT"] = "RIGHT", ["RIGHT"] = "LEFT", ["BOTTOM"] = "TOP", ["TOP"] = "BOTTOM"} local Gladdy = LibStub("Gladdy") local L = Gladdy.L @@ -11,8 +10,6 @@ local CombatIndicator = Gladdy:NewModule("Combat Indicator", nil, { ciSize = 20, ciAlpha = 1, ciWidthFactor = 1, - ciAnchor = "healthBar", - ciPos = "TOP", ciXOffset = 0, ciYOffset = -31, ciBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp", @@ -68,8 +65,7 @@ function CombatIndicator:UpdateFrame(unit) ciFrame.border:SetTexture(Gladdy.db.ciBorderStyle) ciFrame.border:SetVertexColor(Gladdy.db.ciBorderColor.r, Gladdy.db.ciBorderColor.g, Gladdy.db.ciBorderColor.b, Gladdy.db.ciBorderColor.a) - ciFrame:ClearAllPoints() - ciFrame:SetPoint(ANCHORS[Gladdy.db.ciPos], Gladdy.buttons[unit][Gladdy.db.ciAnchor], Gladdy.db.ciPos, Gladdy.db.ciXOffset, Gladdy.db.ciYOffset) + Gladdy:SetPosition(ciFrame, unit, "ciXOffset", "ciYOffset", CombatIndicator:LegacySetPosition(ciFrame, unit), CombatIndicator) ciFrame:SetAlpha(Gladdy.db.ciAlpha) @@ -177,30 +173,6 @@ function CombatIndicator:GetOptions() name = L["Position"], order = 4, }, - ciAnchor = Gladdy:option({ - type = "select", - name = L["Anchor"], - desc = L["This changes the anchor of the ci icon"], - order = 20, - values = { - ["trinket"] = L["Trinket"], - ["classIcon"] = L["Class Icon"], - ["healthBar"] = L["Health Bar"], - ["powerBar"] = L["Power Bar"], - }, - }), - ciPos = Gladdy:option({ - type = "select", - name = L["Position"], - desc = L["This changes position relative to its anchor of the ci icon"], - order = 21, - values = { - ["LEFT"] = L["Left"], - ["RIGHT"] = L["Right"], - ["TOP"] = L["Top"], - ["BOTTOM"] = L["Bottom"], - }, - }), ciXOffset = Gladdy:option({ type = "range", name = L["Horizontal offset"], @@ -249,4 +221,24 @@ function CombatIndicator:GetOptions() }, }, } +end + +--------------------------- + +-- LAGACY HANDLER + +--------------------------- + +function CombatIndicator:LegacySetPosition(ciFrame, unit) + if Gladdy.db.newLayout then + return Gladdy.db.newLayout + end + -- LEGACY options + local ANCHORS = { ["LEFT"] = "RIGHT", ["RIGHT"] = "LEFT", ["BOTTOM"] = "TOP", ["TOP"] = "BOTTOM"} + local ciAnchor = Gladdy.db.ciAnchor or Gladdy.legacy.ciAnchor + local ciPos = Gladdy.db.ciPos + + ciFrame:ClearAllPoints() + ciFrame:SetPoint(ANCHORS[ciPos], Gladdy.buttons[unit][ciAnchor], ciPos, Gladdy.db.ciXOffset, Gladdy.db.ciYOffset) + return Gladdy.db.newLayout end \ No newline at end of file diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 0ce1594..f5803da 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -1,4 +1,4 @@ -local type, pairs, ceil, tonumber, mod, tostring, upper, select = type, pairs, ceil, tonumber, mod, tostring, string.upper, select +local type, pairs, ipairs, ceil, tonumber, mod, tostring, upper, select = type, pairs, ipairs, ceil, tonumber, mod, tostring, string.upper, select local GetTime = GetTime local CreateFrame = CreateFrame local RACE_ICON_TCOORDS = { @@ -54,8 +54,8 @@ local Cooldowns = Gladdy:NewModule("Cooldowns", nil, { cooldownFontScale = 1, cooldownFontColor = { r = 1, g = 1, b = 0, a = 1 }, cooldown = true, - cooldownYPos = "TOP", - cooldownXPos = "LEFT", + cooldownYGrowDirection = "UP", + cooldownXGrowDirection = "RIGHT", cooldownYOffset = 0, cooldownXOffset = 0, cooldownSize = 30, @@ -66,7 +66,7 @@ local Cooldowns = Gladdy:NewModule("Cooldowns", nil, { cooldownBorderColor = { r = 1, g = 1, b = 1, a = 1 }, cooldownDisableCircle = false, cooldownCooldownAlpha = 1, - cooldownCooldowns = getDefaultCooldown() + cooldownCooldowns = getDefaultCooldown(), }) function Cooldowns:Initialize() @@ -134,42 +134,15 @@ function Cooldowns:UpdateFrame(unit) local button = Gladdy.buttons[unit] -- Cooldown frame if (Gladdy.db.cooldown) then - button.spellCooldownFrame:ClearAllPoints() - local powerBarHeight = Gladdy.db.powerBarEnabled and (Gladdy.db.powerBarHeight + 1) or 0 - local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) - if Gladdy.db.cooldownYPos == "TOP" then - if Gladdy.db.cooldownXPos == "RIGHT" then - button.spellCooldownFrame:SetPoint("BOTTOMRIGHT", button.healthBar, "TOPRIGHT", Gladdy.db.cooldownXOffset, horizontalMargin + Gladdy.db.cooldownYOffset) - else - button.spellCooldownFrame:SetPoint("BOTTOMLEFT", button.healthBar, "TOPLEFT", Gladdy.db.cooldownXOffset, horizontalMargin + Gladdy.db.cooldownYOffset) - end - elseif Gladdy.db.cooldownYPos == "BOTTOM" then - if Gladdy.db.cooldownXPos == "RIGHT" then - button.spellCooldownFrame:SetPoint("TOPRIGHT", button.healthBar, "BOTTOMRIGHT", Gladdy.db.cooldownXOffset, -horizontalMargin + Gladdy.db.cooldownYOffset - powerBarHeight) - else - button.spellCooldownFrame:SetPoint("TOPLEFT", button.healthBar, "BOTTOMLEFT", Gladdy.db.cooldownXOffset, -horizontalMargin + Gladdy.db.cooldownYOffset - powerBarHeight) - end - elseif Gladdy.db.cooldownYPos == "LEFT" then - local anchor = Gladdy:GetAnchor(unit, "LEFT") - if anchor == Gladdy.buttons[unit].healthBar then - button.spellCooldownFrame:SetPoint("RIGHT", anchor, "LEFT", -(horizontalMargin + Gladdy.db.padding) + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset) - else - button.spellCooldownFrame:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset) - end - elseif Gladdy.db.cooldownYPos == "RIGHT" then - local anchor = Gladdy:GetAnchor(unit, "RIGHT") - if anchor == Gladdy.buttons[unit].healthBar then - button.spellCooldownFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.padding + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset) - else - button.spellCooldownFrame:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset) - end - end button.spellCooldownFrame:SetHeight(Gladdy.db.cooldownSize) button.spellCooldownFrame:SetWidth(1) button.spellCooldownFrame:Show() + + Gladdy:SetPosition(button.spellCooldownFrame, unit, "cooldownXOffset", "cooldownYOffset", Cooldowns:LegacySetPosition(button, unit), Cooldowns) + if (unit == "arena1") then - Gladdy:CreateMover(button.spellCooldownFrame, "cooldownXOffset", "cooldownYOffset", L["Cooldown"], - Gladdy.db.cooldownXPos == "RIGHT" and {"TOPRIGHT", "TOPRIGHT"} or {"TOPLEFT", "TOPLEFT"}, + Gladdy:CreateMover(button.spellCooldownFrame,"cooldownXOffset", "cooldownYOffset", L["Cooldown"], + {"TOPLEFT", "TOPLEFT"}, Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor, Gladdy.db.cooldownSize) end -- Update each cooldown icon @@ -181,11 +154,11 @@ function Cooldowns:UpdateFrame(unit) icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 2 * Gladdy.db.cooldownFontScale, "OUTLINE") icon.cooldownFont:SetTextColor(Gladdy.db.cooldownFontColor.r, Gladdy.db.cooldownFontColor.g, Gladdy.db.cooldownFontColor.b, Gladdy.db.cooldownFontColor.a) icon:ClearAllPoints() - if (Gladdy.db.cooldownXPos == "RIGHT") then + if (Gladdy.db.cooldownXGrowDirection == "LEFT") then if (j == 1) then - icon:SetPoint("RIGHT", button.spellCooldownFrame, "RIGHT", 0, 0) + icon:SetPoint("LEFT", button.spellCooldownFrame, "LEFT", 0, 0) elseif (mod(j-1,Gladdy.db.cooldownMaxIconsPerLine) == 0) then - if (Gladdy.db.cooldownYPos == "BOTTOM" or Gladdy.db.cooldownYPos == "LEFT" or Gladdy.db.cooldownYPos == "RIGHT") then + if (Gladdy.db.cooldownYGrowDirection == "DOWN") then icon:SetPoint("TOP", button.spellCooldownFrame["icon" .. o], "BOTTOM", 0, -Gladdy.db.cooldownIconPadding) else icon:SetPoint("BOTTOM", button.spellCooldownFrame["icon" .. o], "TOP", 0, Gladdy.db.cooldownIconPadding) @@ -195,11 +168,11 @@ function Cooldowns:UpdateFrame(unit) icon:SetPoint("RIGHT", button.spellCooldownFrame["icon" .. j - 1], "LEFT", -Gladdy.db.cooldownIconPadding, 0) end end - if (Gladdy.db.cooldownXPos == "LEFT") then + if (Gladdy.db.cooldownXGrowDirection == "RIGHT") then if (j == 1) then icon:SetPoint("LEFT", button.spellCooldownFrame, "LEFT", 0, 0) elseif (mod(j-1,Gladdy.db.cooldownMaxIconsPerLine) == 0) then - if (Gladdy.db.cooldownYPos == "BOTTOM" or Gladdy.db.cooldownYPos == "LEFT" or Gladdy.db.cooldownYPos == "RIGHT") then + if (Gladdy.db.cooldownYGrowDirection == "DOWN") then icon:SetPoint("TOP", button.spellCooldownFrame["icon" .. o], "BOTTOM", 0, -Gladdy.db.cooldownIconPadding) else icon:SetPoint("BOTTOM", button.spellCooldownFrame["icon" .. o], "TOP", 0, Gladdy.db.cooldownIconPadding) @@ -561,31 +534,6 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSecond end ]] end -local function option(params) - local defaults = { - get = function(info) - local key = info.arg or info[#info] - return Gladdy.dbi.profile[key] - end, - set = function(info, value) - local key = info.arg or info[#info] - Gladdy.dbi.profile[key] = value - if Gladdy.db.cooldownYPos == "LEFT" then - Gladdy.db.cooldownXPos = "RIGHT" - elseif Gladdy.db.cooldownYPos == "RIGHT" then - Gladdy.db.cooldownXPos = "LEFT" - end - Gladdy:UpdateFrame() - end, - } - - for k, v in pairs(params) do - defaults[k] = v - end - - return defaults -end - function Cooldowns:GetOptions() return { headerCooldown = { @@ -644,15 +592,6 @@ function Cooldowns:GetOptions() step = 0.1, width = "full", }), - cooldownMaxIconsPerLine = Gladdy:option({ - type = "range", - name = L["Max Icons per row"], - order = 7, - min = 3, - max = 14, - step = 1, - width = "full", - }), }, }, cooldown = { @@ -745,37 +684,44 @@ function Cooldowns:GetOptions() name = L["Position"], order = 2, }, - cooldownYPos = option({ + cooldownYGrowDirection = Gladdy:option({ type = "select", - name = L["Anchor"], - desc = L["Anchor of the cooldown icons"], + name = L["Vertical Grow Direction"], + desc = L["Vertical Grow Direction of the cooldown icons"], order = 3, values = { - ["TOP"] = L["Top"], - ["BOTTOM"] = L["Bottom"], + ["UP"] = L["Up"], + ["DOWN"] = L["Down"], + }, + }), + cooldownXGrowDirection = Gladdy:option({ + type = "select", + name = L["Horizontal Grow Direction"], + desc = L["Horizontal Grow Direction of the cooldown icons"], + order = 4, + values = { ["LEFT"] = L["Left"], ["RIGHT"] = L["Right"], }, }), - cooldownXPos = Gladdy:option({ - type = "select", - name = L["Grow Direction"], - desc = L["Grow Direction of the cooldown icons"], - order = 4, - values = { - ["LEFT"] = L["Right"], - ["RIGHT"] = L["Left"], - }, + cooldownMaxIconsPerLine = Gladdy:option({ + type = "range", + name = L["Max Icons per row"], + order = 5, + min = 3, + max = 14, + step = 1, + width = "full", }), headerOffset = { type = "header", name = L["Offset"], - order = 5, + order = 10, }, cooldownXOffset = Gladdy:option({ type = "range", name = L["Horizontal offset"], - order = 6, + order = 11, min = -400, max = 400, step = 0.1, @@ -784,7 +730,7 @@ function Cooldowns:GetOptions() cooldownYOffset = Gladdy:option({ type = "range", name = L["Vertical offset"], - order = 7, + order = 12, min = -400, max = 400, step = 0.1, @@ -913,4 +859,67 @@ function Gladdy:UpdateTestCooldowns(i) Cooldowns:CooldownUsed(unit, button.race, spellID) end end +end + +--------------------------- + +-- LAGACY HANDLER + +--------------------------- + +function Cooldowns:LegacySetPosition(button, unit) + if Gladdy.db.newLayout then + return Gladdy.db.newLayout + end + button.spellCooldownFrame:ClearAllPoints() + local powerBarHeight = Gladdy.db.powerBarEnabled and (Gladdy.db.powerBarHeight + 1) or 0 + local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + + local offset = 0 + if (Gladdy.db.cooldownXPos == "RIGHT") then + offset = -(Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor) + end + + if Gladdy.db.cooldownYPos == "TOP" then + Gladdy.db.cooldownYGrowDirection = "UP" + if Gladdy.db.cooldownXPos == "RIGHT" then + Gladdy.db.cooldownXGrowDirection = "LEFT" + button.spellCooldownFrame:SetPoint("BOTTOMRIGHT", button.healthBar, "TOPRIGHT", Gladdy.db.cooldownXOffset + offset, horizontalMargin + Gladdy.db.cooldownYOffset) + else + Gladdy.db.cooldownXGrowDirection = "RIGHT" + button.spellCooldownFrame:SetPoint("BOTTOMLEFT", button.healthBar, "TOPLEFT", Gladdy.db.cooldownXOffset + offset, horizontalMargin + Gladdy.db.cooldownYOffset) + end + elseif Gladdy.db.cooldownYPos == "BOTTOM" then + Gladdy.db.cooldownYGrowDirection = "DOWN" + if Gladdy.db.cooldownXPos == "RIGHT" then + Gladdy.db.cooldownXGrowDirection = "LEFT" + button.spellCooldownFrame:SetPoint("TOPRIGHT", button.healthBar, "BOTTOMRIGHT", Gladdy.db.cooldownXOffset + offset, -horizontalMargin + Gladdy.db.cooldownYOffset - powerBarHeight) + else + Gladdy.db.cooldownXGrowDirection = "RIGHT" + button.spellCooldownFrame:SetPoint("TOPLEFT", button.healthBar, "BOTTOMLEFT", Gladdy.db.cooldownXOffset + offset, -horizontalMargin + Gladdy.db.cooldownYOffset - powerBarHeight) + end + elseif Gladdy.db.cooldownYPos == "LEFT" then + Gladdy.db.cooldownYGrowDirection = "DOWN" + local anchor = Gladdy:GetAnchor(unit, "LEFT") + if anchor == Gladdy.buttons[unit].healthBar then + Gladdy.db.cooldownXGrowDirection = "LEFT" + button.spellCooldownFrame:SetPoint("RIGHT", anchor, "LEFT", -(horizontalMargin + Gladdy.db.padding) + Gladdy.db.cooldownXOffset + offset, Gladdy.db.cooldownYOffset) + else + Gladdy.db.cooldownXGrowDirection = "LEFT" + button.spellCooldownFrame:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding + Gladdy.db.cooldownXOffset + offset, Gladdy.db.cooldownYOffset) + end + elseif Gladdy.db.cooldownYPos == "RIGHT" then + Gladdy.db.cooldownYGrowDirection = "DOWN" + local anchor = Gladdy:GetAnchor(unit, "RIGHT") + if anchor == Gladdy.buttons[unit].healthBar then + Gladdy.db.cooldownXGrowDirection = "RIGHT" + button.spellCooldownFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.padding + Gladdy.db.cooldownXOffset + offset, Gladdy.db.cooldownYOffset) + else + Gladdy.db.cooldownXGrowDirection = "RIGHT" + button.spellCooldownFrame:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + Gladdy.db.cooldownXOffset + offset, Gladdy.db.cooldownYOffset) + end + end + LibStub("AceConfigRegistry-3.0"):NotifyChange("Gladdy") + + return Gladdy.db.newLayout end \ No newline at end of file diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index 069efb0..5c3acd9 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -30,7 +30,7 @@ local Diminishings = Gladdy:NewModule("Diminishings", nil, { drFont = "DorisPP", drFontColor = { r = 1, g = 1, b = 0, a = 1 }, drFontScale = 1, - drCooldownPos = "RIGHT", + drGrowDirection = "RIGHT", drXOffset = 0, drYOffset = 0, drIconSize = 36, @@ -49,7 +49,7 @@ local Diminishings = Gladdy:NewModule("Diminishings", nil, { drLevelTextFontScale = 1, drWidthFactor = 1, drCategories = defaultCategories(), - drDuration = 18 + drDuration = 18, }) local function getDiminishColor(dr) @@ -179,34 +179,18 @@ function Diminishings:UpdateFrame(unit) drFrame:Show() end - drFrame:ClearAllPoints() - local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding - if (Gladdy.db.drCooldownPos == "LEFT") then - local anchor = Gladdy:GetAnchor(unit, "LEFT") - if anchor == Gladdy.buttons[unit].healthBar then - drFrame:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin + Gladdy.db.drXOffset, Gladdy.db.drYOffset) - else - drFrame:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding + Gladdy.db.drXOffset, Gladdy.db.drYOffset) - end - end - if (Gladdy.db.drCooldownPos == "RIGHT") then - local anchor = Gladdy:GetAnchor(unit, "RIGHT") - if anchor == Gladdy.buttons[unit].healthBar then - drFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.drXOffset, Gladdy.db.drYOffset) - else - drFrame:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + Gladdy.db.drXOffset, Gladdy.db.drYOffset) - end - end - - drFrame:SetWidth(Gladdy.db.drIconSize * 16) + drFrame:SetWidth(Gladdy.db.drIconSize) drFrame:SetHeight(Gladdy.db.drIconSize) + + Gladdy:SetPosition(drFrame, unit, "drXOffset", "drYOffset", Diminishings:LegacySetPosition(drFrame, unit), Diminishings) + if (unit == "arena1") then - Gladdy:CreateMover(drFrame, "drXOffset", "drYOffset", L["Diminishings"], - Gladdy.db.drCooldownPos == "RIGHT" and {"TOPLEFT", "TOPLEFT"} or {"TOPRIGHT", "TOPRIGHT"}, --point - Gladdy.db.drIconSize * Gladdy.db.drWidthFactor, -- width + Gladdy:CreateMover(drFrame,"drXOffset", "drYOffset", L["Diminishings"], + Gladdy.db.drGrowDirection == "RIGHT" and {"TOPLEFT", "TOPLEFT"} or {"TOPRIGHT", "TOPRIGHT"}, + Gladdy.db.drIconSize * Gladdy.db.drWidthFactor, Gladdy.db.drIconSize, - 0, --xoffset - 0) --yoffset + 0, + 0) end for i = 1, 16 do @@ -245,15 +229,15 @@ function Diminishings:UpdateFrame(unit) end icon:ClearAllPoints() - if (Gladdy.db.drCooldownPos == "LEFT") then + if (Gladdy.db.drGrowDirection == "LEFT") then if (i == 1) then - icon:SetPoint("TOPRIGHT") + icon:SetPoint("TOPRIGHT", drFrame, "TOPRIGHT") else icon:SetPoint("RIGHT", drFrame["icon" .. (i - 1)], "LEFT", -Gladdy.db.drIconPadding, 0) end else if (i == 1) then - icon:SetPoint("TOPLEFT") + icon:SetPoint("TOPLEFT", drFrame, "TOPLEFT") else icon:SetPoint("LEFT", drFrame["icon" .. (i - 1)], "RIGHT", Gladdy.db.drIconPadding, 0) end @@ -383,13 +367,15 @@ function Diminishings:Positionate(unit) if (icon.active) then icon:ClearAllPoints() - if (Gladdy.db.drCooldownPos == "LEFT") then + if (Gladdy.db.newLayout and Gladdy.db.drGrowDirection == "LEFT" + or not Gladdy.db.newLayout and Gladdy.db.drCooldownPos == "LEFT") then if (not lastIcon) then icon:SetPoint("TOPRIGHT") else icon:SetPoint("RIGHT", lastIcon, "LEFT", -Gladdy.db.drIconPadding, 0) end - else + elseif (Gladdy.db.newLayout and Gladdy.db.drGrowDirection == "RIGHT" + or not Gladdy.db.newLayout and Gladdy.db.drCooldownPos == "RIGHT") then if (not lastIcon) then icon:SetPoint("TOPLEFT") else @@ -562,21 +548,16 @@ function Diminishings:GetOptions() name = L["Position"], order = 20, }, - drCooldownPos = Gladdy:option({ + drGrowDirection = Gladdy:option({ type = "select", - name = L["DR Cooldown position"], - desc = L["Position of the cooldown icons"], + name = L["DR Grow Direction"], + desc = L["Grow Direction of the dr icons"], order = 21, values = { ["LEFT"] = L["Left"], ["RIGHT"] = L["Right"], }, }), - headerOffset = { - type = "header", - name = L["Offset"], - order = 22, - }, drXOffset = Gladdy:option({ type = "range", name = L["Horizontal offset"], @@ -791,3 +772,36 @@ function Diminishings:GetDRIcons(category) end return icons end + +--------------------------- + +-- LAGACY HANDLER + +--------------------------- + +function Diminishings:LegacySetPosition(drFrame, unit) + if Gladdy.db.newLayout then + return Gladdy.db.newLayout + end + drFrame:ClearAllPoints() + local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding + if (Gladdy.db.drCooldownPos == "LEFT") then + Gladdy.db.drGrowDirection = "LEFT" + local anchor = Gladdy:GetAnchor(unit, "LEFT") + if anchor == Gladdy.buttons[unit].healthBar then + drFrame:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin + Gladdy.db.drXOffset, Gladdy.db.drYOffset) + else + drFrame:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding + Gladdy.db.drXOffset, Gladdy.db.drYOffset) + end + end + if (Gladdy.db.drCooldownPos == "RIGHT") then + Gladdy.db.drGrowDirection = "RIGHT" + local anchor = Gladdy:GetAnchor(unit, "RIGHT") + if anchor == Gladdy.buttons[unit].healthBar then + drFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.drXOffset, Gladdy.db.drYOffset) + else + drFrame:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + Gladdy.db.drXOffset, Gladdy.db.drYOffset) + end + end + return Gladdy.db.newLayout +end \ No newline at end of file diff --git a/Modules/ExportImport.lua b/Modules/ExportImport.lua index 330499a..889189a 100644 --- a/Modules/ExportImport.lua +++ b/Modules/ExportImport.lua @@ -95,7 +95,21 @@ local deletedOptions = { -- backwards compatibility impconc = true, dragonsbreath = true, freezetrap = true, - repentance = true + --deleted db options + castBarPos = true, + buffsCooldownPos = true, + buffsBuffsCooldownPos = true, + classIconPos = true, + ciAnchor = true, + ciPos = true, + cooldownYPos = true, + cooldownXPos = true, + drCooldownPos = true, + racialAnchor = true, + racialPos = true, + trinketPos = true, + padding = true, + growUp = true, } local function checkIsDeletedOption(k, str, msg, errorFound, errorMsg) @@ -208,6 +222,9 @@ end function ExportImport:ApplyImport(t, table, str) if str == nil then str = "Gladdy.db" + if (not t.newLayout) then + table.newLayout = false + end end for k,v in pairs(t) do if type(v) == "table" then diff --git a/Modules/Pets.lua b/Modules/Pets.lua index 36a32d2..b9406e9 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -253,10 +253,13 @@ function Pets:UpdateFrame(unitId) self.frames[unit]:SetWidth(Gladdy.db.petWidth) self.frames[unit]:SetHeight(Gladdy.db.petHeight) - self.frames[unit]:SetPoint("LEFT", Gladdy.buttons[unitId].healthBar, "RIGHT", Gladdy.db.petXOffset, Gladdy.db.petYOffset) + + Gladdy:SetPosition(self.frames[unit], unitId, "petXOffset", "petYOffset", Pets:LegacySetPosition(unit, unitId), Pets) + if (Gladdy.db.petGroup) then if (unit == "arenapet1") then - self.frames[unit]:SetPoint("LEFT", Gladdy.buttons[unitId].healthBar, "RIGHT", Gladdy.db.petXOffset, Gladdy.db.petYOffset) + self.frames[unit]:ClearAllPoints() + self.frames[unit]:SetPoint("TOPLEFT", Gladdy.buttons[unitId].healthBar, "TOPLEFT", Gladdy.db.petXOffset, Gladdy.db.petYOffset) else local previousPet = "arenapet" .. string_gsub(unit, "arenapet", "") - 1 self.frames[unit]:ClearAllPoints() @@ -264,7 +267,7 @@ function Pets:UpdateFrame(unitId) end else self.frames[unit]:ClearAllPoints() - self.frames[unit]:SetPoint("LEFT", Gladdy.buttons[unitId].healthBar, "RIGHT", Gladdy.db.petXOffset, Gladdy.db.petYOffset) + self.frames[unit]:SetPoint("TOPLEFT", Gladdy.buttons[unitId].healthBar, "TOPLEFT", Gladdy.db.petXOffset, Gladdy.db.petYOffset) end healthBar.portrait:SetHeight(Gladdy.db.petHeight) @@ -587,4 +590,31 @@ function Pets:GetOptions() }, }, } +end + +--------------------------- + +-- LAGACY HANDLER + +--------------------------- + +function Pets:LegacySetPosition(unit, unitId) + if Gladdy.db.newLayout then + return Gladdy.db.newLayout + end + self.frames[unit]:ClearAllPoints() + self.frames[unit]:SetPoint("LEFT", Gladdy.buttons[unitId].healthBar, "RIGHT", Gladdy.db.petXOffset, Gladdy.db.petYOffset) + if (Gladdy.db.petGroup) then + if (unit == "arenapet1") then + self.frames[unit]:SetPoint("LEFT", Gladdy.buttons[unitId].healthBar, "RIGHT", Gladdy.db.petXOffset, Gladdy.db.petYOffset) + else + local previousPet = "arenapet" .. string_gsub(unit, "arenapet", "") - 1 + self.frames[unit]:ClearAllPoints() + self.frames[unit]:SetPoint("TOPLEFT", self.frames[previousPet], "BOTTOMLEFT", 0, - Gladdy.db.petMargin) + end + else + self.frames[unit]:ClearAllPoints() + self.frames[unit]:SetPoint("LEFT", Gladdy.buttons[unitId].healthBar, "RIGHT", Gladdy.db.petXOffset, Gladdy.db.petYOffset) + end + return Gladdy.db.newLayout end \ No newline at end of file diff --git a/Modules/Racial.lua b/Modules/Racial.lua index aaf3731..b03c6d2 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -5,14 +5,12 @@ local GetTime = GetTime local Gladdy = LibStub("Gladdy") local L = Gladdy.L -local Racial = Gladdy:NewModule("Racial", nil, { +local Racial = Gladdy:NewModule("Racial", 79, { racialFont = "DorisPP", racialFontScale = 1, racialEnabled = true, racialSize = 60 + 20 + 1, racialWidthFactor = 0.9, - racialAnchor = "trinket", - racialPos = "RIGHT", racialXOffset = 0, racialYOffset = 0, racialBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp", @@ -22,7 +20,6 @@ local Racial = Gladdy:NewModule("Racial", nil, { racialCooldownNumberAlpha = 1, }) -local ANCHORS = { ["LEFT"] = "RIGHT", ["RIGHT"] = "LEFT", ["BOTTOM"] = "TOP", ["TOP"] = "BOTTOM"} function Racial:Initialize() self.frames = {} @@ -121,16 +118,15 @@ function Racial:UpdateFrame(unit) racial.texture.overlay:SetTexture(Gladdy.db.racialBorderStyle) racial.texture.overlay:SetVertexColor(Gladdy.db.racialBorderColor.r, Gladdy.db.racialBorderColor.g, Gladdy.db.racialBorderColor.b, Gladdy.db.racialBorderColor.a) - racial:ClearAllPoints() - local parent = Gladdy.buttons[unit][Gladdy.db.racialAnchor] - if (Gladdy.db.racialPos == "RIGHT") then - racial:SetPoint(ANCHORS[Gladdy.db.racialPos], parent, Gladdy.db.racialPos, Gladdy.db.padding + Gladdy.db.racialXOffset, Gladdy.db.racialYOffset) - elseif (Gladdy.db.racialPos == "LEFT") then - racial:SetPoint(ANCHORS[Gladdy.db.racialPos], parent, Gladdy.db.racialPos, -Gladdy.db.padding + Gladdy.db.racialXOffset, Gladdy.db.racialYOffset) - elseif (Gladdy.db.racialPos == "TOP") then - racial:SetPoint(ANCHORS[Gladdy.db.racialPos], parent, Gladdy.db.racialPos, Gladdy.db.racialXOffset, Gladdy.db.padding + Gladdy.db.racialYOffset) - elseif (Gladdy.db.racialPos == "BOTTOM") then - racial:SetPoint(ANCHORS[Gladdy.db.racialPos], parent, Gladdy.db.racialPos, Gladdy.db.racialXOffset, -Gladdy.db.padding + Gladdy.db.racialYOffset) + Gladdy:SetPosition(racial, unit, "racialXOffset", "racialYOffset", Racial:LegacySetPosition(racial, unit), Racial) + + if (unit == "arena1") then + Gladdy:CreateMover(racial,"racialXOffset", "racialYOffset", L["Racial"], + {"TOPLEFT", "TOPLEFT"}, + Gladdy.db.racialSize * Gladdy.db.racialWidthFactor, + Gladdy.db.racialSize, + 0, + 0) end if (Gladdy.db.racialEnabled == false) then @@ -394,4 +390,30 @@ function Racial:GetOptions() }, }, } +end + +--------------------------- + +-- LAGACY HANDLER + +--------------------------- + +function Racial:LegacySetPosition(racial, unit) + if Gladdy.db.newLayout then + return Gladdy.db.newLayout + end + + local ANCHORS = { ["LEFT"] = "RIGHT", ["RIGHT"] = "LEFT", ["BOTTOM"] = "TOP", ["TOP"] = "BOTTOM"} + racial:ClearAllPoints() + local parent = Gladdy.buttons[unit][Gladdy.db.racialAnchor] + if (Gladdy.db.racialPos == "RIGHT") then + racial:SetPoint(ANCHORS[Gladdy.db.racialPos], parent, Gladdy.db.racialPos, Gladdy.db.padding + Gladdy.db.racialXOffset, Gladdy.db.racialYOffset) + elseif (Gladdy.db.racialPos == "LEFT") then + racial:SetPoint(ANCHORS[Gladdy.db.racialPos], parent, Gladdy.db.racialPos, -Gladdy.db.padding + Gladdy.db.racialXOffset, Gladdy.db.racialYOffset) + elseif (Gladdy.db.racialPos == "TOP") then + racial:SetPoint(ANCHORS[Gladdy.db.racialPos], parent, Gladdy.db.racialPos, Gladdy.db.racialXOffset, Gladdy.db.padding + Gladdy.db.racialYOffset) + elseif (Gladdy.db.racialPos == "BOTTOM") then + racial:SetPoint(ANCHORS[Gladdy.db.racialPos], parent, Gladdy.db.racialPos, Gladdy.db.racialXOffset, -Gladdy.db.padding + Gladdy.db.racialYOffset) + end + return Gladdy.db.newLayout end \ No newline at end of file diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index 53126e4..d3a9911 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -6,18 +6,19 @@ local GetTime = GetTime local Gladdy = LibStub("Gladdy") local L = Gladdy.L -local Trinket = Gladdy:NewModule("Trinket", nil, { +local Trinket = Gladdy:NewModule("Trinket", 80, { trinketFont = "DorisPP", trinketFontScale = 1, trinketEnabled = true, trinketSize = 60 + 20 + 1, trinketWidthFactor = 0.9, - trinketPos = "RIGHT", trinketBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp", trinketBorderColor = { r = 0, g = 0, b = 0, a = 1 }, trinketDisableCircle = false, trinketCooldownAlpha = 1, trinketCooldownNumberAlpha = 1, + trinketXOffset = 0, + trinketYOffset = 0, }) LibStub("AceComm-3.0"):Embed(Trinket) @@ -119,20 +120,15 @@ function Trinket:UpdateFrame(unit) trinket.texture.overlay:SetTexture(Gladdy.db.trinketBorderStyle) trinket.texture.overlay:SetVertexColor(Gladdy.db.trinketBorderColor.r, Gladdy.db.trinketBorderColor.g, Gladdy.db.trinketBorderColor.b, Gladdy.db.trinketBorderColor.a) - trinket:ClearAllPoints() - local margin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding - if (Gladdy.db.classIconPos == "LEFT") then - if (Gladdy.db.trinketPos == "RIGHT") then - trinket:SetPoint("TOPLEFT", Gladdy.buttons[unit].healthBar, "TOPRIGHT", margin, 0) - else - trinket:SetPoint("TOPRIGHT", Gladdy.buttons[unit].classIcon, "TOPLEFT", -Gladdy.db.padding, 0) - end - else - if (Gladdy.db.trinketPos == "RIGHT") then - trinket:SetPoint("TOPLEFT", Gladdy.buttons[unit].classIcon, "TOPRIGHT", Gladdy.db.padding, 0) - else - trinket:SetPoint("TOPRIGHT", Gladdy.buttons[unit].healthBar, "TOPLEFT", -margin, 0) - end + Gladdy:SetPosition(trinket, unit, "trinketXOffset", "trinketYOffset", Trinket:LegacySetPosition(trinket, unit), Trinket) + + if (unit == "arena1") then + Gladdy:CreateMover(trinket,"trinketXOffset", "trinketYOffset", L["Trinket"], + {"TOPLEFT", "TOPLEFT"}, + Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor, + Gladdy.db.trinketSize, + 0, + 0) end if (Gladdy.db.trinketEnabled == false) then @@ -368,4 +364,31 @@ function Trinket:GetOptions() }, }, } +end + +--------------------------- + +-- LAGACY HANDLER + +--------------------------- + +function Trinket:LegacySetPosition(trinket, unit) + if Gladdy.db.newLayout then + return Gladdy.db.newLayout + end + trinket:ClearAllPoints() + local margin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding + if (Gladdy.db.classIconPos == "LEFT") then + if (Gladdy.db.trinketPos == "RIGHT") then + trinket:SetPoint("TOPLEFT", Gladdy.buttons[unit].healthBar, "TOPRIGHT", margin, 0) + else + trinket:SetPoint("TOPRIGHT", Gladdy.buttons[unit].classIcon, "TOPLEFT", -Gladdy.db.padding, 0) + end + else + if (Gladdy.db.trinketPos == "RIGHT") then + trinket:SetPoint("TOPLEFT", Gladdy.buttons[unit].classIcon, "TOPRIGHT", Gladdy.db.padding, 0) + else + trinket:SetPoint("TOPRIGHT", Gladdy.buttons[unit].healthBar, "TOPLEFT", -margin, 0) + end + end end \ No newline at end of file diff --git a/Options.lua b/Options.lua index 4eec88a..0dd3bfe 100644 --- a/Options.lua +++ b/Options.lua @@ -47,16 +47,16 @@ Gladdy.defaults = { hideBlizzard = "arena", x = 0, y = 0, - growUp = false, growDirection = "BOTTOM", frameScale = 1, pixelPerfect = false, - padding = 1, barWidth = 180, bottomMargin = 2, statusbarBorderOffset = 6, timerFormat = Gladdy.TIMER_FORMAT.tenths, backgroundColor = {r = 0, g = 0, b = 0, a = 0}, + newLayout = false, + showMover = true, }, } @@ -215,19 +215,45 @@ function Gladdy:SetupOptions() get = getOpt, set = setOpt, args = { - test = { + lock = { order = 1, width = 0.7, + name = Gladdy.db.locked and L["Unlock frame"] or L["Lock frame"], + desc = L["Toggle if frame can be moved"], + type = "execute", + func = function() + Gladdy.db.locked = not Gladdy.db.locked + Gladdy:UpdateFrame() + self.options.args.lock.name = Gladdy.db.locked and L["Unlock frame"] or L["Lock frame"] + end, + }, + showMover = { + order = 2, + width = 0.7, + name = Gladdy.db.showMover and L["Hide Mover"] or L["Show Mover"], + desc = L["Toggle to show Mover Frames"], + type = "execute", + func = function() + Gladdy.db.showMover = not Gladdy.db.showMover + Gladdy:UpdateFrame() + self.options.args.showMover.name = Gladdy.db.showMover and L["Hide Mover"] or L["Show Mover"] + end, + }, + test = { + order = 2, + width = 0.7, name = L["Test"], + desc = L["Show Test frames"], type = "execute", func = function() Gladdy:ToggleFrame(3) end, }, hide = { - order = 2, + order = 3, width = 0.7, name = L["Hide"], + desc = L["Hide frames"], type = "execute", func = function() Gladdy:Reset() @@ -235,16 +261,17 @@ function Gladdy:SetupOptions() end, }, reload = { - order = 3, + order = 4, width = 0.7, name = L["ReloadUI"], + desc = L["Reloads the UI"], type = "execute", func = function() ReloadUI() end, }, version = { - order = 4, + order = 5, width = 1, type = "description", name = " Gladdy v" .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType @@ -256,12 +283,6 @@ function Gladdy:SetupOptions() childGroups = "tab", order = 5, args = { - locked = { - type = "toggle", - name = L["Lock frame"], - desc = L["Toggle if frame can be moved"], - order = 1, - }, growDirection = { type = "select", name = L["Grow Direction"], @@ -315,15 +336,6 @@ function Gladdy:SetupOptions() max = 2, step = .01, }, - padding = { - type = "range", - name = L["Frame padding"], - desc = L["Padding of the frame"], - order = 6, - min = 0, - max = 20, - step = 1, - }, barWidth = { type = "range", name = L["Frame width"], -- 2.39.5 From 114c0ac96d39eca8ef2e618c7c17e0e8fa0b2883 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 00:29:30 +0100 Subject: [PATCH 030/227] clean up --- EventListener.lua | 2 +- Modules/Cooldowns.lua | 5 +-- Modules/ExportImport.lua | 5 ++- Modules/Healthbar.lua | 16 +------- Modules/XiconProfiles.lua | 81 ++++++--------------------------------- 5 files changed, 19 insertions(+), 90 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index e867791..aef0ae1 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -136,7 +136,7 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() else unitClass = Gladdy.buttons[srcUnit].race end - Cooldowns:CooldownUsed(srcUnit, unitClass, spellId, spellName) + Cooldowns:CooldownUsed(srcUnit, unitClass, spellId) Gladdy:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) end end diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index f5803da..3ca104e 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -42,7 +42,7 @@ local function getDefaultCooldown() if spellName then cooldowns[tostring(spellId)] = true else - Gladdy:Print("spellid does not exist " .. spellId) + Gladdy:Debug("ERROR", "spellid does not exist " .. spellId) end end end @@ -79,7 +79,7 @@ function Cooldowns:Initialize() self.cooldownSpellIds[spellName] = spellId self.spellTextures[spellId] = texture else - Gladdy:Print("spellid does not exist " .. spellId) + Gladdy:Debug("ERROR", "spellid does not exist " .. spellId) end end end @@ -373,7 +373,6 @@ function Cooldowns:DetectSpec(unit, spec) end end end - --end end ---------------------- --- RACE FUNCTIONALITY diff --git a/Modules/ExportImport.lua b/Modules/ExportImport.lua index 889189a..2ac8895 100644 --- a/Modules/ExportImport.lua +++ b/Modules/ExportImport.lua @@ -72,6 +72,7 @@ importButton:SetCallback("OnClick", function(widget) Gladdy:Reset() Gladdy:HideFrame() Gladdy:ToggleFrame(3) + LibStub("AceConfigRegistry-3.0"):NotifyChange("Gladdy") end) import:AddChild(importButton) import.button = importButton @@ -117,7 +118,7 @@ local function checkIsDeletedOption(k, str, msg, errorFound, errorMsg) for key, _ in pairs(deletedOptions) do if str_match(k, key) then isDeleted = true - Gladdy:Warn("found deleted option =", str .. "." .. k) + Gladdy:Debug("WARN", "found deleted option =", str .. "." .. k) end end if errorFound then @@ -231,7 +232,7 @@ function ExportImport:ApplyImport(t, table, str) if (table[k] ~= nil) then ExportImport:ApplyImport(v, table[k], str .. "." .. k) else - Gladdy:Warn("ApplyImport failed for", str .. "." .. k) + Gladdy:Debug("ERROR", "ApplyImport failed for", str .. "." .. k) end else diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index 31e850a..bda54ef 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -251,7 +251,7 @@ function Healthbar:ENEMY_SPOTTED(unit) healthBar.hp:SetValue(health) Healthbar:SetHealthText(healthBar, health, healthMax) end - if Gladdy.db.healthName and not Gladdy.db.healthNameToArenaId then + if button.name and Gladdy.db.healthName and not Gladdy.db.healthNameToArenaId then healthBar.nameText:SetText(button.name) end @@ -504,20 +504,6 @@ function Healthbar:GetOptions() width = "full", disabled = function() return not Gladdy.db.healthName end }), - healthActual = option({ - type = "toggle", - name = L["Show the actual health"], - desc = L["Show the actual health on the health bar"], - order = 4, - width = "full", - }), - healthMax = option({ - type = "toggle", - name = L["Show max health"], - desc = L["Show max health on the health bar"], - order = 5, - width = "full", - }), healthPercentage = option({ type = "toggle", name = L["Show health percentage"], diff --git a/Modules/XiconProfiles.lua b/Modules/XiconProfiles.lua index ab871d9..bd12442 100644 --- a/Modules/XiconProfiles.lua +++ b/Modules/XiconProfiles.lua @@ -4,74 +4,17 @@ local L = Gladdy.L local XiconProfiles = Gladdy:NewModule("XiconProfiles", nil, { }) -function XiconProfiles:ApplyKlimp() - local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetKlimpProfile()) - if deserialized then - Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db) - end - Gladdy:Reset() - Gladdy:HideFrame() - Gladdy:ToggleFrame(3) -end - -function XiconProfiles:ApplyKnall() - local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetKnallProfile()) - if deserialized then - Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db) - end - Gladdy:Reset() - Gladdy:HideFrame() - Gladdy:ToggleFrame(3) -end - -function XiconProfiles:ApplyClassic() - local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetClassicProfile()) - if deserialized then - Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db) - end - Gladdy:Reset() - Gladdy:HideFrame() - Gladdy:ToggleFrame(3) -end - -function XiconProfiles:ApplyClassicNoPet() - local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetClassicProfileNoPet()) - if deserialized then - Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db) - end - Gladdy:Reset() - Gladdy:HideFrame() - Gladdy:ToggleFrame(3) -end - -function XiconProfiles:ApplyBlizz() - local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetBlizzardProfile()) - if deserialized then - Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db) - end - Gladdy:Reset() - Gladdy:HideFrame() - Gladdy:ToggleFrame(3) -end - -function XiconProfiles:ApplyRukk() - local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetRukkProfile()) - if deserialized then - Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db) - end - Gladdy:Reset() - Gladdy:HideFrame() - Gladdy:ToggleFrame(3) -end - -function XiconProfiles:ApplyMir() - local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetMirProfile()) +local function applyProfile(profileString) + local deserialized = Gladdy.modules["Export Import"]:Decode(profileString) if deserialized then Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db) end Gladdy:Reset() Gladdy:HideFrame() Gladdy:ToggleFrame(3) + Gladdy.options.args.lock.name = Gladdy.db.locked and L["Unlock frame"] or L["Lock frame"] + Gladdy.options.args.showMover.name = Gladdy.db.showMover and L["Hide Mover"] or L["Show Mover"] + LibStub("AceConfigRegistry-3.0"):NotifyChange("Gladdy") end function XiconProfiles:GetOptions() @@ -85,7 +28,7 @@ function XiconProfiles:GetOptions() type = "execute", func = function() Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile()) - XiconProfiles:ApplyBlizz() + applyProfile(Gladdy:GetBlizzardProfile()) end, name = " ", desc = "Blizzard " .. L["Profile"], @@ -104,7 +47,7 @@ function XiconProfiles:GetOptions() type = "execute", func = function() Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile()) - XiconProfiles:ApplyClassic() + applyProfile(Gladdy:GetClassicProfile()) end, name = " ", desc = "Classic " .. L["Profile"], @@ -123,7 +66,7 @@ function XiconProfiles:GetOptions() type = "execute", func = function() Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile()) - XiconProfiles:ApplyClassicNoPet() + applyProfile(Gladdy:GetClassicProfileNoPet()) end, name = " ", desc = "Classic " .. L["Profile"] .. L[" No Pet"], @@ -142,7 +85,7 @@ function XiconProfiles:GetOptions() type = "execute", func = function() Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile()) - XiconProfiles:ApplyKnall() + applyProfile(Gladdy:GetKnallProfile()) end, name = " ", desc = "Knall's " .. L["Profile"], @@ -161,7 +104,7 @@ function XiconProfiles:GetOptions() type = "execute", func = function() Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile()) - XiconProfiles:ApplyKlimp() + applyProfile(Gladdy:GetKlimpProfile()) end, image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Klimp1.blp", imageWidth = 350, @@ -180,7 +123,7 @@ function XiconProfiles:GetOptions() type = "execute", func = function() Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile()) - XiconProfiles:ApplyRukk() + applyProfile(Gladdy:GetRukkProfile()) end, name = " ", desc = "Rukk1's " .. L["Profile"], @@ -199,7 +142,7 @@ function XiconProfiles:GetOptions() type = "execute", func = function() Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile()) - XiconProfiles:ApplyMir() + applyProfile(Gladdy:GetMirProfile()) end, name = " ", desc = "Mir's " .. L["Profile"], -- 2.39.5 From 1c42523a2ff8de061e790a0160872e7262092774 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 00:30:32 +0100 Subject: [PATCH 031/227] bump version + backwards compatible imports --- Gladdy.lua | 4 ++-- Modules/ExportImport.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gladdy.lua b/Gladdy.lua index d117a96..53160f2 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -30,8 +30,8 @@ local LibStub = LibStub local MAJOR, MINOR = "Gladdy", 4 local Gladdy = LibStub:NewLibrary(MAJOR, MINOR) local L -Gladdy.version_major_num = 1 -Gladdy.version_minor_num = 0.22 +Gladdy.version_major_num = 2 +Gladdy.version_minor_num = 0.00 Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num Gladdy.version_releaseType = RELEASE_TYPES.release Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType diff --git a/Modules/ExportImport.lua b/Modules/ExportImport.lua index 2ac8895..3cc5676 100644 --- a/Modules/ExportImport.lua +++ b/Modules/ExportImport.lua @@ -133,8 +133,8 @@ function ExportImport:CheckDeserializedOptions(tbl, refTbl, str) if str == nil and not tbl.version_major_num then return false, "Version conflict: version_major_num not seen" end - if str == nil and tbl.version_major_num ~= Gladdy.version_major_num then - return false, "Version conflict: " .. tbl.version_major_num .. " ~= " .. Gladdy.version_major_num + if str == nil and tbl.version_major_num > Gladdy.version_major_num then + return false, "Version conflict: Major v" .. tbl.version_major_num .. " ~= v" .. Gladdy.version_major_num end if str == nil then str = "Gladdy.db" -- 2.39.5 From 2571df30527e428cc970fef3b2c7ce60e52b2712 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 03:00:57 +0100 Subject: [PATCH 032/227] cleanup --- Modules/Healthbar.lua | 42 ++++-------------------------------------- Modules/Trinket.lua | 1 - 2 files changed, 4 insertions(+), 39 deletions(-) diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index bda54ef..8338a1a 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -129,7 +129,7 @@ function Healthbar.OnEvent(self, event, unit) end function Healthbar:SetHealthText(healthBar, health, healthMax) - local healthText + local healthText = "" local healthPercentage = floor(health * 100 / healthMax) if health == 0 and UnitExists(healthBar.unit) and UnitIsDeadOrGhost(healthBar.unit) then @@ -137,25 +137,8 @@ function Healthbar:SetHealthText(healthBar, health, healthMax) return end - if (Gladdy.db.healthActual) then - healthText = healthMax > 999 and ("%.1fk"):format(health / 1000) or health - end - - if (Gladdy.db.healthMax) then - local text = healthMax > 999 and ("%.1fk"):format(healthMax / 1000) or healthMax - if (healthText) then - healthText = ("%s/%s"):format(healthText, text) - else - healthText = text - end - end - if (Gladdy.db.healthPercentage) then - if (healthText) then - healthText = ("%s (%d%%)"):format(healthText, healthPercentage) - else - healthText = ("%d%%"):format(healthPercentage) - end + healthText = ("%d%%"):format(healthPercentage) end healthBar.healthText:SetText(healthText) @@ -271,27 +254,10 @@ function Healthbar:UNIT_HEALTH(unit, health, healthMax) Gladdy:SendMessage("UNIT_HEALTH", unit, health, healthMax) local healthPercentage = floor(health * 100 / healthMax) - local healthText - - if (Gladdy.db.healthActual) then - healthText = healthMax > 999 and ("%.1fk"):format(health / 1000) or health - end - - if (Gladdy.db.healthMax) then - local text = healthMax > 999 and ("%.1fk"):format(healthMax / 1000) or healthMax - if (healthText) then - healthText = ("%s/%s"):format(healthText, text) - else - healthText = text - end - end + local healthText = "" if (Gladdy.db.healthPercentage) then - if (healthText) then - healthText = ("%s (%d%%)"):format(healthText, healthPercentage) - else - healthText = ("%d%%"):format(healthPercentage) - end + healthText = ("%d%%"):format(healthPercentage) end healthBar.healthText:SetText(healthText) diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index d3a9911..928d30c 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -20,7 +20,6 @@ local Trinket = Gladdy:NewModule("Trinket", 80, { trinketXOffset = 0, trinketYOffset = 0, }) -LibStub("AceComm-3.0"):Embed(Trinket) function Trinket:Initialize() self.frames = {} -- 2.39.5 From 6b94fdc32f245c8b798c88401211a73684f762bd Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 03:01:16 +0100 Subject: [PATCH 033/227] fix minor castbar issue --- Modules/Castbar.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 1eb5b70..7cb266d 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -220,7 +220,7 @@ function Castbar.OnUpdate(castBar, elapsed) castBar.spark:SetPoint("CENTER", castBar.bar, "LEFT", castBar.spark.position, 0) castBar.spark:Show() end - elseif ( GetTime() < castBar.holdTime ) then + elseif ( castBar.holdTime and GetTime() < castBar.holdTime ) then castBar.timeText:Hide() castBar.spark:Hide() return -- 2.39.5 From 65daef4cd447491c0409324669d573318a831e68 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 03:01:32 +0100 Subject: [PATCH 034/227] fix announcement throttle --- Modules/Announcements.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Modules/Announcements.lua b/Modules/Announcements.lua index 4b63595..3c8b376 100644 --- a/Modules/Announcements.lua +++ b/Modules/Announcements.lua @@ -145,7 +145,7 @@ function Announcements:SPELL_INTERRUPT(destUnit,spellID,spellName,spellSchool,ex if (not button or not Gladdy.db.announcements.spellInterrupt) then return end - self:Send(L["INTERRUPTED: %s (%s)"]:format(extraSpellName, button.name or ""), 3, RAID_CLASS_COLORS[button.class]) + self:Send(L["INTERRUPTED: %s (%s)"]:format(extraSpellName, button.name or ""), nil, RAID_CLASS_COLORS[button.class]) end function Announcements:CheckDrink(unit, aura) @@ -167,9 +167,12 @@ function Announcements:Send(msg, throttle, color) if (throttle and throttle > 0) then if (not self.throttled[msg]) then self.throttled[msg] = GetTime() + throttle + Gladdy:Debug("INFO", msg, "- NOT THROTTLED -", self.throttled[msg]) elseif (self.throttled[msg] < GetTime()) then - self.throttled[msg] = nil + Gladdy:Debug("INFO", msg, "- THROTTLED OVER -", self.throttled[msg]) + self.throttled[msg] = GetTime() + throttle else + Gladdy:Debug("INFO", msg, "- THROTTLED -", self.throttled[msg]) return end end -- 2.39.5 From c3a7c6cbc87884670ead83420f398c586b3a17ea Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 04:26:59 +0100 Subject: [PATCH 035/227] shadowsight: - reset timer when shadowsight buff is active - add a second timer - show one or two timers option added --- Modules/ShadowsightTimer.lua | 304 ++++++++++++++++++++++++++--------- 1 file changed, 228 insertions(+), 76 deletions(-) diff --git a/Modules/ShadowsightTimer.lua b/Modules/ShadowsightTimer.lua index edd280e..d16c21d 100644 --- a/Modules/ShadowsightTimer.lua +++ b/Modules/ShadowsightTimer.lua @@ -1,6 +1,12 @@ local floor, str_find, pairs = math.floor, string.find, pairs local CreateFrame = CreateFrame +--------------------------- + +-- CORE + +--------------------------- + local Gladdy = LibStub("Gladdy") local L = Gladdy.L local ShadowsightTimer = Gladdy:NewModule("Shadowsight Timer", nil, { @@ -12,8 +18,14 @@ local ShadowsightTimer = Gladdy:NewModule("Shadowsight Timer", nil, { shadowsightTimerX = 0, shadowsightTimerY = 0, shadowsightAnnounce = true, + shadowsightTimerStartTime = 91, + shadowsightTimerResetTime = 120, + shadowsightTimerShowTwoTimer = false, }) +-- /run LibStub("Gladdy").modules["Shadowsight Timer"]:AURA_GAIN(nil, nil, 34709) +-- /run LibStub("Gladdy").modules["Shadowsight Timer"].timerFrame1:SetAlpha(0) + function ShadowsightTimer:OnEvent(event, ...) self[event](self, ...) end @@ -22,20 +34,120 @@ function ShadowsightTimer:Initialize() self.locale = Gladdy:GetArenaTimer() self:RegisterMessage("JOINED_ARENA") self:RegisterMessage("AURA_GAIN") - self:CreateTimerFrame() + self:CreateAnchor() end +function ShadowsightTimer:Reset() + self.anchor:Hide() + for i=1,2 do + self["timerFrame" .. i].active = false + self["timerFrame" .. i]:SetScript("OnUpdate", nil) + self["timerFrame" .. i].font:SetTextColor(1, 0.8, 0) + end + self:UnregisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL") + self:SetScript("OnEvent", nil) +end + +--------------------------- + +-- FRAME SETUP + +--------------------------- + +function ShadowsightTimer:CreateTimerFrame(anchor, name, points) + local backdrop = { + bgFile = "Interface/Tooltips/UI-Tooltip-Background", + edgeFile = "", + tile = true, tileSize = 16, edgeSize = 10, + insets = {left = 0, right = 0, top = 0, bottom = 0} + } + self[name] = CreateFrame("Frame", nil, anchor, BackdropTemplateMixin and "BackdropTemplate") + self[name]:SetPoint(points[1], anchor, points[2]) + self[name]:SetBackdrop(backdrop) + self[name]:SetBackdropColor(0,0,0,0.8) + self[name]:SetHeight(17) + self[name]:SetWidth(35) + + self[name].texture = self[name]:CreateTexture(nil,"OVERLAY") + self[name].texture:SetWidth(16) + self[name].texture:SetHeight(16) + self[name].texture:SetTexture("Interface\\Icons\\Spell_Shadow_EvilEye") + self[name].texture:SetTexCoord(0.125,0.875,0.125,0.875) + self[name].texture:SetPoint("RIGHT", self[name], "LEFT") + + self[name].font = self[name]:CreateFontString(nil,"OVERLAY","GameFontNormal") + self[name].font:SetPoint("LEFT", 5, 0) + self[name].font:SetJustifyH("LEFT") + self[name].font:SetTextColor(1, 0.8, 0) +end + +function ShadowsightTimer:CreateAnchor() + self.anchor = CreateFrame("Frame") + self.anchor:SetMovable(true) + self.anchor:EnableMouse(true) + self.anchor:SetWidth(35) + self.anchor:SetHeight(17) + self.anchor:SetPoint(Gladdy.db.shadowsightTimerRelPoint1, nil, Gladdy.db.shadowsightTimerRelPoint, Gladdy.db.shadowsightTimerX, Gladdy.db.shadowsightTimerY) + self.anchor:SetScript("OnMouseDown",function(self) self:StartMoving() end) + self.anchor:SetScript("OnMouseUp",function(self) + self:StopMovingOrSizing() + Gladdy.db.shadowsightTimerRelPoint1,_,Gladdy.db.shadowsightTimerRelPoint2,Gladdy.db.shadowsightTimerX,Gladdy.db.shadowsightTimerY = self:GetPoint() + end) + self.anchor:SetScale(Gladdy.db.shadowsightTimerScale) + self.anchor:Hide() + + self:CreateTimerFrame(self.anchor, "timerFrame1", {"TOP", "TOP"}) + local show = Gladdy.db.shadowsightTimerShowTwoTimer + self:CreateTimerFrame(show and self.timerFrame1 or self.anchor, "timerFrame2", show and {"TOP", "BOTTOM"} or {"TOP", "TOP"}) +end + +function ShadowsightTimer:UpdateFrameOnce() + self.anchor:EnableMouse(not Gladdy.db.shadowsightTimerLocked) + if Gladdy.db.shadowsightTimerEnabled then + self.anchor:SetScale(Gladdy.db.shadowsightTimerScale) + self.anchor:ClearAllPoints() + self.anchor:SetPoint(Gladdy.db.shadowsightTimerRelPoint1, nil, Gladdy.db.shadowsightTimerRelPoint2, Gladdy.db.shadowsightTimerX, Gladdy.db.shadowsightTimerY) + if Gladdy.frame.testing or Gladdy.curBracket then + self.anchor:Show() + end + if Gladdy.db.shadowsightTimerShowTwoTimer then + self.anchor:SetHeight(34) + self.timerFrame2:ClearAllPoints() + self.timerFrame2:SetPoint("TOP", self.timerFrame1, "BOTTOM") + ShadowsightTimer:NotifyStart() + else + self.anchor:SetHeight(17) + self.timerFrame2:ClearAllPoints() + self.timerFrame2:SetPoint("TOP", self.anchor, "TOP") + ShadowsightTimer:NotifyStart() + end + else + self.anchor:SetScale(Gladdy.db.shadowsightTimerScale) + self.anchor:ClearAllPoints() + self.anchor:SetPoint(Gladdy.db.shadowsightTimerRelPoint1, nil, Gladdy.db.shadowsightTimerRelPoint2, Gladdy.db.shadowsightTimerX, Gladdy.db.shadowsightTimerY) + self.anchor:Hide() + end +end + +--------------------------- + +-- EVENT HANDLING + +--------------------------- + function ShadowsightTimer:JOINED_ARENA() self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL") self:SetScript("OnEvent", ShadowsightTimer.OnEvent) - self.timerFrame.font:SetText("1:30") - self.timerFrame.font:SetTextColor(1, 0.8, 0) - self.timerFrame:Show() + for i=1,2 do + self["timerFrame" .. i].font:SetText("1:30") + self["timerFrame" .. i].font:SetTextColor(1, 0.8, 0) + end + self.anchor:Show() end function ShadowsightTimer:AURA_GAIN(unit, auraType, spellID) if (spellID == 34709) then - --TODO reset timer after 15s + self:Start(Gladdy.db.shadowsightTimerResetTime, self:GetHiddenTimer()) end end @@ -43,96 +155,53 @@ function ShadowsightTimer:CHAT_MSG_BG_SYSTEM_NEUTRAL(msg) for k,v in pairs(self.locale) do if str_find(msg, v) then if k == 0 then - self:Start() + self:Start(nil, self.timerFrame1) + self:Start(nil, self.timerFrame2) end end end end +--------------------------- + +-- TEST + +--------------------------- + function ShadowsightTimer:Test() if Gladdy.db.shadowsightTimerEnabled then - self.timerFrame:Show() - self:Start() + self.anchor:Show() + ShadowsightTimer:JOINED_ARENA() + self:Start(20, self.timerFrame1) + self:Start(25, self.timerFrame2) end end -function ShadowsightTimer:Reset() - self.timerFrame:Hide() - self.timerFrame:SetScript("OnUpdate", nil) - self.timerFrame.font:SetTextColor(1, 0.8, 0) -end +--------------------------- -function ShadowsightTimer:CreateTimerFrame() - self.timerFrame = CreateFrame("Frame", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate") - self.timerFrame:SetPoint(Gladdy.db.shadowsightTimerRelPoint1, nil, Gladdy.db.shadowsightTimerRelPoint, Gladdy.db.shadowsightTimerX, Gladdy.db.shadowsightTimerY) +-- TIMER - local backdrop = { - bgFile = "Interface/Tooltips/UI-Tooltip-Background", - edgeFile = "", - tile = true, tileSize = 16, edgeSize = 10, - insets = {left = 0, right = 0, top = 0, bottom = 0} - } +--------------------------- - self.timerFrame:SetBackdrop(backdrop) - self.timerFrame:SetBackdropColor(0,0,0,0.8) - self.timerFrame:SetHeight(17) - self.timerFrame:SetWidth(35) - - self.timerFrame:SetMovable(true) - self.timerFrame:EnableMouse(true) - - self.timerFrame.texture = self.timerFrame:CreateTexture(nil,"OVERLAY") - self.timerFrame.texture:SetWidth(16) - self.timerFrame.texture:SetHeight(16) - self.timerFrame.texture:SetTexture("Interface\\Icons\\Spell_Shadow_EvilEye") - self.timerFrame.texture:SetTexCoord(0.125,0.875,0.125,0.875) - self.timerFrame.texture:SetPoint("RIGHT", self.timerFrame, "LEFT") - - self.timerFrame.font = self.timerFrame:CreateFontString(nil,"OVERLAY","GameFontNormal") - self.timerFrame.font:SetPoint("LEFT", 5, 0) - self.timerFrame.font:SetJustifyH("LEFT") - self.timerFrame.font:SetTextColor(1, 0.8, 0) - - self.timerFrame:SetScript("OnMouseDown",function(self) self:StartMoving() end) - self.timerFrame:SetScript("OnMouseUp",function(self) - self:StopMovingOrSizing() - Gladdy.db.shadowsightTimerRelPoint1,_,Gladdy.db.shadowsightTimerRelPoint2,Gladdy.db.shadowsightTimerX,Gladdy.db.shadowsightTimerY = self:GetPoint() - end) - self.timerFrame:SetScale(Gladdy.db.shadowsightTimerScale) - self.timerFrame:Hide() -end - -function ShadowsightTimer:UpdateFrameOnce() - self.timerFrame:EnableMouse(not Gladdy.db.shadowsightTimerLocked) - if Gladdy.db.shadowsightTimerEnabled then - self.timerFrame:SetScale(Gladdy.db.shadowsightTimerScale) - self.timerFrame:ClearAllPoints() - self.timerFrame:SetPoint(Gladdy.db.shadowsightTimerRelPoint1, nil, Gladdy.db.shadowsightTimerRelPoint2, Gladdy.db.shadowsightTimerX, Gladdy.db.shadowsightTimerY) - if Gladdy.frame.testing or Gladdy.curBracket then - self.timerFrame:Show() - end - else - self.timerFrame:SetScale(Gladdy.db.shadowsightTimerScale) - self.timerFrame:ClearAllPoints() - self.timerFrame:SetPoint(Gladdy.db.shadowsightTimerRelPoint1, nil, Gladdy.db.shadowsightTimerRelPoint2, Gladdy.db.shadowsightTimerX, Gladdy.db.shadowsightTimerY) - self.timerFrame:Hide() - end -end - -function ShadowsightTimer:Start() - self.timerFrame.endTime = 91 - self.timerFrame.timeSinceLastUpdate = 0 - self.timerFrame:SetScript("OnUpdate", ShadowsightTimer.OnUpdate) +function ShadowsightTimer:Start(time, frame) + frame.endTime = time or Gladdy.db.shadowsightTimerStartTime + frame.active = true + ShadowsightTimer:NotifyStart() + frame.announced = nil + frame.timeSinceLastUpdate = 0 + frame.font:SetTextColor(1, 0.8, 0) + frame:SetScript("OnUpdate", ShadowsightTimer.OnUpdate) end function ShadowsightTimer.OnUpdate(self, elapsed) self.timeSinceLastUpdate = self.timeSinceLastUpdate + elapsed; self.endTime = self.endTime - elapsed - if (self.timeSinceLastUpdate > 0.1) then + if (self.timeSinceLastUpdate > 0.01) then self.font:SetFormattedText(floor(self.endTime / 60) .. ":" .. "%02d", self.endTime - floor(self.endTime / 60) * 60) self.timeSinceLastUpdate = 0; - if floor(self.endTime) == 15 and Gladdy.db.shadowsightAnnounce then + if floor(self.endTime) == 15 and Gladdy.db.shadowsightAnnounce and not self.announced then + self.announced = true Gladdy:SendMessage("SHADOWSIGHT", L["Shadowsight up in %ds"]:format(15)) end end @@ -143,9 +212,61 @@ function ShadowsightTimer.OnUpdate(self, elapsed) self:SetScript("OnUpdate", nil) self.font:SetText("0:00") self.font:SetTextColor(0, 1, 0) + self.active = false + ShadowsightTimer:NotifyEnd() end end +function ShadowsightTimer:NotifyStart() + local show = Gladdy.db.shadowsightTimerShowTwoTimer + if self.timerFrame1.active and self.timerFrame2.active then + if self.timerFrame1.endTime < self.timerFrame2.endTime then + self.timerFrame1:SetAlpha(1) + self.timerFrame2:SetAlpha(show and 1 or 0) + else + self.timerFrame1:SetAlpha(show and 1 or 0) + self.timerFrame2:SetAlpha(1) + end + else + if self.timerFrame1.active then + self.timerFrame1:SetAlpha(1) + self.timerFrame2:SetAlpha(show and 1 or 0) + elseif self.timerFrame2.active then + self.timerFrame1:SetAlpha(show and 1 or 0) + self.timerFrame2:SetAlpha(1) + else + self.timerFrame1:SetAlpha(1) + self.timerFrame2:SetAlpha(show and 1 or 0) + end + end +end +function ShadowsightTimer:NotifyEnd() + local show = Gladdy.db.shadowsightTimerShowTwoTimer + if self.timerFrame1.active then + self.timerFrame1:SetAlpha(1) + self.timerFrame2:SetAlpha(show and 1 or 0) + elseif self.timerFrame2.active then + self.timerFrame1:SetAlpha(show and 1 or 0) + self.timerFrame2:SetAlpha(1) + else + self.timerFrame1:SetAlpha(1) + self.timerFrame2:SetAlpha(show and 1 or 0) + end +end +function ShadowsightTimer:GetHiddenTimer() + if self.timerFrame1.active and self.timerFrame2.active then + return self.timerFrame1.endTime < self.timerFrame2.endTime and self.timerFrame1 or self.timerFrame2 + else + return self.timerFrame1.active and self.timerFrame2 or self.timerFrame1 + end +end + +--------------------------- + +-- OPTIONS + +--------------------------- + function ShadowsightTimer:GetOptions() return { headerArenaCountdown = { @@ -167,21 +288,52 @@ function ShadowsightTimer:GetOptions() order = 4, width = "full", }), + shadowsightTimerShowTwoTimer = Gladdy:option({ + type = "toggle", + name = L["Show two timers"], + order = 5, + width = "full", + }), shadowsightAnnounce = Gladdy:option({ type = "toggle", name = L["Announce"], --desc = L["Turns countdown before the start of an arena match on/off."], - order = 5, + order = 6, width = "full", }), shadowsightTimerScale = Gladdy:option({ type = "range", name = L["Scale"], - order = 6, + order = 7, min = 0.1, max = 5, step = 0.1, width = "full", }), + headerTimer = { + type = "header", + name = L["Shadowsight CDs"], + order = 10, + }, + shadowsightTimerStartTime = Gladdy:option({ + type = "range", + name = L["Start Time"], + desc = L["Start time in seconds"], + min = 80, + max = 100, + order = 11, + step = 0.1, + width = "full", + }), + shadowsightTimerResetTime = Gladdy:option({ + type = "range", + name = L["Reset Time"], + desc = L["Reset time in seconds"], + min = 110, + max = 130, + order = 12, + step = 0.1, + width = "full", + }), } end \ No newline at end of file -- 2.39.5 From b5f67d066fe42acf7cefc53ab68b6c42b2a2083b Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 04:27:16 +0100 Subject: [PATCH 036/227] fix castbar hiding --- Modules/Castbar.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 7cb266d..f4c6086 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -232,7 +232,7 @@ function Castbar.OnUpdate(castBar, elapsed) castBar.fadeOut = nil; castBar.timeText:Show() castBar.spark:Show() - castBar:Hide(); + castBar:SetAlpha(0) end end end @@ -241,7 +241,7 @@ Castbar.CastEventsFunc = {} Castbar.CastEventsFunc["UNIT_SPELLCAST_START"] = function(castBar, event, ...) local name, text, texture, startTime, endTime, isTradeSkill, castID = UnitCastingInfo(castBar.unit) if ( not name or (not castBar.showTradeSkills and isTradeSkill)) then - castBar:Hide() + castBar:SetAlpha(0) return end @@ -272,7 +272,7 @@ Castbar.CastEventsFunc["UNIT_SPELLCAST_SUCCEEDED"] = function(castBar, event, .. end Castbar.CastEventsFunc["UNIT_SPELLCAST_STOP"] = function(castBar, event, ...) if ( not castBar:IsVisible() ) then - castBar:Hide() + castBar:SetAlpha(0) end if ( (castBar.casting and event == "UNIT_SPELLCAST_STOP" and select(2, ...) == castBar.castID) or (castBar.channeling and event == "UNIT_SPELLCAST_CHANNEL_STOP") ) then @@ -320,7 +320,7 @@ Castbar.CastEventsFunc["UNIT_SPELLCAST_DELAYED"] = function(castBar, event, ...) if ( not name or (not castBar.showTradeSkills and isTradeSkill)) then -- if there is no name, there is no bar - castBar:Hide() + castBar:SetAlpha(0) return end castBar.value = (GetTime() - (startTime / 1000)) @@ -338,7 +338,7 @@ Castbar.CastEventsFunc["UNIT_SPELLCAST_CHANNEL_START"] = function(castBar, event local name, text, texture, startTime, endTime, isTradeSkill, spellID = UnitChannelInfo(castBar.unit) if ( not name or (not castBar.showTradeSkills and isTradeSkill)) then - castBar:Hide() + castBar:SetAlpha(0) return end if ( castBar.spark ) then @@ -356,7 +356,7 @@ Castbar.CastEventsFunc["UNIT_SPELLCAST_CHANNEL_UPDATE"] = function(castBar, even if ( castBar:IsShown() ) then local name, text, texture, startTime, endTime, isTradeSkill = UnitChannelInfo(castBar.unit) if ( not name or (not castBar.showTradeSkills and isTradeSkill)) then - castBar:Hide() + castBar:SetAlpha(0) return end castBar.value = ((endTime / 1000) - GetTime()) -- 2.39.5 From 2e3fb06269fc11b5275656e67304196f2c878133 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 04:27:45 +0100 Subject: [PATCH 037/227] DR Level text default on --- Modules/Diminishings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index 5c3acd9..a2b89f1 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -44,9 +44,9 @@ local Diminishings = Gladdy:NewModule("Diminishings", nil, { drHalfColor = {r = 1, g = 1, b = 0, a = 1 }, drQuarterColor = {r = 1, g = 0.7, b = 0, a = 1 }, drNullColor = {r = 1, g = 0, b = 0, a = 1 }, - drLevelTextEnabled = false, + drLevelTextEnabled = true, drLevelTextFont = "DorisPP", - drLevelTextFontScale = 1, + drLevelTextFontScale = 0.8, drWidthFactor = 1, drCategories = defaultCategories(), drDuration = 18, -- 2.39.5 From 035942abbe570568241458e03b34c1433b1188b5 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 11 Jan 2022 04:33:41 +0100 Subject: [PATCH 038/227] bump version --- Gladdy.toc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gladdy.toc b/Gladdy.toc index cfb91f4..5113781 100644 --- a/Gladdy.toc +++ b/Gladdy.toc @@ -1,7 +1,7 @@ -## Interface: 20502 +## Interface: 20503 ## Title: Gladdy - TBC -## Version: 1.22-Release -## Notes: The most powerful arena AddOn for WoW 2.5.1 +## Version: 2.00-Release +## Notes: The most powerful arena AddOn for WoW 2.5.3 ## Author: XiconQoo, DnB_Junkee, Knall ## X-Email: contact me on discord Knall#1751 ## SavedVariables: GladdyXZ -- 2.39.5 From 5766484f92810d75aeefe839d7980d4a16f3e170 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 02:24:46 +0100 Subject: [PATCH 039/227] detach auras and interrupts --- Modules/Auras.lua | 320 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 284 insertions(+), 36 deletions(-) diff --git a/Modules/Auras.lua b/Modules/Auras.lua index 63c2b4f..2e694cd 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -41,7 +41,17 @@ local Auras = Gladdy:NewModule("Auras", nil, { auraListDefault = defaultSpells(), auraListInterrupts = defaultInterrupts(), auraInterruptColorsEnabled = true, - auraInterruptColors = Gladdy:GetSpellSchoolColors() + auraInterruptColors = Gladdy:GetSpellSchoolColors(), + auraDetached = false, + auraXOffset = 0, + auraYOffset = 0, + auraSize = 60 + 20 + 1, + auraWidthFactor = 0.9, + auraInterruptDetached = false, + auraInterruptXOffset = 0, + auraInterruptYOffset = 0, + auraInterruptSize = 60 + 20 + 1, + auraInterruptWidthFactor = 0.9, }) function Auras:Initialize() @@ -57,25 +67,30 @@ function Auras:Initialize() end function Auras:CreateFrame(unit) - local auraFrame = CreateFrame("Frame", nil, Gladdy.modules["Class Icon"].frames[unit]) + local auraFrame = CreateFrame("Frame", nil, Gladdy.buttons[unit]) auraFrame:EnableMouse(false) auraFrame:SetFrameStrata("MEDIUM") auraFrame:SetFrameLevel(3) + auraFrame.frame = CreateFrame("Frame", nil, auraFrame) + auraFrame.frame:SetPoint("TOPLEFT", auraFrame, "TOPLEFT") + auraFrame.frame:EnableMouse(false) + auraFrame.frame:SetFrameStrata("MEDIUM") + auraFrame.frame:SetFrameLevel(3) - auraFrame.cooldown = CreateFrame("Cooldown", nil, auraFrame, "CooldownFrameTemplate") + auraFrame.cooldown = CreateFrame("Cooldown", nil, auraFrame.frame, "CooldownFrameTemplate") auraFrame.cooldown.noCooldownCount = true auraFrame.cooldown:SetFrameStrata("MEDIUM") auraFrame.cooldown:SetFrameLevel(4) auraFrame.cooldown:SetReverse(true) auraFrame.cooldown:SetHideCountdownNumbers(true) - auraFrame.cooldownFrame = CreateFrame("Frame", nil, auraFrame) + auraFrame.cooldownFrame = CreateFrame("Frame", nil, auraFrame.frame) auraFrame.cooldownFrame:ClearAllPoints() - auraFrame.cooldownFrame:SetAllPoints(auraFrame) + auraFrame.cooldownFrame:SetAllPoints(auraFrame.frame) auraFrame.cooldownFrame:SetFrameStrata("MEDIUM") auraFrame.cooldownFrame:SetFrameLevel(5) - auraFrame.icon = auraFrame:CreateTexture(nil, "BACKGROUND") + auraFrame.icon = auraFrame.frame:CreateTexture(nil, "BACKGROUND") auraFrame.icon:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask") auraFrame.icon:SetAllPoints(auraFrame) @@ -98,10 +113,10 @@ function Auras:CreateFrame(unit) auraFrame:SetScript("OnUpdate", function(self, elapsed) if (self.active) then - if (self.interruptFrame.priority and self.priority < self.interruptFrame.priority) then - self:SetAlpha(0.01) + if (not Gladdy.db.auraInterruptDetached and not Gladdy.db.auraDetached and self.interruptFrame.priority and self.priority < self.interruptFrame.priority) then + self.frame:SetAlpha(0.001) else - self:SetAlpha(1) + self.frame:SetAlpha(1) end if (self.timeLeft <= 0) then Auras:AURA_FADE(self.unit, self.track) @@ -114,7 +129,7 @@ function Auras:CreateFrame(unit) self.timeLeft = self.timeLeft - elapsed end else - self:SetAlpha(0.01) + self.frame:SetAlpha(0.001) end end) @@ -125,30 +140,35 @@ function Auras:CreateFrame(unit) end function Auras:CreateInterrupt(unit) - local interruptFrame = CreateFrame("Frame", nil, Gladdy.modules["Class Icon"].frames[unit]) + local interruptFrame = CreateFrame("Frame", nil, Gladdy.buttons[unit]) interruptFrame:EnableMouse(false) interruptFrame:SetFrameStrata("MEDIUM") interruptFrame:SetFrameLevel(3) + interruptFrame.frame = CreateFrame("Frame", nil, interruptFrame) + interruptFrame.frame:SetPoint("TOPLEFT", interruptFrame, "TOPLEFT") + interruptFrame.frame:EnableMouse(false) + interruptFrame.frame:SetFrameStrata("MEDIUM") + interruptFrame.frame:SetFrameLevel(3) - interruptFrame.cooldown = CreateFrame("Cooldown", nil, interruptFrame, "CooldownFrameTemplate") + interruptFrame.cooldown = CreateFrame("Cooldown", nil, interruptFrame.frame, "CooldownFrameTemplate") interruptFrame.cooldown.noCooldownCount = true interruptFrame.cooldown:SetFrameStrata("MEDIUM") interruptFrame.cooldown:SetFrameLevel(4) interruptFrame.cooldown:SetReverse(true) interruptFrame.cooldown:SetHideCountdownNumbers(true) - interruptFrame.cooldownFrame = CreateFrame("Frame", nil, interruptFrame) + interruptFrame.cooldownFrame = CreateFrame("Frame", nil, interruptFrame.frame) interruptFrame.cooldownFrame:ClearAllPoints() - interruptFrame.cooldownFrame:SetAllPoints(interruptFrame) + interruptFrame.cooldownFrame:SetAllPoints(interruptFrame.frame) interruptFrame.cooldownFrame:SetFrameStrata("MEDIUM") interruptFrame.cooldownFrame:SetFrameLevel(5) - interruptFrame.icon = interruptFrame:CreateTexture(nil, "BACKGROUND") + interruptFrame.icon = interruptFrame.frame:CreateTexture(nil, "BACKGROUND") interruptFrame.icon:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask") - interruptFrame.icon:SetAllPoints(interruptFrame) + interruptFrame.icon:SetAllPoints(interruptFrame.frame) interruptFrame.icon.overlay = interruptFrame.cooldownFrame:CreateTexture(nil, "OVERLAY") - interruptFrame.icon.overlay:SetAllPoints(interruptFrame) + interruptFrame.icon.overlay:SetAllPoints(interruptFrame.frame) interruptFrame.icon.overlay:SetTexture(Gladdy.db.buttonBorderStyle) local classIcon = Gladdy.modules["Class Icon"].frames[unit] @@ -166,23 +186,25 @@ function Auras:CreateInterrupt(unit) interruptFrame:SetScript("OnUpdate", function(self, elapsed) if (self.active) then - if (Auras.frames[self.unit].priority and self.priority <= Auras.frames[self.unit].priority) then - self:SetAlpha(0.01) + if (not Gladdy.db.auraInterruptDetached and Auras.frames[self.unit].priority and self.priority <= Auras.frames[self.unit].priority) then + self.frame:SetAlpha(0.001) else - self:SetAlpha(1) + self.frame:SetAlpha(1) end if (self.timeLeft <= 0) then self.active = false self.priority = nil self.spellSchool = nil self.cooldown:Clear() - self:SetAlpha(0.01) + self.frame:SetAlpha(0.001) else self.timeLeft = self.timeLeft - elapsed Gladdy:FormatTimer(self.text, self.timeLeft, self.timeLeft < 10) end else - self:SetAlpha(0.01) + self.priority = nil + self.spellSchool = nil + self.frame:SetAlpha(0.001) end end) @@ -197,16 +219,40 @@ function Auras:UpdateFrame(unit) return end - local width, height = Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor, Gladdy.db.classIconSize + local width, height + + if Gladdy.db.auraDetached then + width, height = Gladdy.db.auraSize * Gladdy.db.auraWidthFactor, Gladdy.db.auraSize + auraFrame:ClearAllPoints() + Gladdy:SetPosition(auraFrame, unit, "auraXOffset", "auraYOffset", true, Auras) + if (unit == "arena1") then + Gladdy:CreateMover(auraFrame, "auraXOffset", "auraYOffset", L["Auras"], + {"TOPLEFT", "TOPLEFT"}, + width, + height, + 0, + 0) + end + else + width, height = Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor, Gladdy.db.classIconSize + auraFrame:ClearAllPoints() + auraFrame:SetPoint("TOPLEFT", Gladdy.modules["Class Icon"].frames[unit], "TOPLEFT") + if auraFrame.mover then + auraFrame.mover:Hide() + end + end auraFrame:SetWidth(width) auraFrame:SetHeight(height) - auraFrame:SetAllPoints(Gladdy.modules["Class Icon"].frames[unit]) + auraFrame.frame:SetWidth(height) + auraFrame.frame:SetHeight(height) + auraFrame.cooldownFrame:ClearAllPoints() + auraFrame.cooldownFrame:SetAllPoints(auraFrame) - auraFrame.cooldown:SetWidth(width - width/16) - auraFrame.cooldown:SetHeight(height - height/16) auraFrame.cooldown:ClearAllPoints() auraFrame.cooldown:SetPoint("CENTER", auraFrame, "CENTER") + auraFrame.cooldown:SetWidth(width - width/16) + auraFrame.cooldown:SetHeight(height - height/16) auraFrame.cooldown:SetAlpha(Gladdy.db.auraCooldownAlpha) auraFrame.text:SetFont(Gladdy:SMFetch("font", "auraFont"), (width/2 - 1) * Gladdy.db.auraFontSizeScale, "OUTLINE") @@ -235,16 +281,49 @@ function Auras:UpdateInterruptFrame(unit) return end - local width, height = Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor, Gladdy.db.classIconSize + local width, height + + if Gladdy.db.auraInterruptDetached then + width, height = Gladdy.db.auraInterruptSize * Gladdy.db.auraInterruptWidthFactor, Gladdy.db.auraInterruptSize + interruptFrame:ClearAllPoints() + Gladdy:SetPosition(interruptFrame, unit, "auraInterruptXOffset", "auraInterruptYOffset", true, Auras) + if (unit == "arena1") then + Gladdy:CreateMover(interruptFrame, "auraInterruptXOffset", "auraInterruptYOffset", L["Interrupts"], + {"TOPLEFT", "TOPLEFT"}, + width, + height, + 0, + 0) + end + else + if Gladdy.db.auraDetached then + width, height = Gladdy.db.auraSize * Gladdy.db.auraWidthFactor, Gladdy.db.auraSize + interruptFrame:ClearAllPoints() + interruptFrame:SetAllPoints(self.frames[unit]) + if interruptFrame.mover then + interruptFrame.mover:Hide() + end + else + width, height = Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor, Gladdy.db.classIconSize + interruptFrame:ClearAllPoints() + interruptFrame:SetPoint("TOPLEFT", Gladdy.modules["Class Icon"].frames[unit], "TOPLEFT") + if interruptFrame.mover then + interruptFrame.mover:Hide() + end + end + end interruptFrame:SetWidth(width) interruptFrame:SetHeight(height) - interruptFrame:SetAllPoints(Gladdy.modules["Class Icon"].frames[unit]) + interruptFrame.frame:SetWidth(width) + interruptFrame.frame:SetHeight(height) + interruptFrame.cooldownFrame:ClearAllPoints() + interruptFrame.cooldownFrame:SetAllPoints(interruptFrame.frame) - interruptFrame.cooldown:SetWidth(width - width/16) - interruptFrame.cooldown:SetHeight(height - height/16) interruptFrame.cooldown:ClearAllPoints() interruptFrame.cooldown:SetPoint("CENTER", interruptFrame, "CENTER") + interruptFrame.cooldown:SetWidth(width - width/16) + interruptFrame.cooldown:SetHeight(height - height/16) interruptFrame.cooldown:SetAlpha(Gladdy.db.auraCooldownAlpha) interruptFrame.text:SetFont(Gladdy:SMFetch("font", "auraFont"), (width/2 - 1) * Gladdy.db.auraFontSizeScale, "OUTLINE") @@ -265,9 +344,15 @@ function Auras:UpdateInterruptFrame(unit) end function Auras:ResetUnit(unit) - self.frames[unit]:UnregisterAllEvents() + self.frames[unit].interruptFrame.active = false + self.frames[unit].active = false self:AURA_FADE(unit, AURA_TYPE_DEBUFF) self:AURA_FADE(unit, AURA_TYPE_BUFF) + self.frames[unit]:UnregisterAllEvents() + self.frames[unit]:Hide() + self.frames[unit].interruptFrame:Hide() + self.frames[unit].interruptFrame.priority = nil + self.frames[unit].interruptFrame.spellSchool = nil end function Auras:Test(unit) @@ -275,6 +360,10 @@ function Auras:Test(unit) self:AURA_FADE(unit, AURA_TYPE_BUFF) self:AURA_FADE(unit, AURA_TYPE_DEBUFF) + if not self.frames[unit]:IsShown() then + self.frames[unit]:Show() + self.frames[unit].interruptFrame:Show() + end --Auras local enabledDebuffs, enabledBuffs, testauras = {}, {} @@ -310,6 +399,8 @@ function Auras:Test(unit) self:AURA_GAIN(unit,v.value.track, spellid, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration) end end + -- /run LibStub("Gladdy").modules["Auras"]:Test("arena1") + -- /run LibStub("Gladdy"):JoinedArena() --Interrupts if (unit == "arena1" or unit == "arena3") then @@ -333,10 +424,15 @@ function Auras:Test(unit) end function Auras:JOINED_ARENA() - --[[for i=1, Gladdy.curBracket do - self.frames["arena" .. i]:RegisterUnitEvent("UNIT_AURA", "arena" .. i) - self.frames["arena" .. i]:SetScript("OnEvent", Auras.OnEvent) - end--]] + for i=1, Gladdy.curBracket do + local unit = "arena" .. i + self.frames[unit].interruptFrame.active = false + self.frames[unit].active = false + self:AURA_FADE(unit, AURA_TYPE_DEBUFF) + self:AURA_FADE(unit, AURA_TYPE_BUFF) + self.frames[unit].frame:Show() + self.frames[unit].interruptFrame.frame:Show() + end end function Auras:AURA_GAIN(unit, auraType, spellID, spellName, icon, duration, expirationTime, count, debuffType) @@ -418,7 +514,7 @@ end function Auras:SPELL_INTERRUPT(unit,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool) local auraFrame = self.frames[unit] - local interruptFrame = auraFrame and auraFrame.interruptFrame + local interruptFrame = auraFrame ~= nil and auraFrame.interruptFrame local button = Gladdy.buttons[unit] if (not interruptFrame) then return @@ -532,6 +628,158 @@ function Auras:GetOptions() name = L["Frame"], order = 3, args = { + detachedAuraMode = { + type = "group", + name = L["Detached Aura"], + order = 4, + args = { + headerDetachedMode = { + type = "header", + name = L["Detached Mode"], + order = 1, + }, + auraDetached = Gladdy:option({ + type = "toggle", + name = L["Aura Detached"], + order = 2, + width = "full" + }), + headerAuraSize = { + type = "header", + name = L["Size"], + order = 10, + }, + auraSize = Gladdy:option({ + type = "range", + name = L["Aura size"], + disabled = function() + return not Gladdy.db.auraDetached + end, + min = 3, + max = 100, + step = 0.1, + order = 11, + width = "full", + }), + auraWidthFactor = Gladdy:option({ + type = "range", + name = L["Aura width factor"], + disabled = function() + return not Gladdy.db.auraDetached + end, + min = 0.5, + max = 2, + step = 0.05, + order = 12, + width = "full", + }), + headerAuraPosition = { + type = "header", + name = L["Position"], + order = 20, + }, + auraXOffset = Gladdy:option({ + type = "range", + name = L["Aura X Offset"], + disabled = function() + return not Gladdy.db.auraDetached + end, + min = -1000, + max = 1000, + step = 0.01, + order = 21, + width = "full", + }), + auraYOffset = Gladdy:option({ + type = "range", + name = L["Aura Y Offset"], + disabled = function() + return not Gladdy.db.auraDetached + end, + min = -1000, + max = 1000, + step = 0.01, + order = 22, + width = "full", + }), + } + }, + detachedInterruptMode = { + type = "group", + name = L["Detached Interrupt"], + order = 5, + args = { + headerDetachedMode = { + type = "header", + name = L["Detached Mode"], + order = 1, + }, + auraInterruptDetached = Gladdy:option({ + type = "toggle", + name = L["Interrupt Detached"], + order = 2, + width = "full" + }), + headerAuraSize = { + type = "header", + name = L["Size"], + order = 10, + }, + auraInterruptSize = Gladdy:option({ + type = "range", + name = L["Interrupt size"], + disabled = function() + return not Gladdy.db.auraInterruptDetached + end, + min = 3, + max = 100, + step = 0.1, + order = 11, + width = "full", + }), + auraInterruptWidthFactor = Gladdy:option({ + type = "range", + name = L["Interrupt width factor"], + disabled = function() + return not Gladdy.db.auraInterruptDetached + end, + min = 0.5, + max = 2, + step = 0.05, + order = 12, + width = "full", + }), + headerAuraPosition = { + type = "header", + name = L["Position"], + order = 20, + }, + auraInterruptXOffset = Gladdy:option({ + type = "range", + name = L["Interrupt X Offset"], + disabled = function() + return not Gladdy.db.auraInterruptDetached + end, + min = -1000, + max = 1000, + step = 0.01, + order = 21, + width = "full", + }), + auraInterruptYOffset = Gladdy:option({ + type = "range", + name = L["Interrupt Y Offset"], + disabled = function() + return not Gladdy.db.auraInterruptDetached + end, + min = -1000, + max = 1000, + step = 0.01, + order = 22, + width = "full", + }), + } + }, cooldown = { type = "group", name = L["Cooldown"], -- 2.39.5 From 91f7fcb998e5d7df5eee11bd5f2dc9413786f5ff Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 02:25:11 +0100 Subject: [PATCH 040/227] classIcon add enable option --- Modules/Classicon.lua | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Modules/Classicon.lua b/Modules/Classicon.lua index 8890d5b..6599650 100644 --- a/Modules/Classicon.lua +++ b/Modules/Classicon.lua @@ -5,6 +5,7 @@ local CreateFrame = CreateFrame local GetSpellInfo = GetSpellInfo local L = Gladdy.L local Classicon = Gladdy:NewModule("Class Icon", 81, { + classIconEnabled = true, classIconSize = 60 + 20 + 1, classIconWidthFactor = 0.9, classIconBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp", @@ -129,6 +130,11 @@ function Classicon:UpdateFrame(unit) classIcon.texture.overlay:SetTexture(Gladdy.db.classIconBorderStyle) classIcon.texture.overlay:SetVertexColor(Gladdy.db.classIconBorderColor.r, Gladdy.db.classIconBorderColor.g, Gladdy.db.classIconBorderColor.b, Gladdy.db.classIconBorderColor.a) + if Gladdy.db.classIconEnabled then + classIcon:Show() + else + classIcon:Hide() + end end function Classicon:ENEMY_SPOTTED(unit) @@ -170,11 +176,16 @@ function Classicon:GetOptions() name = L["Class Icon"], order = 2, }, + classIconEnabled = Gladdy:option({ + type = "toggle", + name = L["Class Icon Enabled"], + order = 3, + }), classIconSpecIcon = { type = "toggle", name = L["Show Spec Icon"], desc = L["Shows Spec Icon once spec is detected"], - order = 3, + order = 4, get = function() return Gladdy.db.classIconSpecIcon end, set = function(_, value) Gladdy.db.classIconSpecIcon = value @@ -208,9 +219,9 @@ function Classicon:GetOptions() classIconSize = Gladdy:option({ type = "range", name = L["Icon size"], - min = 1, + min = 3, max = 100, - step = 1, + step = .1, order = 3, width = "full", }), -- 2.39.5 From 2c4308712d987f09c537d4b8010799f3cd84b246 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 02:25:40 +0100 Subject: [PATCH 041/227] hide AnnouncementFrame when not in arena --- Modules/ArenaCountDown.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/ArenaCountDown.lua b/Modules/ArenaCountDown.lua index 38b6076..c02c72d 100644 --- a/Modules/ArenaCountDown.lua +++ b/Modules/ArenaCountDown.lua @@ -92,6 +92,7 @@ end function ACDFrame:JOINED_ARENA() if Gladdy.db.countdown then + self.ACDNumFrame:Show() self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL") self:SetScript("OnEvent", ACDFrame.OnEvent) self.endTime = GetTime() + 70 @@ -152,6 +153,7 @@ function ACDFrame:Reset() self:UnregisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL") self:SetScript("OnUpdate", nil) self.hidden = true; + self.ACDNumFrame:Hide() self.ACDNumTens:Hide(); self.ACDNumOnes:Hide(); self.ACDNumOne:Hide(); -- 2.39.5 From b351bd9c2317021e49bd2082fafeb50f31de027b Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 07:33:20 +0100 Subject: [PATCH 042/227] update Readme v2.00 --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b427e3d..801c4c2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Gladdy - TBC ### The most powerful arena addon for WoW TBC 2.5.1 -## [v1.22-Release Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.22-Release/Gladdy_TBC-Classic_v1.22-Release.zip) +## [v2.00-Release Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v2.00-Release/Gladdy_TBC-Classic_v2.00-Release.zip) ###### Please consider donating if you like my work @@ -68,9 +68,63 @@ Thank you! - **Klimp** (thanks for all the suggestions and active feedback) - **the whole TBC addons 2.4.3 discord** (thanks for the support and great community, especially the MVPs) - **Hydra** (thanks for constructive feedback and suggestions) +- **Xyz** (thanks for suggestions) ### Changes +### v2.00-Release +- major release version set to v2 + - this will mean, that export strings will still be backwards compatible, but not forward (v2 String cant be imported into v1 Strings but vice versa) +- big overhaul of positioning elements added! All elements besides HP and PowerBar can be moved separately + - added Mover Frames for Auras, Interrupts, (De)Buffs, CastBar, ClassIcon, CombatIndicator, Cooldowns, DRs, Pets, Racial, Trinket + - this will hopefully make configuration a lot easier +- SpecDetection: + - fixed spec detection for Paladins + - added following spells for better spec detection: + - Expose Weakness (Survival Hunter) + - Slow (Arcane Mage) + - Improved Blink (Fire Mage) + - Vindication (Retribution Paladin) + - Holy Shield (Protection Paladin) + - Vampiric Embrace (Shadow Priest) + - Blade Flurry (Combat Rogue) + - Unleashed Rage (Enhancement Shaman) + - Flurry (Enhancement Shaman) + - Shamanistic Rage (Enhancement Shaman) + - Healing Way (Restoration Shaman) + - Totem of Wrath (Elemental Shaman) + - Dark Pact (Affliction Warlock) + - Conflagate (Destruction Warlock) + - Shield Slam (Protection Warrior) +- Cooldowns: + - added Fear Ward and Fear Ward Cooldown Detection in case it was used before arena + - added following cooldowns: + - Scare Beast (Hunter) + - Feign Death (Hunter) + - Viper Sting (Hunter) + - Flare (Hunter) + - Fear Ward (Priest) + - Shadow Word: Death (Priest) + - Evocation (Mage) + - Grounding Totem (Shaman) + - Spell Lock (Warlock) + - Devour Magic (Warlock) + - Intercept (Warrior) +- Auras/Interrupts: + - can now be detached from ClassIcon and positioned/scaled anywhere separately + - added Auras: + - Scare Beast (Hunter) + - Fear Ward (Priest) +- Pixel Perfect option added (makes your Gladdy Frames pixel perfect - no more wierd scaling interferences) +- Pets can be grouped (not perfect yet, but a first step) +- added DR-Level Text (thanks https://github.com/ManneN1) +- added zhCN Locale (thanks https://github.com/veiz) +- Shadowsight: + - reset timer when buff was taken + - add a configurable 2nd timer or show one timer with closest CD +- fixed some DR-categories (Hibernate/Chastice/Dragonsbreath/ImpConcussiveShot/Counterattack) +- ClassIcon can be disabled + ### v1.22-Release - fixed import for some localizations not working - added cooldown number alpha configurations for Auras, BuffsDebuffs, Cooldowns, Diminishings, Racial & Trinket -- 2.39.5 From 61e49ffb8c0fc738b8abf98c8ad35245937c2d4d Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 16:09:47 +0100 Subject: [PATCH 043/227] fix auras not showing --- Modules/Auras.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Auras.lua b/Modules/Auras.lua index 2e694cd..cb75260 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -430,8 +430,8 @@ function Auras:JOINED_ARENA() self.frames[unit].active = false self:AURA_FADE(unit, AURA_TYPE_DEBUFF) self:AURA_FADE(unit, AURA_TYPE_BUFF) - self.frames[unit].frame:Show() - self.frames[unit].interruptFrame.frame:Show() + self.frames[unit]:Show() + self.frames[unit].interruptFrame:Show() end end -- 2.39.5 From 978ba56f85a6fbf800d4b38117b6d9999678ed9a Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 16:11:10 +0100 Subject: [PATCH 044/227] fix cooldowns not showing on reloadui during arena --- Gladdy.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gladdy.lua b/Gladdy.lua index 53160f2..e378938 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -422,6 +422,7 @@ function Gladdy:PLAYER_REGEN_ENABLED() self.startTest = nil end self.frame:Show() + self:SendMessage("JOINED_ARENA") self.showFrame = nil end if self.hideFrame then @@ -508,13 +509,13 @@ function Gladdy:JoinedArena() end end - self:SendMessage("JOINED_ARENA") if InCombatLockdown() then Gladdy:Print("Gladdy frames show as soon as you leave combat") self.showFrame = true else self:UpdateFrame() self.frame:Show() + self:SendMessage("JOINED_ARENA") end for i=1, self.curBracket do self.buttons["arena" .. i]:SetAlpha(1) -- 2.39.5 From 114a7b14e48b824883647f86d768e0c39b6295e0 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 16:15:53 +0100 Subject: [PATCH 045/227] fix CLEU destUnit events --- EventListener.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index aef0ae1..257bf5d 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -103,19 +103,19 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() if destUnit then -- diminish tracker - if (Gladdy.db.drEnabled and (eventType == "SPELL_AURA_REMOVED" or eventType == "SPELL_AURA_REFRESH")) then + if Gladdy.buttons[destUnit] and (Gladdy.db.drEnabled and (eventType == "SPELL_AURA_REMOVED" or eventType == "SPELL_AURA_REFRESH")) then Diminishings:AuraFade(destUnit, spellID) end -- death detection - if (eventType == "UNIT_DIED" or eventType == "PARTY_KILL" or eventType == "SPELL_INSTAKILL") then + if (Gladdy.buttons[destUnit] and eventType == "UNIT_DIED" or eventType == "PARTY_KILL" or eventType == "SPELL_INSTAKILL") then Gladdy:SendMessage("UNIT_DEATH", destUnit) end -- spec detection - if not Gladdy.buttons[destUnit].class or not Gladdy.buttons[destUnit].race then + if Gladdy.buttons[destUnit] and (not Gladdy.buttons[destUnit].class or not Gladdy.buttons[destUnit].race) then Gladdy:SpotEnemy(destUnit, true) end --interrupt detection - if eventType == "SPELL_INTERRUPT" then + if Gladdy.buttons[destUnit] and eventType == "SPELL_INTERRUPT" then Gladdy:SendMessage("SPELL_INTERRUPT", destUnit,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool) end end -- 2.39.5 From 6954fb05d02d74db659a841b103b451d82b75db4 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 16:18:11 +0100 Subject: [PATCH 046/227] shadowsight timer fix timer tracking when friendly units take buff --- EventListener.lua | 7 +++++-- Modules/ShadowsightTimer.lua | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 257bf5d..8f985a5 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -98,8 +98,11 @@ end function EventListener:COMBAT_LOG_EVENT_UNFILTERED() -- timestamp,eventType,hideCaster,sourceGUID,sourceName,sourceFlags,sourceRaidFlags,destGUID,destName,destFlags,destRaidFlags,spellId,spellName,spellSchool local _,eventType,_,sourceGUID,_,_,_,destGUID,_,_,_,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool = CombatLogGetCurrentEventInfo() - local srcUnit = Gladdy.guids[sourceGUID] - local destUnit = Gladdy.guids[destGUID] + local srcUnit = Gladdy.guids[sourceGUID] -- can be a PET + local destUnit = Gladdy.guids[destGUID] -- can be a PET + if (Gladdy.db.shadowsightTimerEnabled and eventType == "SPELL_AURA_APPLIED" and spellID == 34709) then + Gladdy.modules["Shadowsight Timer"]:AURA_GAIN(nil, nil, 34709) + end if destUnit then -- diminish tracker diff --git a/Modules/ShadowsightTimer.lua b/Modules/ShadowsightTimer.lua index d16c21d..d25dfc3 100644 --- a/Modules/ShadowsightTimer.lua +++ b/Modules/ShadowsightTimer.lua @@ -33,7 +33,6 @@ end function ShadowsightTimer:Initialize() self.locale = Gladdy:GetArenaTimer() self:RegisterMessage("JOINED_ARENA") - self:RegisterMessage("AURA_GAIN") self:CreateAnchor() end @@ -146,7 +145,7 @@ function ShadowsightTimer:JOINED_ARENA() end function ShadowsightTimer:AURA_GAIN(unit, auraType, spellID) - if (spellID == 34709) then + if (spellID == 34709 and Gladdy.db.shadowsightTimerEnabled) then self:Start(Gladdy.db.shadowsightTimerResetTime, self:GetHiddenTimer()) end end -- 2.39.5 From 55860fc1570b7c00241ea2f33000f20222f0d040 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 16:18:34 +0100 Subject: [PATCH 047/227] fix fear ward cooldown tracking --- EventListener.lua | 1 + Modules/Cooldowns.lua | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 8f985a5..23cd832 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -82,6 +82,7 @@ function Gladdy:SpotEnemy(unit, auraScan) for arenaUnit,v in pairs(self.buttons) do if (UnitIsUnit(arenaUnit, unitCaster)) then Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, expirationTime - GetTime()) + -- /run LibStub("Gladdy").modules["Cooldowns"]:CooldownUsed("arena5", "PRIEST", 6346, 10) end end end diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 3ca104e..76f2648 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -258,7 +258,7 @@ function Cooldowns:SPEC_DETECTED(unit, spec) self:DetectSpec(unit, spec) end -function Cooldowns:CooldownStart(button, spellId, duration) +function Cooldowns:CooldownStart(button, spellId, duration, start) -- starts timer frame if not duration or duration == nil or type(duration) ~= "number" then return @@ -267,8 +267,8 @@ function Cooldowns:CooldownStart(button, spellId, duration) if (button.spellCooldownFrame["icon" .. i].spellId == spellId) then local frame = button.spellCooldownFrame["icon" .. i] frame.active = true - frame.timeLeft = duration - if (not Gladdy.db.cooldownDisableCircle) then frame.cooldown:SetCooldown(GetTime(), duration) end + frame.timeLeft = start and start - GetTime() + duration or duration + if (not Gladdy.db.cooldownDisableCircle) then frame.cooldown:SetCooldown(start or GetTime(), duration) end frame:SetScript("OnUpdate", function(self, elapsed) self.timeLeft = self.timeLeft - elapsed local timeLeft = ceil(self.timeLeft) @@ -519,7 +519,7 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSecond if (Gladdy.db.cooldown) then -- start cooldown - self:CooldownStart(button, spellId, expirationTimeInSeconds or cd) + self:CooldownStart(button, spellId, cd, expirationTimeInSeconds and (GetTime() + expirationTimeInSeconds - cd) or nil) end --[[ announcement -- 2.39.5 From 2edca9b11e15a6ce5d718539c20a118c033fd776 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 16:33:49 +0100 Subject: [PATCH 048/227] readme --- README.md | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 801c4c2..112f909 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ The goal is to make Gladdy highly configurable in it's appearance. Everything ca - [AlexFolland](https://github.com/AlexFolland) - [dfherr](https://github.com/dfherr) - [miraage](https://github.com/miraage) +- [veiz](https://github.com/veiz) Thank you! @@ -73,12 +74,16 @@ Thank you! ### Changes ### v2.00-Release -- major release version set to v2 +This is a packed release with new features and bugfixes. Most importantly, positioning of all elements has been redone with movable frames. +Thank you for the great feedback and active contribution. + +**Here is a list of all changes:** +- **major release version set to v2** - this will mean, that export strings will still be backwards compatible, but not forward (v2 String cant be imported into v1 Strings but vice versa) -- big overhaul of positioning elements added! All elements besides HP and PowerBar can be moved separately +- **big overhaul of positioning elements added! All elements besides HP and PowerBar can be moved separately** - added Mover Frames for Auras, Interrupts, (De)Buffs, CastBar, ClassIcon, CombatIndicator, Cooldowns, DRs, Pets, Racial, Trinket - this will hopefully make configuration a lot easier -- SpecDetection: +- **SpecDetection:** - fixed spec detection for Paladins - added following spells for better spec detection: - Expose Weakness (Survival Hunter) @@ -96,7 +101,7 @@ Thank you! - Dark Pact (Affliction Warlock) - Conflagate (Destruction Warlock) - Shield Slam (Protection Warrior) -- Cooldowns: +- **Cooldowns:** - added Fear Ward and Fear Ward Cooldown Detection in case it was used before arena - added following cooldowns: - Scare Beast (Hunter) @@ -110,20 +115,25 @@ Thank you! - Spell Lock (Warlock) - Devour Magic (Warlock) - Intercept (Warrior) -- Auras/Interrupts: +- **Auras/Interrupts:** - can now be detached from ClassIcon and positioned/scaled anywhere separately - added Auras: - Scare Beast (Hunter) - Fear Ward (Priest) -- Pixel Perfect option added (makes your Gladdy Frames pixel perfect - no more wierd scaling interferences) -- Pets can be grouped (not perfect yet, but a first step) -- added DR-Level Text (thanks https://github.com/ManneN1) -- added zhCN Locale (thanks https://github.com/veiz) -- Shadowsight: +- **Shadowsight:** - reset timer when buff was taken - - add a configurable 2nd timer or show one timer with closest CD -- fixed some DR-categories (Hibernate/Chastice/Dragonsbreath/ImpConcussiveShot/Counterattack) -- ClassIcon can be disabled + - add a configurable 2nd timer or show one timer with the closest CD +- **fixed some DR-categories** (Hibernate / Chastice / Dragonsbreath / ImpConcussiveShot / Counterattack) +- **Pixel Perfect option added** (makes your Gladdy Frames pixel perfect - no more wierd scaling interferences) +- **Pets can be grouped** (not perfect yet, but a first step) +- **added DR-Level Text** (thanks https://github.com/ManneN1) +- **added zhCN Locale** (thanks https://github.com/veiz) +- **ClassIcon can be disabled** +- **add interrupt announcement** +- **detect SpellLock and Devour Magic cooldowns properly** +- **minor fixes:** + - fixed reloading during arena to properly show all frames + - fix grow up positioning ### v1.22-Release - fixed import for some localizations not working -- 2.39.5 From 242c45b8c49f7a3131b8f1b7ddf01994f292f60f Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 20:21:53 +0100 Subject: [PATCH 049/227] frame strata option added for all visual elements --- Constants.lua | 22 ++++ Frame.lua | 3 +- Modules/ArenaCountDown.lua | 30 +++++- Modules/Auras.lua | 110 +++++++++++++++++++ Modules/BuffsDebuffs.lua | 47 +++++++- Modules/Castbar.lua | 49 ++++++++- Modules/Classicon.lua | 64 +++++++++-- Modules/CombatIndicator.lua | 42 +++++++- Modules/Cooldowns.lua | 56 +++++++++- Modules/Diminishings.lua | 55 +++++++++- Modules/Healthbar.lua | 44 +++++++- Modules/Highlight.lua | 203 ++++++++++++++++++++++++----------- Modules/Pets.lua | 44 +++++++- Modules/Powerbar.lua | 46 +++++++- Modules/Racial.lua | 72 ++++++++----- Modules/ShadowsightTimer.lua | 169 ++++++++++++++++++++++------- Modules/Trinket.lua | 78 ++++++++++++-- 17 files changed, 957 insertions(+), 177 deletions(-) diff --git a/Constants.lua b/Constants.lua index 7efeeee..d04dcda 100644 --- a/Constants.lua +++ b/Constants.lua @@ -1234,4 +1234,26 @@ Gladdy.newDefaults = { ["castBarXOffset"] = -235.900146484375, ["castBarYOffset"] = -30.5, }, +} + +Gladdy.frameStrata = { + BACKGROUND = L["Background"] .. "(0)", + LOW = L["Low"] .. "(1)", + MEDIUM = L["Medium"] .. "(2)", + HIGH = L["High"] .. "(3)", + DIALOG = L["Dialog"] .. "(4)", + FULLSCREEN = L["Fullscreen"] .. "(5)", + FULLSCREEN_DIALOG = L["Fullscreen Dialog"] .. "(6)", + TOOLTIP = L["Tooltip"] .. "(7)", +} + +Gladdy.frameStrataSorting = { + [1] = "BACKGROUND", + [2] = "LOW", + [3] = "MEDIUM", + [4] = "HIGH", + [5] = "DIALOG", + [6] = "FULLSCREEN", + [7] = "FULLSCREEN_DIALOG", + [8] = "TOOLTIP", } \ No newline at end of file diff --git a/Frame.lua b/Frame.lua index e6d58e0..7f86b67 100644 --- a/Frame.lua +++ b/Frame.lua @@ -395,7 +395,7 @@ function Gladdy:CreateMover(frame, xConfig, yConfig, name, points, width, height frame:EnableMouse(false) frame:SetMovable(true) frame.mover = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate") - frame.mover:SetFrameStrata("DIALOG") + frame.mover:SetFrameStrata("TOOLTIP") frame.mover:SetPoint(points[1], frame, points[2], xOffset or 0, yOffset or 0) frame.mover:SetHeight(height or frame:GetHeight()) frame.mover:SetWidth(width or frame:GetWidth()) @@ -412,6 +412,7 @@ function Gladdy:CreateMover(frame, xConfig, yConfig, name, points, width, height frame.mover.border:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = 2 }) frame.mover.border:SetAllPoints(frame.mover) frame.mover.border:SetBackdropBorderColor(0,1,0,1) + frame.mover.border:SetFrameStrata("TOOLTIP") frame.mover.text = frame.mover.border:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") frame.mover.text:SetText(name) diff --git a/Modules/ArenaCountDown.lua b/Modules/ArenaCountDown.lua index c02c72d..dda004f 100644 --- a/Modules/ArenaCountDown.lua +++ b/Modules/ArenaCountDown.lua @@ -6,7 +6,9 @@ local Gladdy = LibStub("Gladdy") local L = Gladdy.L local ACDFrame = Gladdy:NewModule("Arena Countdown", nil, { countdown = true, - arenaCountdownSize = 256 + arenaCountdownSize = 256, + arenaCountdownFrameStrata = "HIGH", + arenaCountdownFrameLevel = 50, }) function ACDFrame:OnEvent(event, ...) @@ -51,6 +53,11 @@ function ACDFrame:Initialize() self.faction = UnitFactionGroup("player") end +function ACDFrame:UpdateFrameOnce() + self.ACDNumFrame:SetFrameStrata(Gladdy.db.arenaCountdownFrameStrata) + self.ACDNumFrame:SetFrameLevel(Gladdy.db.arenaCountdownFrameLevel) +end + function ACDFrame.OnUpdate(self, elapse) if (self.countdown > 0 and Gladdy.db.countdown) then self.hidden = false; @@ -182,5 +189,26 @@ function ACDFrame:GetOptions() step = 16, width = "full", }), + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 5, + }, + arenaCountdownFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + order = 6, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + }), + arenaCountdownFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + min = 0, + max = 500, + step = 1, + order = 7, + width = "full", + }), } end diff --git a/Modules/Auras.lua b/Modules/Auras.lua index cb75260..367bbf4 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -52,6 +52,10 @@ local Auras = Gladdy:NewModule("Auras", nil, { auraInterruptYOffset = 0, auraInterruptSize = 60 + 20 + 1, auraInterruptWidthFactor = 0.9, + auraFrameStrata = "MEDIUM", + auraFrameLevel = 5, + auraInterruptFrameStrata = "MEDIUM", + auraInterruptFrameLevel = 5, }) function Auras:Initialize() @@ -223,6 +227,16 @@ function Auras:UpdateFrame(unit) if Gladdy.db.auraDetached then width, height = Gladdy.db.auraSize * Gladdy.db.auraWidthFactor, Gladdy.db.auraSize + + auraFrame:SetFrameStrata(Gladdy.db.auraFrameStrata) + auraFrame:SetFrameLevel(Gladdy.db.auraFrameLevel) + auraFrame.frame:SetFrameStrata(Gladdy.db.auraFrameStrata) + auraFrame.frame:SetFrameLevel(Gladdy.db.auraFrameLevel) + auraFrame.cooldown:SetFrameStrata(Gladdy.db.auraFrameStrata) + auraFrame.cooldown:SetFrameLevel(Gladdy.db.auraFrameLevel + 1) + auraFrame.cooldownFrame:SetFrameStrata(Gladdy.db.auraFrameStrata) + auraFrame.cooldownFrame:SetFrameLevel(Gladdy.db.auraFrameLevel + 2) + auraFrame:ClearAllPoints() Gladdy:SetPosition(auraFrame, unit, "auraXOffset", "auraYOffset", true, Auras) if (unit == "arena1") then @@ -235,6 +249,16 @@ function Auras:UpdateFrame(unit) end else width, height = Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor, Gladdy.db.classIconSize + + auraFrame:SetFrameStrata(Gladdy.db.classIconFrameStrata) + auraFrame:SetFrameLevel(Gladdy.db.classIconFrameLevel + 1) + auraFrame.frame:SetFrameStrata(Gladdy.db.classIconFrameStrata) + auraFrame.frame:SetFrameLevel(Gladdy.db.classIconFrameLevel + 1) + auraFrame.cooldown:SetFrameStrata(Gladdy.db.classIconFrameStrata) + auraFrame.cooldown:SetFrameLevel(Gladdy.db.classIconFrameLevel + 2) + auraFrame.cooldownFrame:SetFrameStrata(Gladdy.db.classIconFrameStrata) + auraFrame.cooldownFrame:SetFrameLevel(Gladdy.db.classIconFrameLevel + 3) + auraFrame:ClearAllPoints() auraFrame:SetPoint("TOPLEFT", Gladdy.modules["Class Icon"].frames[unit], "TOPLEFT") if auraFrame.mover then @@ -285,6 +309,16 @@ function Auras:UpdateInterruptFrame(unit) if Gladdy.db.auraInterruptDetached then width, height = Gladdy.db.auraInterruptSize * Gladdy.db.auraInterruptWidthFactor, Gladdy.db.auraInterruptSize + + interruptFrame:SetFrameStrata(Gladdy.db.auraInterruptFrameStrata) + interruptFrame:SetFrameLevel(Gladdy.db.auraInterruptFrameLevel) + interruptFrame.frame:SetFrameStrata(Gladdy.db.auraInterruptFrameStrata) + interruptFrame.frame:SetFrameLevel(Gladdy.db.auraInterruptFrameLevel) + interruptFrame.cooldown:SetFrameStrata(Gladdy.db.auraInterruptFrameStrata) + interruptFrame.cooldown:SetFrameLevel(Gladdy.db.auraInterruptFrameLevel + 1) + interruptFrame.cooldownFrame:SetFrameStrata(Gladdy.db.auraInterruptFrameStrata) + interruptFrame.cooldownFrame:SetFrameLevel(Gladdy.db.auraInterruptFrameLevel + 2) + interruptFrame:ClearAllPoints() Gladdy:SetPosition(interruptFrame, unit, "auraInterruptXOffset", "auraInterruptYOffset", true, Auras) if (unit == "arena1") then @@ -298,6 +332,16 @@ function Auras:UpdateInterruptFrame(unit) else if Gladdy.db.auraDetached then width, height = Gladdy.db.auraSize * Gladdy.db.auraWidthFactor, Gladdy.db.auraSize + + interruptFrame:SetFrameStrata(Gladdy.db.auraFrameStrata) + interruptFrame:SetFrameLevel(Gladdy.db.auraFrameLevel) + interruptFrame.frame:SetFrameStrata(Gladdy.db.auraFrameStrata) + interruptFrame.frame:SetFrameLevel(Gladdy.db.auraFrameLevel) + interruptFrame.cooldown:SetFrameStrata(Gladdy.db.auraFrameStrata) + interruptFrame.cooldown:SetFrameLevel(Gladdy.db.auraFrameLevel + 1) + interruptFrame.cooldownFrame:SetFrameStrata(Gladdy.db.auraFrameStrata) + interruptFrame.cooldownFrame:SetFrameLevel(Gladdy.db.auraFrameLevel + 2) + interruptFrame:ClearAllPoints() interruptFrame:SetAllPoints(self.frames[unit]) if interruptFrame.mover then @@ -305,6 +349,16 @@ function Auras:UpdateInterruptFrame(unit) end else width, height = Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor, Gladdy.db.classIconSize + + interruptFrame:SetFrameStrata(Gladdy.db.classIconFrameStrata) + interruptFrame:SetFrameLevel(Gladdy.db.classIconFrameLevel + 1) + interruptFrame.frame:SetFrameStrata(Gladdy.db.classIconFrameStrata) + interruptFrame.frame:SetFrameLevel(Gladdy.db.classIconFrameLevel + 1) + interruptFrame.cooldown:SetFrameStrata(Gladdy.db.classIconFrameStrata) + interruptFrame.cooldown:SetFrameLevel(Gladdy.db.classIconFrameLevel + 2) + interruptFrame.cooldownFrame:SetFrameStrata(Gladdy.db.classIconFrameStrata) + interruptFrame.cooldownFrame:SetFrameLevel(Gladdy.db.classIconFrameLevel + 3) + interruptFrame:ClearAllPoints() interruptFrame:SetPoint("TOPLEFT", Gladdy.modules["Class Icon"].frames[unit], "TOPLEFT") if interruptFrame.mover then @@ -702,6 +756,34 @@ function Auras:GetOptions() order = 22, width = "full", }), + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 30, + }, + auraFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + disabled = function() + return not Gladdy.db.auraDetached + end, + order = 32, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + auraFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + disabled = function() + return not Gladdy.db.auraDetached + end, + min = 0, + max = 500, + step = 1, + order = 33, + width = "full", + }), } }, detachedInterruptMode = { @@ -778,6 +860,34 @@ function Auras:GetOptions() order = 22, width = "full", }), + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 30, + }, + auraInterruptFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + disabled = function() + return not Gladdy.db.auraDetached + end, + order = 32, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + auraInterruptFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + disabled = function() + return not Gladdy.db.auraDetached + end, + min = 0, + max = 500, + step = 1, + order = 33, + width = "full", + }), } }, cooldown = { diff --git a/Modules/BuffsDebuffs.lua b/Modules/BuffsDebuffs.lua index 81ff806..8c75649 100644 --- a/Modules/BuffsDebuffs.lua +++ b/Modules/BuffsDebuffs.lua @@ -50,6 +50,8 @@ local BuffsDebuffs = Gladdy:NewModule("Buffs and Debuffs", nil, { buffsBorderColorDisease = Gladdy:GetAuraTypeColor()["disease"], buffsBorderColorForm = Gladdy:GetAuraTypeColor()["form"], buffsBorderColorAura = Gladdy:GetAuraTypeColor()["aura"], + buffFrameStrata = "MEDIUM", + buffsFrameLevel = 9, }) local spellSchoolToOptionValueTable @@ -232,11 +234,15 @@ end function BuffsDebuffs:CreateFrame(unit) local debuffFrame = CreateFrame("Frame", "GladdyDebuffs" .. unit, Gladdy.buttons[unit]) + debuffFrame:SetFrameStrata(Gladdy.db.buffFrameStrata) + debuffFrame:SetFrameLevel(Gladdy.db.buffsFrameLevel) debuffFrame:SetMovable(true) debuffFrame:SetHeight(Gladdy.db.buffsIconSize) debuffFrame:SetWidth(1) debuffFrame.unit = unit local buffFrame = CreateFrame("Frame", "GladdyBuffs" .. unit, Gladdy.buttons[unit]) + buffFrame:SetFrameStrata(Gladdy.db.buffFrameStrata) + buffFrame:SetFrameLevel(Gladdy.db.buffsFrameLevel) buffFrame:SetMovable(true) buffFrame:SetHeight(Gladdy.db.buffsIconSize) buffFrame:SetWidth(1) @@ -271,6 +277,11 @@ local function styleIcon(aura, auraType) aura.cooldowncircle:SetAlpha(Gladdy.db.buffsCooldownAlpha) end + aura:SetFrameStrata(Gladdy.db.buffFrameStrata) + aura:SetFrameLevel(Gladdy.db.buffsFrameLevel) + aura.cooldowncircle:SetFrameLevel(Gladdy.db.buffsFrameLevel + 1) + aura.overlay:SetFrameLevel(Gladdy.db.buffsFrameLevel + 2) + aura.border:SetTexture(Gladdy.db.buffsBorderStyle) aura.border:SetVertexColor(spellSchoolToOptionValue(aura.spellSchool)) aura.cooldown:SetFont(Gladdy:SMFetch("font", "buffsFont"), (Gladdy.db.buffsIconSize/2 - 1) * Gladdy.db.buffsFontScale, "OUTLINE") @@ -388,18 +399,19 @@ function BuffsDebuffs:AddAura(unit, spellID, auraType, duration, timeLeft, stack else aura = CreateFrame("Frame") aura:EnableMouse(false) - aura:SetFrameLevel(3) + aura:SetFrameStrata(Gladdy.db.buffFrameStrata) + aura:SetFrameLevel(Gladdy.db.buffsFrameLevel) aura.texture = aura:CreateTexture(nil, "BACKGROUND") aura.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask") aura.texture:SetAllPoints(aura) aura.cooldowncircle = CreateFrame("Cooldown", nil, aura, "CooldownFrameTemplate") - aura.cooldowncircle:SetFrameLevel(4) + aura.cooldowncircle:SetFrameLevel(Gladdy.db.buffsFrameLevel + 1) aura.cooldowncircle.noCooldownCount = true -- disable OmniCC aura.cooldowncircle:SetAllPoints(aura) aura.cooldowncircle:SetReverse(true) aura.cooldowncircle:SetHideCountdownNumbers(true) aura.overlay = CreateFrame("Frame", nil, aura) - aura.overlay:SetFrameLevel(5) + aura.overlay:SetFrameLevel(Gladdy.db.buffsFrameLevel + 2) aura.overlay:SetAllPoints(aura) aura.border = aura.overlay:CreateTexture(nil, "OVERLAY") aura.border:SetAllPoints(aura) @@ -878,6 +890,35 @@ function BuffsDebuffs:GetOptions() }), }, }, + frameStrata = { + type = "group", + name = L["Frame Strata and Level"], + order = 6, + args = { + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 1, + }, + buffFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + order = 2, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + buffsFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + min = 0, + max = 500, + step = 1, + order = 3, + width = "full", + }), + }, + }, }, }, debuffList = { diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index f4c6086..9a16ff2 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -41,6 +41,8 @@ local Castbar = Gladdy:NewModule("Cast Bar", 70, { castBarTimerFormat = "LEFT", castBarSparkEnabled = true, castBarSparkColor = { r = 1, g = 1, b = 1, a = 1 }, + castBarFrameStrata = "MEDIUM", + castBarFrameLevel = 5, }) function Castbar:Initialize() @@ -60,19 +62,24 @@ function Castbar:CreateFrame(unit) castBar:EnableMouse(false) castBar:SetMovable(true) castBar.unit = unit + castBar:SetFrameStrata(Gladdy.db.castBarFrameStrata) + castBar:SetFrameLevel(Gladdy.db.castBarFrameLevel) castBar.backdrop = CreateFrame("Frame", nil, castBar, BackdropTemplateMixin and "BackdropTemplate") castBar.backdrop:SetAllPoints(castBar) castBar.backdrop:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "castBarBorderStyle"), edgeSize = Gladdy.db.castBarBorderSize }) castBar.backdrop:SetBackdropBorderColor(Gladdy.db.castBarBorderColor.r, Gladdy.db.castBarBorderColor.g, Gladdy.db.castBarBorderColor.b, Gladdy.db.castBarBorderColor.a) - castBar.backdrop:SetFrameLevel(1) + castBar.backdrop:SetFrameStrata(Gladdy.db.castBarFrameStrata) + castBar.backdrop:SetFrameLevel(Gladdy.db.castBarFrameLevel - 1) castBar.bar = CreateFrame("StatusBar", nil, castBar) castBar.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "castBarTexture")) castBar.bar:SetStatusBarColor(Gladdy.db.castBarColor.r, Gladdy.db.castBarColor.g, Gladdy.db.castBarColor.b, Gladdy.db.castBarColor.a) castBar.bar:SetMinMaxValues(0, 100) castBar.bar:SetFrameLevel(0) + castBar.bar:SetFrameStrata(Gladdy.db.castBarFrameStrata) + castBar.bar:SetFrameLevel(Gladdy.db.castBarFrameLevel) castBar.spark = castBar:CreateTexture(nil, "OVERLAY") castBar.spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark") @@ -88,6 +95,8 @@ function Castbar:CreateFrame(unit) castBar.bg:SetAllPoints(castBar.bar) castBar.icon = CreateFrame("Frame", nil, castBar) + castBar.icon:SetFrameStrata(Gladdy.db.castBarFrameStrata) + castBar.icon:SetFrameLevel(Gladdy.db.castBarFrameLevel) castBar.icon.texture = castBar.icon:CreateTexture(nil, "BACKGROUND") castBar.icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask") castBar.icon.texture:SetAllPoints(castBar.icon) @@ -129,6 +138,15 @@ function Castbar:UpdateFrame(unit) return end + castBar:SetFrameStrata(Gladdy.db.castBarFrameStrata) + castBar:SetFrameLevel(Gladdy.db.castBarFrameLevel) + castBar.backdrop:SetFrameStrata(Gladdy.db.castBarFrameStrata) + castBar.backdrop:SetFrameLevel(Gladdy.db.castBarFrameLevel - 1) + castBar.bar:SetFrameStrata(Gladdy.db.castBarFrameStrata) + castBar.bar:SetFrameLevel(Gladdy.db.castBarFrameLevel) + castBar.icon:SetFrameStrata(Gladdy.db.castBarFrameStrata) + castBar.icon:SetFrameLevel(Gladdy.db.castBarFrameLevel) + castBar:SetWidth(Gladdy.db.castBarWidth) castBar:SetHeight(Gladdy.db.castBarHeight) castBar.backdrop:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "castBarBorderStyle"), @@ -793,6 +811,35 @@ function Castbar:GetOptions() }), } }, + frameStrata = { + type = "group", + name = L["Frame Strata and Level"], + order = 6, + args = { + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 1, + }, + castBarFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + order = 2, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + castBarFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + min = 1, + max = 500, + step = 1, + order = 3, + width = "full", + }), + }, + }, }, }, } diff --git a/Modules/Classicon.lua b/Modules/Classicon.lua index 6599650..01099a6 100644 --- a/Modules/Classicon.lua +++ b/Modules/Classicon.lua @@ -13,6 +13,8 @@ local Classicon = Gladdy:NewModule("Class Icon", 81, { classIconSpecIcon = false, classIconXOffset = 0, classIconYOffset = 0, + classIconFrameStrata = "MEDIUM", + classIconFrameLevel = 5, }) local classIconPath = "Interface\\Addons\\Gladdy\\Images\\Classes\\" @@ -111,6 +113,9 @@ function Classicon:UpdateFrame(unit) return end + classIcon:SetFrameStrata(Gladdy.db.classIconFrameStrata) + classIcon:SetFrameLevel(Gladdy.db.classIconFrameLevel) + classIcon:SetWidth(Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) classIcon:SetHeight(Gladdy.db.classIconSize) @@ -239,29 +244,37 @@ function Classicon:GetOptions() position = { type = "group", name = L["Position"], - order = 1, + order = 3, args = { headerPosition = { type = "header", name = L["Position"], order = 5, }, - classIconPos = Gladdy:option({ - type = "select", - name = L["Icon position"], - desc = L["This changes positions with trinket"], - order = 6, - values = { - ["LEFT"] = L["Left"], - ["RIGHT"] = L["Right"], - }, + classIconXOffset = Gladdy:option({ + type = "range", + name = L["Horizontal offset"], + order = 11, + min = -800, + max = 800, + step = 0.1, + width = "full", + }), + classIconYOffset = Gladdy:option({ + type = "range", + name = L["Vertical offset"], + order = 12, + min = -800, + max = 800, + step = 0.1, + width = "full", }), }, }, border = { type = "group", name = L["Border"], - order = 1, + order = 2, args = { headerBorder = { type = "header", @@ -283,6 +296,35 @@ function Classicon:GetOptions() }), }, }, + frameStrata = { + type = "group", + name = L["Frame Strata and Level"], + order = 4, + args = { + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 1, + }, + classIconFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + order = 2, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + classIconFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + min = 0, + max = 500, + step = 1, + order = 3, + width = "full", + }), + }, + }, }, }, } diff --git a/Modules/CombatIndicator.lua b/Modules/CombatIndicator.lua index 73a016d..5647178 100644 --- a/Modules/CombatIndicator.lua +++ b/Modules/CombatIndicator.lua @@ -14,6 +14,8 @@ local CombatIndicator = Gladdy:NewModule("Combat Indicator", nil, { ciYOffset = -31, ciBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp", ciBorderColor = { r = 0, g = 0, b = 0, a = 1 }, + ciFrameStrata = "HIGH", + ciFrameLevel = 5, }) function CombatIndicator:Initialize() @@ -36,7 +38,8 @@ function CombatIndicator:CreateFrame(unit) local ciFrame = CreateFrame("Frame", "GladdyCombatindicator" .. unit, button) ciFrame:EnableMouse(false) ciFrame:SetMovable(true) - ciFrame:SetFrameStrata("HIGH") + ciFrame:SetFrameStrata(Gladdy.db.ciFrameStrata) + ciFrame:SetFrameLevel(Gladdy.db.ciFrameLevel) ciFrame:SetHeight(Gladdy.db.ciSize) ciFrame:SetWidth(Gladdy.db.ciSize * Gladdy.db.ciWidthFactor) @@ -60,6 +63,10 @@ function CombatIndicator:UpdateFrame(unit) if (not button or not ciFrame) then return end + + ciFrame:SetFrameStrata(Gladdy.db.ciFrameStrata) + ciFrame:SetFrameLevel(Gladdy.db.ciFrameLevel) + ciFrame:SetHeight(Gladdy.db.ciSize) ciFrame:SetWidth(Gladdy.db.ciSize * Gladdy.db.ciWidthFactor) ciFrame.border:SetTexture(Gladdy.db.ciBorderStyle) @@ -166,7 +173,7 @@ function CombatIndicator:GetOptions() position = { type = "group", name = L["Position"], - order = 4, + order = 3, args = { header = { type = "header", @@ -196,7 +203,7 @@ function CombatIndicator:GetOptions() border = { type = "group", name = L["Border"], - order = 4, + order = 2, args = { header = { type = "header", @@ -218,6 +225,35 @@ function CombatIndicator:GetOptions() }), }, }, + frameStrata = { + type = "group", + name = L["Frame Strata and Level"], + order = 5, + args = { + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 1, + }, + ciFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + order = 2, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + ciFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + min = 0, + max = 500, + step = 1, + order = 3, + width = "full", + }), + }, + }, }, }, } diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 76f2648..268762d 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -67,6 +67,8 @@ local Cooldowns = Gladdy:NewModule("Cooldowns", nil, { cooldownDisableCircle = false, cooldownCooldownAlpha = 1, cooldownCooldowns = getDefaultCooldown(), + cooldownFrameStrata = "MEDIUM", + cooldownFrameLevel = 3, }) function Cooldowns:Initialize() @@ -95,10 +97,13 @@ function Cooldowns:CreateFrame(unit) local spellCooldownFrame = CreateFrame("Frame", nil, button) spellCooldownFrame:EnableMouse(false) spellCooldownFrame:SetMovable(true) + spellCooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + spellCooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel) for x = 1, 14 do local icon = CreateFrame("Frame", nil, spellCooldownFrame) icon:EnableMouse(false) - icon:SetFrameLevel(3) + icon:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + icon:SetFrameLevel(Gladdy.db.cooldownFrameLevel) icon.texture = icon:CreateTexture(nil, "BACKGROUND") icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask") icon.texture:SetAllPoints(icon) @@ -106,14 +111,16 @@ function Cooldowns:CreateFrame(unit) icon.cooldown = CreateFrame("Cooldown", nil, icon, "CooldownFrameTemplate") icon.cooldown.noCooldownCount = true - icon.cooldown:SetFrameLevel(4) + icon.cooldown:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + icon.cooldown:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 1) icon.cooldown:SetReverse(false) icon.cooldown:SetHideCountdownNumbers(true) icon.cooldownFrame = CreateFrame("Frame", nil, icon) icon.cooldownFrame:ClearAllPoints() icon.cooldownFrame:SetAllPoints(icon) - icon.cooldownFrame:SetFrameLevel(5) + icon.cooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + icon.cooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 2) icon.border = icon.cooldownFrame:CreateTexture(nil, "OVERLAY") icon.border:SetAllPoints(icon) @@ -136,6 +143,8 @@ function Cooldowns:UpdateFrame(unit) if (Gladdy.db.cooldown) then button.spellCooldownFrame:SetHeight(Gladdy.db.cooldownSize) button.spellCooldownFrame:SetWidth(1) + button.spellCooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + button.spellCooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel) button.spellCooldownFrame:Show() Gladdy:SetPosition(button.spellCooldownFrame, unit, "cooldownXOffset", "cooldownYOffset", Cooldowns:LegacySetPosition(button, unit), Cooldowns) @@ -149,6 +158,14 @@ function Cooldowns:UpdateFrame(unit) local o = 1 for j = 1, 14 do local icon = button.spellCooldownFrame["icon" .. j] + + icon:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + icon:SetFrameLevel(Gladdy.db.cooldownFrameLevel) + icon.cooldown:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + icon.cooldown:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 1) + icon.cooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + icon.cooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 2) + icon:SetHeight(Gladdy.db.cooldownSize) icon:SetWidth(Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor) icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 2 * Gladdy.db.cooldownFontScale, "OUTLINE") @@ -676,7 +693,7 @@ function Cooldowns:GetOptions() position = { type = "group", name = L["Position"], - order = 4, + order = 5, args = { header = { type = "header", @@ -740,7 +757,7 @@ function Cooldowns:GetOptions() border = { type = "group", name = L["Border"], - order = 5, + order = 4, args = { header = { type = "header", @@ -762,6 +779,35 @@ function Cooldowns:GetOptions() }), }, }, + frameStrata = { + type = "group", + name = L["Frame Strata and Level"], + order = 6, + args = { + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 1, + }, + cooldownFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + order = 2, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + cooldownFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + min = 0, + max = 500, + step = 1, + order = 3, + width = "full", + }), + }, + }, }, }, cooldowns = { diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index a2b89f1..98af424 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -50,6 +50,8 @@ local Diminishings = Gladdy:NewModule("Diminishings", nil, { drWidthFactor = 1, drCategories = defaultCategories(), drDuration = 18, + drFrameStrata = "MEDIUM", + drFrameLevel = 3, }) local function getDiminishColor(dr) @@ -81,12 +83,15 @@ function Diminishings:CreateFrame(unit) local drFrame = CreateFrame("Frame", nil, Gladdy.buttons[unit]) drFrame:EnableMouse(false) drFrame:SetMovable(true) + drFrame:SetFrameStrata(Gladdy.db.drFrameStrata) + drFrame:SetFrameLevel(Gladdy.db.drFrameLevel) for i = 1, 16 do local icon = CreateFrame("Frame", "GladdyDr" .. unit .. "Icon" .. i, drFrame) icon:Hide() icon:EnableMouse(false) - icon:SetFrameLevel(3) + icon:SetFrameStrata(Gladdy.db.drFrameStrata) + icon:SetFrameLevel(Gladdy.db.drFrameLevel) icon.texture = icon:CreateTexture(nil, "BACKGROUND") icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask") icon.texture:SetAllPoints(icon) @@ -114,13 +119,15 @@ function Diminishings:CreateFrame(unit) icon.cooldown = CreateFrame("Cooldown", nil, icon, "CooldownFrameTemplate") icon.cooldown.noCooldownCount = true --Gladdy.db.trinketDisableOmniCC icon.cooldown:SetHideCountdownNumbers(true) - icon.cooldown:SetFrameLevel(4) + icon.cooldown:SetFrameStrata(Gladdy.db.drFrameStrata) + icon.cooldown:SetFrameLevel(Gladdy.db.drFrameLevel + 1) icon.cooldownFrame = CreateFrame("Frame", nil, icon) icon.cooldownFrame:ClearAllPoints() icon.cooldownFrame:SetPoint("TOPLEFT", icon, "TOPLEFT") icon.cooldownFrame:SetPoint("BOTTOMRIGHT", icon, "BOTTOMRIGHT") - icon.cooldownFrame:SetFrameLevel(5) + icon.cooldownFrame:SetFrameStrata(Gladdy.db.drFrameStrata) + icon.cooldownFrame:SetFrameLevel(Gladdy.db.drFrameLevel + 2) --icon.overlay = CreateFrame("Frame", nil, icon) --icon.overlay:SetAllPoints(icon) @@ -181,6 +188,8 @@ function Diminishings:UpdateFrame(unit) drFrame:SetWidth(Gladdy.db.drIconSize) drFrame:SetHeight(Gladdy.db.drIconSize) + drFrame:SetFrameStrata(Gladdy.db.drFrameStrata) + drFrame:SetFrameLevel(Gladdy.db.drFrameLevel) Gladdy:SetPosition(drFrame, unit, "drXOffset", "drYOffset", Diminishings:LegacySetPosition(drFrame, unit), Diminishings) @@ -199,6 +208,13 @@ function Diminishings:UpdateFrame(unit) icon:SetWidth(Gladdy.db.drIconSize * Gladdy.db.drWidthFactor) icon:SetHeight(Gladdy.db.drIconSize) + icon:SetFrameStrata(Gladdy.db.drFrameStrata) + icon:SetFrameLevel(Gladdy.db.drFrameLevel) + icon.cooldown:SetFrameStrata(Gladdy.db.drFrameStrata) + icon.cooldown:SetFrameLevel(Gladdy.db.drFrameLevel + 1) + icon.cooldownFrame:SetFrameStrata(Gladdy.db.drFrameStrata) + icon.cooldownFrame:SetFrameLevel(Gladdy.db.drFrameLevel + 2) + icon.text:SetFont(Gladdy:SMFetch("font", "drFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drFontScale, "OUTLINE") icon.text:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a) icon.timeText:SetFont(Gladdy:SMFetch("font", "drFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drFontScale, "OUTLINE") @@ -541,7 +557,7 @@ function Diminishings:GetOptions() position = { type = "group", name = L["Position"], - order = 4, + order = 6, args = { headerPosition = { type = "header", @@ -618,7 +634,7 @@ function Diminishings:GetOptions() border = { type = "group", name = L["Border"], - order = 6, + order = 4, args = { headerBorder = { type = "header", @@ -673,6 +689,35 @@ function Diminishings:GetOptions() }), } }, + frameStrata = { + type = "group", + name = L["Frame Strata and Level"], + order = 7, + args = { + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 1, + }, + drFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + order = 2, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + drFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + min = 0, + max = 500, + step = 1, + order = 3, + width = "full", + }), + }, + }, }, }, categories = { diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index 8338a1a..78132cf 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -24,6 +24,8 @@ local Healthbar = Gladdy:NewModule("Health Bar", 100, { healthActual = false, healthMax = true, healthPercentage = true, + healthFrameStrata = "MEDIUM", + healthFrameLevel = 1, }) function Healthbar:Initialize() @@ -42,12 +44,14 @@ function Healthbar:CreateFrame(unit) healthBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "healthBarBorderStyle"), edgeSize = Gladdy.db.healthBarBorderSize }) healthBar:SetBackdropBorderColor(Gladdy.db.healthBarBorderColor.r, Gladdy.db.healthBarBorderColor.g, Gladdy.db.healthBarBorderColor.b, Gladdy.db.healthBarBorderColor.a) - healthBar:SetFrameLevel(1) + healthBar:SetFrameStrata(Gladdy.db.healthFrameStrata) + healthBar:SetFrameLevel(Gladdy.db.healthFrameLevel) healthBar.hp = CreateFrame("StatusBar", nil, healthBar) healthBar.hp:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "healthBarTexture")) healthBar.hp:SetMinMaxValues(0, 100) - healthBar.hp:SetFrameLevel(0) + healthBar.hp:SetFrameStrata(Gladdy.db.healthFrameStrata) + healthBar.hp:SetFrameLevel(Gladdy.db.healthFrameLevel - 1) healthBar.bg = healthBar.hp:CreateTexture(nil, "BACKGROUND") healthBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "healthBarTexture")) @@ -150,6 +154,11 @@ function Healthbar:UpdateFrame(unit) return end + healthBar:SetFrameStrata(Gladdy.db.healthFrameStrata) + healthBar:SetFrameLevel(Gladdy.db.healthFrameLevel) + healthBar.hp:SetFrameStrata(Gladdy.db.healthFrameStrata) + healthBar.hp:SetFrameLevel(Gladdy.db.healthFrameLevel - 1) + healthBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "healthBarTexture")) healthBar.bg:SetVertexColor(Gladdy.db.healthBarBgColor.r, Gladdy.db.healthBarBgColor.g, Gladdy.db.healthBarBgColor.b, Gladdy.db.healthBarBgColor.a) @@ -445,10 +454,39 @@ function Healthbar:GetOptions() }), }, }, + frameStrata = { + type = "group", + name = L["Frame Strata and Level"], + order = 4, + args = { + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 1, + }, + healthFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + order = 2, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + healthFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + min = 1, + max = 500, + step = 1, + order = 3, + width = "full", + }), + }, + }, healthValues = { type = "group", name = L["Health Bar Text"], - order = 4, + order = 5, args = { header = { type = "header", diff --git a/Modules/Highlight.lua b/Modules/Highlight.lua index 5cebb1a..0240caa 100644 --- a/Modules/Highlight.lua +++ b/Modules/Highlight.lua @@ -13,6 +13,8 @@ local Highlight = Gladdy:NewModule("Highlight", nil, { targetBorder = true, focusBorder = true, leaderBorder = true, + highlightFrameStrata = "MEDIUM", + highlightFrameLevel = 20, }) function Highlight:Initialize() @@ -56,17 +58,20 @@ function Highlight:CreateFrame(unit) local targetBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate") targetBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = Gladdy.db.highlightBorderSize }) - --targetBorder:SetFrameStrata("MEDIUM") + targetBorder:SetFrameStrata(Gladdy.db.highlightFrameStrata) + targetBorder:SetFrameLevel(Gladdy.db.highlightFrameLevel) targetBorder:Hide() local focusBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate") focusBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = Gladdy.db.highlightBorderSize }) - --focusBorder:SetFrameStrata("MEDIUM") + focusBorder:SetFrameStrata(Gladdy.db.highlightFrameStrata) + focusBorder:SetFrameLevel(Gladdy.db.highlightFrameLevel) focusBorder:Hide() local leaderBorder = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate") leaderBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = Gladdy.db.highlightBorderSize }) - --leaderBorder:SetFrameStrata("MEDIUM") + leaderBorder:SetFrameStrata(Gladdy.db.highlightFrameStrata) + leaderBorder:SetFrameLevel(Gladdy.db.highlightFrameLevel) leaderBorder:Hide() local highlight = healthBar:CreateTexture(nil, "OVERLAY") @@ -96,6 +101,13 @@ function Highlight:UpdateFrame(unit) local width = Gladdy.db.barWidth + (Gladdy.db.highlightInset and 0 or borderSize * 2) local height = hpAndPowerHeight + (Gladdy.db.highlightInset and 0 or borderSize * 2) + button.targetBorder:SetFrameStrata(Gladdy.db.highlightFrameStrata) + button.targetBorder:SetFrameLevel(Gladdy.db.highlightFrameLevel) + button.focusBorder:SetFrameStrata(Gladdy.db.highlightFrameStrata) + button.focusBorder:SetFrameLevel(Gladdy.db.highlightFrameLevel) + button.leaderBorder:SetFrameStrata(Gladdy.db.highlightFrameStrata) + button.leaderBorder:SetFrameLevel(Gladdy.db.highlightFrameLevel) + button.targetBorder:SetWidth(width) button.targetBorder:SetHeight(height) button.targetBorder:ClearAllPoints() @@ -207,67 +219,130 @@ function Highlight:GetOptions() desc = L["Show Highlight border inside of frame"], order = 3, }), - highlightBorderSize = Gladdy:option({ - type = "range", - name = L["Border size"], - desc = L["Border size"], - order = 4, - min = 1, - max = 20, - step = 1, - width = "full", - }), - highlightBorderStyle = Gladdy:option({ - type = "select", - name = L["Border style"], - order = 5, - dialogControl = "LSM30_Border", - values = AceGUIWidgetLSMlists.border, - }), - headerColor = { - type = "header", - name = L["Colors"], - order = 6, + group = { + type = "group", + childGroups = "tree", + name = L["Frame"], + order = 3, + args = { + enabled = { + type = "group", + name = L["Enabled"], + order = 1, + args = { + headerEnable = { + type = "header", + name = L["Enabled"], + order = 10, + }, + highlight = Gladdy:option({ + type = "toggle", + name = L["Highlight target"], + desc = L["Toggle if the selected target should be highlighted"], + order = 11, + width = "full", + }), + targetBorder = Gladdy:option({ + type = "toggle", + name = L["Show border around target"], + desc = L["Toggle if a border should be shown around the selected target"], + order = 12, + width = "full", + }), + focusBorder = Gladdy:option({ + type = "toggle", + name = L["Show border around focus"], + desc = L["Toggle of a border should be shown around the current focus"], + order = 13, + width = "full", + }), + }, + }, + border = { + type = "group", + name = L["Border"], + order = 2, + args = { + headerHighlight = { + type = "header", + name = L["Border"], + order = 2, + }, + highlightBorderSize = Gladdy:option({ + type = "range", + name = L["Border size"], + desc = L["Border size"], + order = 4, + min = 1, + max = 20, + step = 1, + width = "full", + }), + highlightBorderStyle = Gladdy:option({ + type = "select", + name = L["Border style"], + order = 5, + dialogControl = "LSM30_Border", + values = AceGUIWidgetLSMlists.border, + }), + }, + }, + color = { + type = "group", + name = L["Color"], + order = 3, + args = { + headerColor = { + type = "header", + name = L["Colors"], + order = 6, + }, + targetBorderColor = Gladdy:colorOption({ + type = "color", + name = L["Target border color"], + desc = L["Color of the selected targets border"], + order = 7, + hasAlpha = true, + }), + focusBorderColor = Gladdy:colorOption({ + type = "color", + name = L["Focus border color"], + desc = L["Color of the focus border"], + order = 8, + hasAlpha = true, + }), + }, + }, + frameStrata = { + type = "group", + name = L["Frame Strata and Level"], + order = 4, + args = { + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 1, + }, + highlightFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + order = 2, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + highlightFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + min = 1, + max = 500, + step = 1, + order = 3, + width = "full", + }), + }, + }, + }, }, - targetBorderColor = Gladdy:colorOption({ - type = "color", - name = L["Target border color"], - desc = L["Color of the selected targets border"], - order = 7, - hasAlpha = true, - }), - focusBorderColor = Gladdy:colorOption({ - type = "color", - name = L["Focus border color"], - desc = L["Color of the focus border"], - order = 8, - hasAlpha = true, - }), - headerEnable = { - type = "header", - name = L["Enabled"], - order = 10, - }, - highlight = Gladdy:option({ - type = "toggle", - name = L["Highlight target"], - desc = L["Toggle if the selected target should be highlighted"], - order = 11, - width = "full", - }), - targetBorder = Gladdy:option({ - type = "toggle", - name = L["Show border around target"], - desc = L["Toggle if a border should be shown around the selected target"], - order = 12, - width = "full", - }), - focusBorder = Gladdy:option({ - type = "toggle", - name = L["Show border around focus"], - desc = L["Toggle of a border should be shown around the current focus"], - order = 13, - width = "full", - }), } end \ No newline at end of file diff --git a/Modules/Pets.lua b/Modules/Pets.lua index b9406e9..fdd33b0 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -25,6 +25,8 @@ local Pets = Gladdy:NewModule("Pets", nil, { petYOffset = -62, petGroup = false, petMargin = 1, + petFrameStrata = "MEDIUM", + petFrameLevel = 5, }) function Pets:Initialize() @@ -156,7 +158,8 @@ function Pets:CreateFrame(unitId) healthBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "petHealthBarBorderStyle"), edgeSize = Gladdy.db.petHealthBarBorderSize }) healthBar:SetBackdropBorderColor(Gladdy.db.petHealthBarBorderColor.r, Gladdy.db.petHealthBarBorderColor.g, Gladdy.db.petHealthBarBorderColor.b, Gladdy.db.petHealthBarBorderColor.a) - healthBar:SetFrameLevel(1) + healthBar:SetFrameStrata(Gladdy.db.petFrameStrata) + healthBar:SetFrameLevel(Gladdy.db.petFrameLevel) healthBar:SetAllPoints(button) healthBar:SetAlpha(0) @@ -174,7 +177,8 @@ function Pets:CreateFrame(unitId) healthBar.hp:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "petHealthBarTexture")) healthBar.hp:SetStatusBarColor(Gladdy.db.petHealthBarColor.r, Gladdy.db.petHealthBarColor.g, Gladdy.db.petHealthBarColor.b, Gladdy.db.petHealthBarColor.a) healthBar.hp:SetMinMaxValues(0, 100) - healthBar.hp:SetFrameLevel(0) + healthBar.hp:SetFrameStrata(Gladdy.db.petFrameStrata) + healthBar.hp:SetFrameLevel(Gladdy.db.petFrameLevel - 1) healthBar.hp:SetAllPoints(healthBar) healthBar.bg = healthBar.hp:CreateTexture(nil, "BACKGROUND") @@ -245,6 +249,11 @@ function Pets:UpdateFrame(unitId) return end + healthBar:SetFrameStrata(Gladdy.db.petFrameStrata) + healthBar:SetFrameLevel(Gladdy.db.petFrameLevel) + healthBar.hp:SetFrameStrata(Gladdy.db.petFrameStrata) + healthBar.hp:SetFrameLevel(Gladdy.db.petFrameLevel - 1) + if not Gladdy.db.petEnabled then self.frames[unit]:Hide() else @@ -569,10 +578,39 @@ function Pets:GetOptions() }), } }, + frameStrata = { + type = "group", + name = L["Frame Strata and Level"], + order = 6, + args = { + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 1, + }, + petFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + order = 2, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + petFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + min = 1, + max = 500, + step = 1, + order = 3, + width = "full", + }), + }, + }, healthValues = { type = "group", name = L["Health Values"], - order = 6, + order = 7, args = { header = { type = "header", diff --git a/Modules/Powerbar.lua b/Modules/Powerbar.lua index eaa961a..af76f5c 100644 --- a/Modules/Powerbar.lua +++ b/Modules/Powerbar.lua @@ -22,6 +22,8 @@ local Powerbar = Gladdy:NewModule("Power Bar", 90, { powerActual = true, powerMax = true, powerPercentage = false, + powerFrameStrata = "MEDIUM", + powerFrameLevel = 1, }) function Powerbar:Initialize() @@ -41,12 +43,14 @@ function Powerbar:CreateFrame(unit) powerBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "powerBarBorderStyle"), edgeSize = Gladdy.db.powerBarBorderSize }) powerBar:SetBackdropBorderColor(Gladdy.db.powerBarBorderColor.r, Gladdy.db.powerBarBorderColor.g, Gladdy.db.powerBarBorderColor.b, Gladdy.db.powerBarBorderColor.a) - powerBar:SetFrameLevel(1) + powerBar:SetFrameStrata(Gladdy.db.powerFrameStrata) + powerBar:SetFrameLevel(Gladdy.db.powerFrameLevel) powerBar.energy = CreateFrame("StatusBar", nil, powerBar) powerBar.energy:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "powerBarTexture")) powerBar.energy:SetMinMaxValues(0, 100) - powerBar.energy:SetFrameLevel(0) + powerBar.energy:SetFrameStrata(Gladdy.db.powerFrameStrata) + powerBar.energy:SetFrameLevel(Gladdy.db.powerFrameLevel - 1) powerBar.bg = powerBar.energy:CreateTexture(nil, "BACKGROUND") powerBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "powerBarTexture")) @@ -139,10 +143,8 @@ function Powerbar:UpdateFrame(unit) if (not powerBar) then return end - local healthBar = Gladdy.modules["Health Bar"].frames[unit] - if not Gladdy.db.powerBarEnabled then powerBar:Hide() return @@ -171,6 +173,11 @@ function Powerbar:UpdateFrame(unit) powerBar.raceText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a) powerBar.powerText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize) powerBar.powerText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a) + + powerBar:SetFrameStrata(Gladdy.db.powerFrameStrata) + powerBar:SetFrameLevel(Gladdy.db.powerFrameLevel) + powerBar.energy:SetFrameStrata(Gladdy.db.powerFrameStrata) + powerBar.energy:SetFrameLevel(Gladdy.db.powerFrameLevel - 1) end function Powerbar:ResetUnit(unit) @@ -455,10 +462,39 @@ function Powerbar:GetOptions() }), }, }, + frameStrata = { + type = "group", + name = L["Frame Strata and Level"], + order = 4, + args = { + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 1, + }, + powerFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + order = 2, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + powerFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + min = 1, + max = 500, + step = 1, + order = 3, + width = "full", + }), + }, + }, powerValues = { type = "group", name = L["Power Bar Text"], - order = 4, + order = 5, args = { header = { type = "header", diff --git a/Modules/Racial.lua b/Modules/Racial.lua index b03c6d2..153c71f 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -18,6 +18,8 @@ local Racial = Gladdy:NewModule("Racial", 79, { racialDisableCircle = false, racialCooldownAlpha = 1, racialCooldownNumberAlpha = 1, + racialFrameStrata = "MEDIUM", + racialFrameLevel = 5, }) @@ -63,6 +65,9 @@ end function Racial:CreateFrame(unit) local racial = CreateFrame("Button", "GladdyTrinketButton" .. unit, Gladdy.buttons[unit]) racial:EnableMouse(false) + racial:SetFrameStrata(Gladdy.db.racialFrameStrata) + racial:SetFrameLevel(Gladdy.db.racialFrameLevel) + racial.texture = racial:CreateTexture(nil, "BACKGROUND") racial.texture:SetAllPoints(racial) racial.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask") @@ -76,6 +81,8 @@ function Racial:CreateFrame(unit) racial.cooldownFrame:ClearAllPoints() racial.cooldownFrame:SetPoint("TOPLEFT", racial, "TOPLEFT") racial.cooldownFrame:SetPoint("BOTTOMRIGHT", racial, "BOTTOMRIGHT") + racial.cooldownFrame:SetFrameStrata(Gladdy.db.racialFrameStrata) + racial.cooldownFrame:SetFrameLevel(Gladdy.db.racialFrameLevel + 1) racial.cooldownFont = racial.cooldownFrame:CreateFontString(nil, "OVERLAY") racial.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), 20, "OUTLINE") @@ -85,6 +92,9 @@ function Racial:CreateFrame(unit) racial.borderFrame = CreateFrame("Frame", nil, racial) racial.borderFrame:SetAllPoints(racial) + racial.borderFrame:SetFrameStrata(Gladdy.db.racialFrameStrata) + racial.borderFrame:SetFrameLevel(Gladdy.db.racialFrameLevel + 2) + racial.texture.overlay = racial.borderFrame:CreateTexture(nil, "OVERLAY") racial.texture.overlay:SetAllPoints(racial) racial.texture.overlay:SetTexture(Gladdy.db.racialBorderStyle) @@ -103,6 +113,13 @@ function Racial:UpdateFrame(unit) local width, height = Gladdy.db.racialSize * Gladdy.db.racialWidthFactor, Gladdy.db.racialSize + racial:SetFrameStrata(Gladdy.db.racialFrameStrata) + racial:SetFrameLevel(Gladdy.db.racialFrameLevel) + racial.cooldownFrame:SetFrameStrata(Gladdy.db.racialFrameStrata) + racial.cooldownFrame:SetFrameLevel(Gladdy.db.racialFrameLevel + 1) + racial.borderFrame:SetFrameStrata(Gladdy.db.racialFrameStrata) + racial.borderFrame:SetFrameLevel(Gladdy.db.racialFrameLevel + 2) + racial:SetWidth(width) racial:SetHeight(height) racial.cooldown:SetWidth(width - width/16) @@ -311,37 +328,13 @@ function Racial:GetOptions() position = { type = "group", name = L["Position"], - order = 4, + order = 5, args = { header = { type = "header", name = L["Icon position"], order = 4, }, - racialAnchor = Gladdy:option({ - type = "select", - name = L["Anchor"], - desc = L["This changes the anchor of the racial icon"], - order = 20, - values = { - ["trinket"] = L["Trinket"], - ["classIcon"] = L["Class Icon"], - ["healthBar"] = L["Health Bar"], - ["powerBar"] = L["Power Bar"], - }, - }), - racialPos = Gladdy:option({ - type = "select", - name = L["Icon position"], - desc = L["This changes position relative to its anchor of the racial icon"], - order = 21, - values = { - ["LEFT"] = L["Left"], - ["RIGHT"] = L["Right"], - ["TOP"] = L["Top"], - ["BOTTOM"] = L["Bottom"], - }, - }), racialXOffset = Gladdy:option({ type = "range", name = L["Horizontal offset"], @@ -387,6 +380,35 @@ function Racial:GetOptions() }), }, }, + frameStrata = { + type = "group", + name = L["Frame Strata and Level"], + order = 6, + args = { + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 1, + }, + racialFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + order = 2, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + racialFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + min = 0, + max = 500, + step = 1, + order = 3, + width = "full", + }), + }, + }, }, }, } diff --git a/Modules/ShadowsightTimer.lua b/Modules/ShadowsightTimer.lua index d25dfc3..09d9631 100644 --- a/Modules/ShadowsightTimer.lua +++ b/Modules/ShadowsightTimer.lua @@ -21,6 +21,8 @@ local ShadowsightTimer = Gladdy:NewModule("Shadowsight Timer", nil, { shadowsightTimerStartTime = 91, shadowsightTimerResetTime = 120, shadowsightTimerShowTwoTimer = false, + shadowsightTimerFrameStrata = "HIGH", + shadowsightTimerFrameLevel = 20, }) -- /run LibStub("Gladdy").modules["Shadowsight Timer"]:AURA_GAIN(nil, nil, 34709) @@ -78,6 +80,9 @@ function ShadowsightTimer:CreateTimerFrame(anchor, name, points) self[name].font:SetPoint("LEFT", 5, 0) self[name].font:SetJustifyH("LEFT") self[name].font:SetTextColor(1, 0.8, 0) + + self[name]:SetFrameStrata(Gladdy.db.shadowsightTimerFrameStrata) + self[name]:SetFrameLevel(Gladdy.db.shadowsightTimerFrameLevel) end function ShadowsightTimer:CreateAnchor() @@ -102,6 +107,14 @@ end function ShadowsightTimer:UpdateFrameOnce() self.anchor:EnableMouse(not Gladdy.db.shadowsightTimerLocked) + + self.anchor:SetFrameStrata(Gladdy.db.shadowsightTimerFrameStrata) + self.anchor:SetFrameLevel(Gladdy.db.shadowsightTimerFrameLevel) + self.timerFrame1:SetFrameStrata(Gladdy.db.shadowsightTimerFrameStrata) + self.timerFrame1:SetFrameLevel(Gladdy.db.shadowsightTimerFrameLevel) + self.timerFrame2:SetFrameStrata(Gladdy.db.shadowsightTimerFrameStrata) + self.timerFrame2:SetFrameLevel(Gladdy.db.shadowsightTimerFrameLevel) + if Gladdy.db.shadowsightTimerEnabled then self.anchor:SetScale(Gladdy.db.shadowsightTimerScale) self.anchor:ClearAllPoints() @@ -268,7 +281,7 @@ end function ShadowsightTimer:GetOptions() return { - headerArenaCountdown = { + headerShadowsight = { type = "header", name = L["Shadowsight Timer"], order = 2, @@ -278,61 +291,143 @@ function ShadowsightTimer:GetOptions() name = L["Enabled"], --desc = L["Turns countdown before the start of an arena match on/off."], order = 3, - width = "full", }), shadowsightTimerLocked = Gladdy:option({ type = "toggle", name = L["Locked"], --desc = L["Turns countdown before the start of an arena match on/off."], order = 4, - width = "full", }), shadowsightTimerShowTwoTimer = Gladdy:option({ type = "toggle", name = L["Show two timers"], order = 5, - width = "full", }), shadowsightAnnounce = Gladdy:option({ type = "toggle", name = L["Announce"], --desc = L["Turns countdown before the start of an arena match on/off."], order = 6, - width = "full", }), - shadowsightTimerScale = Gladdy:option({ - type = "range", - name = L["Scale"], + group = { + type = "group", + childGroups = "tree", + name = L["Frame"], order = 7, - min = 0.1, - max = 5, - step = 0.1, - width = "full", - }), - headerTimer = { - type = "header", - name = L["Shadowsight CDs"], - order = 10, + args = { + general = { + type = "group", + name = L["Scale"], + order = 1, + args = { + header = { + type = "header", + name = L["Scale"], + order = 1, + }, + shadowsightTimerScale = Gladdy:option({ + type = "range", + name = L["Scale"], + order = 2, + min = 0.1, + max = 5, + step = 0.1, + width = "full", + }), + }, + }, + cooldown = { + type = "group", + name = L["Cooldown"], + order = 2, + args = { + header = { + type = "header", + name = L["Shadowsight CDs"], + order = 1, + }, + shadowsightTimerStartTime = Gladdy:option({ + type = "range", + name = L["Start Time"], + desc = L["Start time in seconds"], + min = 80, + max = 100, + order = 2, + step = 0.1, + width = "full", + }), + shadowsightTimerResetTime = Gladdy:option({ + type = "range", + name = L["Reset Time"], + desc = L["Reset time in seconds"], + min = 110, + max = 130, + order = 3, + step = 0.1, + width = "full", + }), + }, + }, + --[[font = { + type = "group", + name = L["Font"], + order = 3, + args = { + header = { + type = "header", + name = L["Font"], + order = 4, + }, + racialFont = Gladdy:option({ + type = "select", + name = L["Font"], + desc = L["Font of the cooldown"], + order = 11, + dialogControl = "LSM30_Font", + values = AceGUIWidgetLSMlists.font, + }), + racialFontScale = Gladdy:option({ + type = "range", + name = L["Font scale"], + desc = L["Scale of the font"], + order = 12, + min = 0.1, + max = 2, + step = 0.1, + width = "full", + }), + }, + },--]] + frameStrata = { + type = "group", + name = L["Frame Strata and Level"], + order = 6, + args = { + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 1, + }, + shadowsightTimerFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + order = 2, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + shadowsightTimerFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + min = 0, + max = 500, + step = 1, + order = 3, + width = "full", + }), + }, + }, + }, }, - shadowsightTimerStartTime = Gladdy:option({ - type = "range", - name = L["Start Time"], - desc = L["Start time in seconds"], - min = 80, - max = 100, - order = 11, - step = 0.1, - width = "full", - }), - shadowsightTimerResetTime = Gladdy:option({ - type = "range", - name = L["Reset Time"], - desc = L["Reset time in seconds"], - min = 110, - max = 130, - order = 12, - step = 0.1, - width = "full", - }), } end \ No newline at end of file diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index 928d30c..41a68ba 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -19,6 +19,8 @@ local Trinket = Gladdy:NewModule("Trinket", 80, { trinketCooldownNumberAlpha = 1, trinketXOffset = 0, trinketYOffset = 0, + trinketFrameStrata = "MEDIUM", + trinketFrameLevel = 5, }) function Trinket:Initialize() @@ -62,6 +64,9 @@ end function Trinket:CreateFrame(unit) local trinket = CreateFrame("Button", "GladdyTrinketButton" .. unit, Gladdy.buttons[unit]) trinket:EnableMouse(false) + trinket:SetFrameStrata(Gladdy.db.trinketFrameStrata) + trinket:SetFrameLevel(Gladdy.db.trinketFrameLevel) + trinket.texture = trinket:CreateTexture(nil, "BACKGROUND") trinket.texture:SetAllPoints(trinket) trinket.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02") @@ -70,11 +75,15 @@ function Trinket:CreateFrame(unit) trinket.cooldown = CreateFrame("Cooldown", nil, trinket, "CooldownFrameTemplate") trinket.cooldown.noCooldownCount = true --Gladdy.db.trinketDisableOmniCC trinket.cooldown:SetHideCountdownNumbers(true) + trinket.cooldown:SetFrameStrata(Gladdy.db.trinketFrameStrata) + trinket.cooldown:SetFrameLevel(Gladdy.db.trinketFrameLevel + 1) trinket.cooldownFrame = CreateFrame("Frame", nil, trinket) trinket.cooldownFrame:ClearAllPoints() trinket.cooldownFrame:SetPoint("TOPLEFT", trinket, "TOPLEFT") trinket.cooldownFrame:SetPoint("BOTTOMRIGHT", trinket, "BOTTOMRIGHT") + trinket.cooldownFrame:SetFrameStrata(Gladdy.db.trinketFrameStrata) + trinket.cooldownFrame:SetFrameLevel(Gladdy.db.trinketFrameLevel + 2) trinket.cooldownFont = trinket.cooldownFrame:CreateFontString(nil, "OVERLAY") trinket.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), 20, "OUTLINE") @@ -84,6 +93,9 @@ function Trinket:CreateFrame(unit) trinket.borderFrame = CreateFrame("Frame", nil, trinket) trinket.borderFrame:SetAllPoints(trinket) + trinket.borderFrame:SetFrameStrata(Gladdy.db.trinketFrameStrata) + trinket.borderFrame:SetFrameLevel(Gladdy.db.trinketFrameLevel + 3) + trinket.texture.overlay = trinket.borderFrame:CreateTexture(nil, "OVERLAY") trinket.texture.overlay:SetAllPoints(trinket) trinket.texture.overlay:SetTexture(Gladdy.db.trinketBorderStyle) @@ -104,6 +116,15 @@ function Trinket:UpdateFrame(unit) local width, height = Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor, Gladdy.db.trinketSize + trinket:SetFrameStrata(Gladdy.db.trinketFrameStrata) + trinket:SetFrameLevel(Gladdy.db.trinketFrameLevel) + trinket.cooldown:SetFrameStrata(Gladdy.db.trinketFrameStrata) + trinket.cooldown:SetFrameLevel(Gladdy.db.trinketFrameLevel + 1) + trinket.cooldownFrame:SetFrameStrata(Gladdy.db.trinketFrameStrata) + trinket.cooldownFrame:SetFrameLevel(Gladdy.db.trinketFrameLevel + 2) + trinket.borderFrame:SetFrameStrata(Gladdy.db.trinketFrameStrata) + trinket.borderFrame:SetFrameLevel(Gladdy.db.trinketFrameLevel + 3) + trinket:SetWidth(width) trinket:SetHeight(height) trinket.cooldown:SetWidth(width - width/16) @@ -316,22 +337,30 @@ function Trinket:GetOptions() position = { type = "group", name = L["Position"], - order = 4, + order = 5, args = { header = { type = "header", name = L["Icon position"], order = 4, }, - trinketPos = Gladdy:option({ - type = "select", - name = L["Icon position"], - desc = L["This changes positions of the trinket"], - order = 21, - values = { - ["LEFT"] = L["Left"], - ["RIGHT"] = L["Right"], - }, + trinketXOffset = Gladdy:option({ + type = "range", + name = L["Horizontal offset"], + order = 23, + min = -800, + max = 800, + step = 0.1, + width = "full", + }), + trinketYOffset = Gladdy:option({ + type = "range", + name = L["Vertical offset"], + order = 24, + min = -800, + max = 800, + step = 0.1, + width = "full", }), }, }, @@ -360,6 +389,35 @@ function Trinket:GetOptions() }), }, }, + frameStrata = { + type = "group", + name = L["Frame Strata and Level"], + order = 6, + args = { + headerAuraLevel = { + type = "header", + name = L["Frame Strata and Level"], + order = 1, + }, + trinketFrameStrata = Gladdy:option({ + type = "select", + name = L["Frame Strata"], + order = 2, + values = Gladdy.frameStrata, + sorting = Gladdy.frameStrataSorting, + width = "full", + }), + trinketFrameLevel = Gladdy:option({ + type = "range", + name = L["Frame Level"], + min = 0, + max = 500, + step = 1, + order = 3, + width = "full", + }), + }, + }, }, }, } -- 2.39.5 From 1dd411fed760378853df35745fec61546faac1fc Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 20:57:53 +0100 Subject: [PATCH 050/227] green colored trinket option added --- Modules/Trinket.lua | 59 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 7 deletions(-) diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index 41a68ba..5bf0fda 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -9,6 +9,7 @@ local L = Gladdy.L local Trinket = Gladdy:NewModule("Trinket", 80, { trinketFont = "DorisPP", trinketFontScale = 1, + trinketFontEnabled = true, trinketEnabled = true, trinketSize = 60 + 20 + 1, trinketWidthFactor = 0.9, @@ -21,6 +22,7 @@ local Trinket = Gladdy:NewModule("Trinket", 80, { trinketYOffset = 0, trinketFrameStrata = "MEDIUM", trinketFrameLevel = 5, + trinketColored = false, }) function Trinket:Initialize() @@ -35,6 +37,9 @@ local function iconTimer(self, elapsed) self.active = false self.cooldown:Clear() Gladdy:SendMessage("TRINKET_READY", self.unit) + if Gladdy.db.trinketColored then + self:SetBackdropColor(0,1,0,1) + end else self.timeLeft = self.timeLeft - elapsed end @@ -57,12 +62,17 @@ local function iconTimer(self, elapsed) self.cooldownFont:SetTextColor(1, 0, 0, Gladdy.db.trinketCooldownNumberAlpha) self.cooldownFont:SetFont(Gladdy:SMFetch("font", "trinketFont"), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE") end - Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 10, true) + if Gladdy.db.trinketFontEnabled then + Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 10, true) + else + self.cooldownFont:SetText("") + end end end function Trinket:CreateFrame(unit) - local trinket = CreateFrame("Button", "GladdyTrinketButton" .. unit, Gladdy.buttons[unit]) + local trinket = CreateFrame("Button", "GladdyTrinketButton" .. unit, Gladdy.buttons[unit], BackdropTemplateMixin and "BackdropTemplate") + trinket:SetBackdrop({bgFile = "Interface\\AddOns\\Gladdy\\Images\\trinket" }) trinket:EnableMouse(false) trinket:SetFrameStrata(Gladdy.db.trinketFrameStrata) trinket:SetFrameLevel(Gladdy.db.trinketFrameLevel) @@ -114,6 +124,18 @@ function Trinket:UpdateFrame(unit) return end + if Gladdy.db.trinketColored then + if trinket.active then + trinket:SetBackdropColor(1,0,0,1) + else + trinket:SetBackdropColor(0,1,0,1) + end + trinket.texture:SetTexture() + else + trinket:SetBackdropColor(0,1,0,0) + trinket.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02") + end + local width, height = Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor, Gladdy.db.trinketSize trinket:SetFrameStrata(Gladdy.db.trinketFrameStrata) @@ -151,7 +173,15 @@ function Trinket:UpdateFrame(unit) 0) end - if (Gladdy.db.trinketEnabled == false) then + trinket.cooldown:SetAlpha(Gladdy.db.trinketCooldownAlpha) + + if Gladdy.db.trinketDisableCircle then + trinket.cooldown:Hide() + else + trinket.cooldown:Show() + end + + if (not Gladdy.db.trinketEnabled) then trinket:Hide() else trinket:Show() @@ -215,6 +245,9 @@ function Trinket:Used(unit, startTime, duration) trinket.timeLeft = (startTime/1000.0 + duration/1000.0) - GetTime() if not Gladdy.db.trinketDisableCircle then trinket.cooldown:SetCooldown(startTime/1000.0, duration/1000.0) end trinket.active = true + if Gladdy.db.trinketColored then + trinket:SetBackdropColor(1,0,0,1) + end Gladdy:SendMessage("TRINKET_USED", unit) end end @@ -232,11 +265,17 @@ function Trinket:GetOptions() desc = L["Enable trinket icon"], order = 3, }), + trinketColored = Gladdy:option({ + type = "toggle", + name = L["Green colored trinket"], + desc = L["Shows a green icon when off CD and red when on CD."], + order = 4, + }), group = { type = "group", childGroups = "tree", name = L["Frame"], - order = 4, + order = 5, args = { general = { type = "group", @@ -312,13 +351,19 @@ function Trinket:GetOptions() header = { type = "header", name = L["Font"], - order = 4, + order = 1, }, + trinketFontEnabled = Gladdy:option({ + type = "toggle", + name = L["Font Enabled"], + order = 2, + width = "full", + }), trinketFont = Gladdy:option({ type = "select", name = L["Font"], desc = L["Font of the cooldown"], - order = 11, + order = 3, dialogControl = "LSM30_Font", values = AceGUIWidgetLSMlists.font, }), @@ -326,7 +371,7 @@ function Trinket:GetOptions() type = "range", name = L["Font scale"], desc = L["Scale of the font"], - order = 12, + order = 4, min = 0.1, max = 2, step = 0.1, -- 2.39.5 From 1e926024cee557ec91877146eed4113c9f7b121f Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 20:58:20 +0100 Subject: [PATCH 051/227] green colored trinket option added --- Images/trinket.blp | Bin 0 -> 6660 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Images/trinket.blp diff --git a/Images/trinket.blp b/Images/trinket.blp new file mode 100644 index 0000000000000000000000000000000000000000..ad29aaa96e4871fc24994034db7f12f20e2c017b GIT binary patch literal 6660 zcmeHLOGs2v82)FpQbtDup$C$dxGFI+qBb*^HW>yMnN%c2MUX^IEu*wmv@j|Y!c3E( zHiZbes20tDMav=;ga|Y(Aqpqd>7mT&f875%j!Co_!Mq2~<2(QRyXT(a&h}lqH+cZS zo8j?TI8$#*$DW6MCH7SSz1WAbk7G|?jS7Ejxu}3X03BO65!62Q(HMktH&ndcOwD86 zxbyUK&-vlt{qif1@(TKb%~i$E_LlVo3lEBUTSNRvU=*6-LMPiXGnwMljCe6o3>JHOfoBzF)^cByvXJaqP zL$*G}pY{(xnEYs4?tj-#a?L;2u0!SY9H^NznWx7N&a?Pd(br#S4ShBPx!@N{T8*7-2HQ??D1SpXtsATsj`zMu^64Lv`d?OfI9^A= zjuEQ!!ML2CeT{+7guCAc*#EYEnfDLJ_`Elj$T^4y#9s3rtM6j{pFcc22drzXzxKdu z#uvLJzUptb`Z!K zTHn9spTvh_zF6va3YO>ZK(~G-#N|U7aL)%Zpls-U>0)KTJsaz^cA$I&M$riNxk?fh<`26b4#rMzvIKH*WlN0V!bfgX(ss+PpqFdQiH=_d?uVa z|KwR(YVud_sp7}=uM8}f=Qn9O4d5#{Z}oXjx!rH+H(9sp+-20KO=J63Z6nQ FzX3$kCJ_Jt literal 0 HcmV?d00001 -- 2.39.5 From 22526c03869c50d5556ba472f5e09ac2e4098904 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 21:04:25 +0100 Subject: [PATCH 052/227] cleanup --- Gladdy.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gladdy.lua b/Gladdy.lua index e378938..416ba57 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -216,11 +216,11 @@ function Gladdy:DeleteUnknownOptions(tbl, refTbl, str) end for k,v in pairs(tbl) do if refTbl[k] == nil then - --Gladdy:Print("SavedVariable deleted:", str .. "." .. k, "not found!") + Gladdy:Debug("INFO", "SavedVariable deleted:", str .. "." .. k, "not found!") tbl[k] = nil else if type(v) ~= type(refTbl[k]) then - --Gladdy:Print("SavedVariable deleted:", str .. "." .. k, "type error!", "Expected", type(refTbl[k]), "but found", type(v)) + Gladdy:Debug("INFO", "SavedVariable deleted:", str .. "." .. k, "type error!", "Expected", type(refTbl[k]), "but found", type(v)) tbl[k] = nil elseif type(v) == "table" then Gladdy:DeleteUnknownOptions(v, refTbl[k], str .. "." .. k) -- 2.39.5 From 12abedfd0f0fd8b1890a390fe32d264eaac9451b Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 21:08:30 +0100 Subject: [PATCH 053/227] readme added features --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 112f909..baceaaa 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ Thank you for the great feedback and active contribution. - **big overhaul of positioning elements added! All elements besides HP and PowerBar can be moved separately** - added Mover Frames for Auras, Interrupts, (De)Buffs, CastBar, ClassIcon, CombatIndicator, Cooldowns, DRs, Pets, Racial, Trinket - this will hopefully make configuration a lot easier + - all visible elements' FrameStrata and FrameLevel can be configured (overlap frames how you want it) - **SpecDetection:** - fixed spec detection for Paladins - added following spells for better spec detection: @@ -123,6 +124,7 @@ Thank you for the great feedback and active contribution. - **Shadowsight:** - reset timer when buff was taken - add a configurable 2nd timer or show one timer with the closest CD +- **Trinket: green/red option added** - **fixed some DR-categories** (Hibernate / Chastice / Dragonsbreath / ImpConcussiveShot / Counterattack) - **Pixel Perfect option added** (makes your Gladdy Frames pixel perfect - no more wierd scaling interferences) - **Pets can be grouped** (not perfect yet, but a first step) -- 2.39.5 From 061bc5859cdf421cc235d3f272abfaeccfe6ba8d Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 21:31:56 +0100 Subject: [PATCH 054/227] imp blink is Arcane --- Constants.lua | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Constants.lua b/Constants.lua index d04dcda..8bbd4c7 100644 --- a/Constants.lua +++ b/Constants.lua @@ -35,7 +35,7 @@ local specBuffs = { [GetSpellInfo(12043)] = L["Arcane"], -- Presence of Mind [GetSpellInfo(31589)] = L["Arcane"], -- Slow [GetSpellInfo(12472)] = L["Frost"], -- Icy Veins - [GetSpellInfo(46989)] = L["Fire"], -- Improved Blink + [GetSpellInfo(46989)] = L["Arcane"], -- Improved Blink -- PALADIN [GetSpellInfo(31836)] = L["Holy"], -- Light's Grace diff --git a/README.md b/README.md index baceaaa..19c87b6 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ Thank you for the great feedback and active contribution. **Here is a list of all changes:** - **major release version set to v2** - - this will mean, that export strings will still be backwards compatible, but not forward (v2 String cant be imported into v1 Strings but vice versa) + - this will mean, that export strings will still be backwards compatible, but not forward (Gladdy v2.x String cant be imported into Gladdy v1.x but vice versa) - **big overhaul of positioning elements added! All elements besides HP and PowerBar can be moved separately** - added Mover Frames for Auras, Interrupts, (De)Buffs, CastBar, ClassIcon, CombatIndicator, Cooldowns, DRs, Pets, Racial, Trinket - this will hopefully make configuration a lot easier @@ -89,7 +89,7 @@ Thank you for the great feedback and active contribution. - added following spells for better spec detection: - Expose Weakness (Survival Hunter) - Slow (Arcane Mage) - - Improved Blink (Fire Mage) + - Improved Blink (Arcane Mage) - Vindication (Retribution Paladin) - Holy Shield (Protection Paladin) - Vampiric Embrace (Shadow Priest) @@ -100,7 +100,7 @@ Thank you for the great feedback and active contribution. - Healing Way (Restoration Shaman) - Totem of Wrath (Elemental Shaman) - Dark Pact (Affliction Warlock) - - Conflagate (Destruction Warlock) + - Conflagrate (Destruction Warlock) - Shield Slam (Protection Warrior) - **Cooldowns:** - added Fear Ward and Fear Ward Cooldown Detection in case it was used before arena -- 2.39.5 From 298ce642fc70584fbb00d32b1f6fed7881356bab Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 22:15:39 +0100 Subject: [PATCH 055/227] fixed racial cooldowncircle --- Modules/Racial.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Modules/Racial.lua b/Modules/Racial.lua index 153c71f..717e4d5 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -76,13 +76,15 @@ function Racial:CreateFrame(unit) racial.cooldown = CreateFrame("Cooldown", nil, racial, "CooldownFrameTemplate") racial.cooldown.noCooldownCount = true --Gladdy.db.racialDisableOmniCC racial.cooldown:SetHideCountdownNumbers(true) + racial.cooldown:SetFrameStrata(Gladdy.db.racialFrameStrata) + racial.cooldown:SetFrameLevel(Gladdy.db.racialFrameLevel + 1) racial.cooldownFrame = CreateFrame("Frame", nil, racial) racial.cooldownFrame:ClearAllPoints() racial.cooldownFrame:SetPoint("TOPLEFT", racial, "TOPLEFT") racial.cooldownFrame:SetPoint("BOTTOMRIGHT", racial, "BOTTOMRIGHT") racial.cooldownFrame:SetFrameStrata(Gladdy.db.racialFrameStrata) - racial.cooldownFrame:SetFrameLevel(Gladdy.db.racialFrameLevel + 1) + racial.cooldownFrame:SetFrameLevel(Gladdy.db.racialFrameLevel + 2) racial.cooldownFont = racial.cooldownFrame:CreateFontString(nil, "OVERLAY") racial.cooldownFont:SetFont(Gladdy:SMFetch("font", "racialFont"), 20, "OUTLINE") @@ -93,7 +95,7 @@ function Racial:CreateFrame(unit) racial.borderFrame = CreateFrame("Frame", nil, racial) racial.borderFrame:SetAllPoints(racial) racial.borderFrame:SetFrameStrata(Gladdy.db.racialFrameStrata) - racial.borderFrame:SetFrameLevel(Gladdy.db.racialFrameLevel + 2) + racial.borderFrame:SetFrameLevel(Gladdy.db.racialFrameLevel + 3) racial.texture.overlay = racial.borderFrame:CreateTexture(nil, "OVERLAY") racial.texture.overlay:SetAllPoints(racial) @@ -115,10 +117,12 @@ function Racial:UpdateFrame(unit) racial:SetFrameStrata(Gladdy.db.racialFrameStrata) racial:SetFrameLevel(Gladdy.db.racialFrameLevel) + racial.cooldown:SetFrameStrata(Gladdy.db.racialFrameStrata) + racial.cooldown:SetFrameLevel(Gladdy.db.racialFrameLevel + 1) racial.cooldownFrame:SetFrameStrata(Gladdy.db.racialFrameStrata) - racial.cooldownFrame:SetFrameLevel(Gladdy.db.racialFrameLevel + 1) + racial.cooldownFrame:SetFrameLevel(Gladdy.db.racialFrameLevel + 2) racial.borderFrame:SetFrameStrata(Gladdy.db.racialFrameStrata) - racial.borderFrame:SetFrameLevel(Gladdy.db.racialFrameLevel + 2) + racial.borderFrame:SetFrameLevel(Gladdy.db.racialFrameLevel + 3) racial:SetWidth(width) racial:SetHeight(height) @@ -178,7 +182,7 @@ function Racial:Used(unit, startTime, duration) end if not racial.active then racial.timeLeft = duration - if not Gladdy.db.trinketDisableCircle then racial.cooldown:SetCooldown(startTime, duration) end + if not Gladdy.db.racialDisableCircle then racial.cooldown:SetCooldown(startTime, duration) end racial.active = true end end -- 2.39.5 From d24b330411033747fffa755d2d035196b9383fbb Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 22:16:02 +0100 Subject: [PATCH 056/227] added option to hide castbar icon --- Modules/Castbar.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 9a16ff2..10526fc 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -33,6 +33,7 @@ local Castbar = Gladdy:NewModule("Cast Bar", 70, { castBarIconColor = { r = 0, g = 0, b = 0, a = 1 }, castBarBorderColor = { r = 0, g = 0, b = 0, a = 1 }, castBarFontColor = { r = 1, g = 1, b = 1, a = 1 }, + castBarIconEnabled = true, castBarGuesses = true, castBarXOffset = 0, castBarYOffset = 0, @@ -173,6 +174,11 @@ function Castbar:UpdateFrame(unit) castBar.icon:SetHeight(Gladdy.db.castBarIconSize) castBar.icon.texture:SetAllPoints(castBar.icon) castBar.icon:ClearAllPoints() + if Gladdy.db.castBarIconEnabled then + castBar.icon:Show() + else + castBar.icon:Hide() + end local rightMargin = 0 local leftMargin = 0 @@ -664,6 +670,12 @@ function Castbar:GetOptions() name = L["Icon Size"], order = 1, }, + castBarIconEnabled = option({ + type = "toggle", + name = L["Icon Enabled"], + order = 2, + width = "full", + }), castBarIconSize = option({ type = "range", name = L["Icon size"], -- 2.39.5 From e5151f16052a3cd304606b2842a4064d9bdd78d6 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 22:17:28 +0100 Subject: [PATCH 057/227] added option to hide castbar icon --- Modules/Castbar.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 10526fc..06d3ff7 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -423,7 +423,11 @@ function Castbar:CAST_START(unit, spell, icon, value, maxValue, test) castBar.spark:Show() end castBar:SetAlpha(1) - castBar.icon:Show() + if Gladdy.db.castBarIconEnabled then + castBar.icon:Show() + else + castBar.icon:Hide() + end end function Castbar:CAST_STOP(unit, ...) -- 2.39.5 From 61c50b3e3266b3e0eec428800389047ca68d14d1 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 22:18:34 +0100 Subject: [PATCH 058/227] readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 19c87b6..9f0084c 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ Thank you for the great feedback and active contribution. - **Shadowsight:** - reset timer when buff was taken - add a configurable 2nd timer or show one timer with the closest CD +- **CastBar Icon can be enabled/disabled** - **Trinket: green/red option added** - **fixed some DR-categories** (Hibernate / Chastice / Dragonsbreath / ImpConcussiveShot / Counterattack) - **Pixel Perfect option added** (makes your Gladdy Frames pixel perfect - no more wierd scaling interferences) -- 2.39.5 From 99fa6c0664e12dee7e14274def472c5fff357ae8 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 22:20:53 +0100 Subject: [PATCH 059/227] readme added disclaimer --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9f0084c..ce7c701 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,8 @@ Thank you! This is a packed release with new features and bugfixes. Most importantly, positioning of all elements has been redone with movable frames. Thank you for the great feedback and active contribution. +####Attention: Once you install this version it will drastically change your current profile! You can't go back to an earlier version. Either back up your WTF or export your Profile before updating! + **Here is a list of all changes:** - **major release version set to v2** - this will mean, that export strings will still be backwards compatible, but not forward (Gladdy v2.x String cant be imported into Gladdy v1.x but vice versa) -- 2.39.5 From ea10481c13e9eb7f35fcb77d0462592f09268abd Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 22:39:06 +0100 Subject: [PATCH 060/227] configurable trinket color --- Modules/Trinket.lua | 34 ++++++++++++++++++++++++++++------ Options.lua | 4 ++++ 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index 5bf0fda..7a2ba38 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -23,6 +23,8 @@ local Trinket = Gladdy:NewModule("Trinket", 80, { trinketFrameStrata = "MEDIUM", trinketFrameLevel = 5, trinketColored = false, + trinketColoredCd = { r = 1, g = 0, b = 0, a = 1 }, + trinketColoredNoCd = { r = 0, g = 1, b = 0, a = 1 }, }) function Trinket:Initialize() @@ -38,7 +40,7 @@ local function iconTimer(self, elapsed) self.cooldown:Clear() Gladdy:SendMessage("TRINKET_READY", self.unit) if Gladdy.db.trinketColored then - self:SetBackdropColor(0,1,0,1) + self:SetBackdropColor(Gladdy:SetColor(Gladdy.db.trinketColoredNoCd)) end else self.timeLeft = self.timeLeft - elapsed @@ -126,13 +128,13 @@ function Trinket:UpdateFrame(unit) if Gladdy.db.trinketColored then if trinket.active then - trinket:SetBackdropColor(1,0,0,1) + trinket:SetBackdropColor(Gladdy:SetColor(Gladdy.db.trinketColoredCd)) else - trinket:SetBackdropColor(0,1,0,1) + trinket:SetBackdropColor(Gladdy:SetColor(Gladdy.db.trinketColoredNoCd)) end trinket.texture:SetTexture() else - trinket:SetBackdropColor(0,1,0,0) + trinket:SetBackdropColor(Gladdy:SetColor(Gladdy.db.trinketColoredNoCd)) trinket.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02") end @@ -160,7 +162,7 @@ function Trinket:UpdateFrame(unit) trinket.texture:SetAllPoints(trinket) trinket.texture.overlay:SetTexture(Gladdy.db.trinketBorderStyle) - trinket.texture.overlay:SetVertexColor(Gladdy.db.trinketBorderColor.r, Gladdy.db.trinketBorderColor.g, Gladdy.db.trinketBorderColor.b, Gladdy.db.trinketBorderColor.a) + trinket.texture.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.trinketBorderColor)) Gladdy:SetPosition(trinket, unit, "trinketXOffset", "trinketYOffset", Trinket:LegacySetPosition(trinket, unit), Trinket) @@ -246,7 +248,7 @@ function Trinket:Used(unit, startTime, duration) if not Gladdy.db.trinketDisableCircle then trinket.cooldown:SetCooldown(startTime/1000.0, duration/1000.0) end trinket.active = true if Gladdy.db.trinketColored then - trinket:SetBackdropColor(1,0,0,1) + trinket:SetBackdropColor(Gladdy:SetColor(Gladdy.db.trinketColoredCd)) end Gladdy:SendMessage("TRINKET_USED", unit) end @@ -271,6 +273,26 @@ function Trinket:GetOptions() desc = L["Shows a green icon when off CD and red when on CD."], order = 4, }), + trinketColoredCd = Gladdy:colorOption({ + type = "color", + name = L["Colored trinket CD"], + desc = L["Color of the border"], + order = 5, + hasAlpha = true, + disabled = function() + return not Gladdy.db.trinketColored + end, + }), + trinketColoredNoCd = Gladdy:colorOption({ + type = "color", + name = L["Colored trinket No CD"], + desc = L["Color of the border"], + order = 6, + hasAlpha = true, + disabled = function() + return not Gladdy.db.trinketColored + end, + }), group = { type = "group", childGroups = "tree", diff --git a/Options.lua b/Options.lua index 0dd3bfe..ea4c3a3 100644 --- a/Options.lua +++ b/Options.lua @@ -104,6 +104,10 @@ function Gladdy:option(params) return defaults end +function Gladdy:SetColor(option) + return option.r, option.g, option.b, option.a +end + function Gladdy:colorOption(params) local defaults = { get = function(info) -- 2.39.5 From 042a8f78129a30188c4ec9cc552f7fe9d38796af Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 23:04:23 +0100 Subject: [PATCH 061/227] colored trinket option wording --- Modules/Trinket.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index 7a2ba38..a21ab5e 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -269,8 +269,8 @@ function Trinket:GetOptions() }), trinketColored = Gladdy:option({ type = "toggle", - name = L["Green colored trinket"], - desc = L["Shows a green icon when off CD and red when on CD."], + name = L["Colored trinket"], + desc = L["Shows a solid colored icon when off/off CD."], order = 4, }), trinketColoredCd = Gladdy:colorOption({ -- 2.39.5 From 5f4bf034e583d4d84659abf4c78da688e33aade8 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 23:07:23 +0100 Subject: [PATCH 062/227] use Gladdy:SetColor for all color setters --- Frame.lua | 5 ++--- Modules/Auras.lua | 18 +++++++++--------- Modules/BuffsDebuffs.lua | 2 +- Modules/Castbar.lua | 28 ++++++++++++++-------------- Modules/Classicon.lua | 2 +- Modules/CombatIndicator.lua | 4 ++-- Modules/Cooldowns.lua | 10 +++++----- Modules/Diminishings.lua | 18 +++++++++--------- Modules/Healthbar.lua | 16 ++++++++-------- Modules/Highlight.lua | 6 +++--- Modules/Pets.lua | 26 +++++++++++++------------- Modules/Powerbar.lua | 16 ++++++++-------- Modules/Racial.lua | 2 +- 13 files changed, 76 insertions(+), 77 deletions(-) diff --git a/Frame.lua b/Frame.lua index 7f86b67..79a1354 100644 --- a/Frame.lua +++ b/Frame.lua @@ -39,7 +39,7 @@ function Gladdy:CreateFrame() self.frame.background = CreateFrame("Frame", nil, self.frame, BackdropTemplateMixin and "BackdropTemplate") self.frame.background:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = false, tileSize = 16}) self.frame.background:SetFrameStrata("BACKGROUND") - self.frame.background:SetBackdropColor(self.db.backgroundColor.r, self.db.backgroundColor.g, self.db.backgroundColor.b, self.db.backgroundColor.a) + self.frame.background:SetBackdropColor(Gladdy:SetColor(self.db.backgroundColor)) self.frame.background:SetAllPoints(self.frame) --self.frame.texture = self.frame:CreateTexture(nil, "OVERLAY") --self.frame.texture:SetAllPoints(self.frame) @@ -149,8 +149,7 @@ function Gladdy:UpdateFrame() self.frame:SetWidth(self.db.barWidth + highlightBorderSize) self.frame:SetHeight(height) self.frame:ClearAllPoints() - self.frame.background:SetBackdropColor(self.db.backgroundColor.r, self.db.backgroundColor.g, self.db.backgroundColor.b, self.db.backgroundColor.a) - --self.frame:SetBackdropColor(self.db.frameColor.r, self.db.frameColor.g, self.db.frameColor.b, self.db.frameColor.a) + self.frame.background:SetBackdropColor(Gladdy:SetColor(self.db.backgroundColor)) self.frame:ClearAllPoints() if (self.db.x == 0 and self.db.y == 0) then self.frame:SetPoint("CENTER") diff --git a/Modules/Auras.lua b/Modules/Auras.lua index 367bbf4..7d903e4 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -108,7 +108,7 @@ function Auras:CreateFrame(unit) auraFrame.text = auraFrame.cooldownFrame:CreateFontString(nil, "OVERLAY") auraFrame.text:SetFont(Gladdy:SMFetch("font", "auraFont"), 10, "OUTLINE") - auraFrame.text:SetTextColor(Gladdy.db.auraFontColor.r, Gladdy.db.auraFontColor.g, Gladdy.db.auraFontColor.b, Gladdy.db.auraFontColor.a) + auraFrame.text:SetTextColor(Gladdy:SetColor(Gladdy.db.auraFontColor)) --auraFrame.text:SetShadowOffset(1, -1) --auraFrame.text:SetShadowColor(0, 0, 0, 1) auraFrame.text:SetJustifyH("CENTER") @@ -181,7 +181,7 @@ function Auras:CreateInterrupt(unit) interruptFrame.text = interruptFrame.cooldownFrame:CreateFontString(nil, "OVERLAY") interruptFrame.text:SetFont(Gladdy:SMFetch("font", "auraFont"), 10, "OUTLINE") - interruptFrame.text:SetTextColor(Gladdy.db.auraFontColor.r, Gladdy.db.auraFontColor.g, Gladdy.db.auraFontColor.b, Gladdy.db.auraFontColor.a) + interruptFrame.text:SetTextColor(Gladdy:SetColor(Gladdy.db.auraFontColor)) --auraFrame.text:SetShadowOffset(1, -1) --auraFrame.text:SetShadowColor(0, 0, 0, 1) interruptFrame.text:SetJustifyH("CENTER") @@ -280,13 +280,13 @@ function Auras:UpdateFrame(unit) auraFrame.cooldown:SetAlpha(Gladdy.db.auraCooldownAlpha) auraFrame.text:SetFont(Gladdy:SMFetch("font", "auraFont"), (width/2 - 1) * Gladdy.db.auraFontSizeScale, "OUTLINE") - auraFrame.text:SetTextColor(Gladdy.db.auraFontColor.r, Gladdy.db.auraFontColor.g, Gladdy.db.auraFontColor.b, Gladdy.db.auraFontColor.a) + auraFrame.text:SetTextColor(Gladdy:SetColor(Gladdy.db.auraFontColor)) auraFrame.icon.overlay:SetTexture(Gladdy.db.auraBorderStyle) if auraFrame.track and auraFrame.track == AURA_TYPE_DEBUFF then - auraFrame.icon.overlay:SetVertexColor(Gladdy.db.auraDebuffBorderColor.r, Gladdy.db.auraDebuffBorderColor.g, Gladdy.db.auraDebuffBorderColor.b, Gladdy.db.auraDebuffBorderColor.a) + auraFrame.icon.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.auraDebuffBorderColor)) elseif auraFrame.track and auraFrame.track == AURA_TYPE_BUFF then - auraFrame.icon.overlay:SetVertexColor(Gladdy.db.auraBuffBorderColor.r, Gladdy.db.auraBuffBorderColor.g, Gladdy.db.auraBuffBorderColor.b, Gladdy.db.auraBuffBorderColor.a) + auraFrame.icon.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.auraBuffBorderColor)) else auraFrame.icon.overlay:SetVertexColor(0, 0, 0, 1) end @@ -381,7 +381,7 @@ function Auras:UpdateInterruptFrame(unit) interruptFrame.cooldown:SetAlpha(Gladdy.db.auraCooldownAlpha) interruptFrame.text:SetFont(Gladdy:SMFetch("font", "auraFont"), (width/2 - 1) * Gladdy.db.auraFontSizeScale, "OUTLINE") - interruptFrame.text:SetTextColor(Gladdy.db.auraFontColor.r, Gladdy.db.auraFontColor.g, Gladdy.db.auraFontColor.b, Gladdy.db.auraFontColor.a) + interruptFrame.text:SetTextColor(Gladdy:SetColor(Gladdy.db.auraFontColor)) interruptFrame.icon.overlay:SetTexture(Gladdy.db.auraBorderStyle) if interruptFrame.spellSchool then @@ -522,9 +522,9 @@ function Auras:AURA_GAIN(unit, auraType, spellID, spellName, icon, duration, exp auraFrame.icon.overlay:Show() auraFrame.cooldownFrame:Show() if auraType == AURA_TYPE_DEBUFF then - auraFrame.icon.overlay:SetVertexColor(Gladdy.db.auraDebuffBorderColor.r, Gladdy.db.auraDebuffBorderColor.g, Gladdy.db.auraDebuffBorderColor.b, Gladdy.db.auraDebuffBorderColor.a) + auraFrame.icon.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.auraDebuffBorderColor)) elseif auraType == AURA_TYPE_BUFF then - auraFrame.icon.overlay:SetVertexColor(Gladdy.db.auraBuffBorderColor.r, Gladdy.db.auraBuffBorderColor.g, Gladdy.db.auraBuffBorderColor.b, Gladdy.db.auraBuffBorderColor.a) + auraFrame.icon.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.auraBuffBorderColor)) else auraFrame.icon.overlay:SetVertexColor(Gladdy.db.frameBorderColor.r, Gladdy.db.frameBorderColor.g, Gladdy.db.frameBorderColor.b, Gladdy.db.frameBorderColor.a) end @@ -559,7 +559,7 @@ end function Auras:GetInterruptColor(extraSpellSchool) if not Gladdy.db.auraInterruptColorsEnabled then - return Gladdy.db.auraDebuffBorderColor.r, Gladdy.db.auraDebuffBorderColor.g, Gladdy.db.auraDebuffBorderColor.b, Gladdy.db.auraDebuffBorderColor.a + return Gladdy:SetColor(Gladdy.db.auraDebuffBorderColor) else local color = Gladdy.db.auraInterruptColors[extraSpellSchool] or Gladdy.db.auraInterruptColors["unknown"] return color.r, color.g, color.b, color.a diff --git a/Modules/BuffsDebuffs.lua b/Modules/BuffsDebuffs.lua index 8c75649..d1575a9 100644 --- a/Modules/BuffsDebuffs.lua +++ b/Modules/BuffsDebuffs.lua @@ -62,7 +62,7 @@ local function spellSchoolToOptionValue(spellSchool) spellSchoolToOptionValueTable[spellSchool].b, spellSchoolToOptionValueTable[spellSchool].a else - return Gladdy.db.buffsBorderColor.r,Gladdy.db.buffsBorderColor.g,Gladdy.db.buffsBorderColor.b,Gladdy.db.buffsBorderColor.a + return Gladdy:SetColor(Gladdy.db.buffsBorderColor) end end diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 06d3ff7..644bfcd 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -70,13 +70,13 @@ function Castbar:CreateFrame(unit) castBar.backdrop:SetAllPoints(castBar) castBar.backdrop:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "castBarBorderStyle"), edgeSize = Gladdy.db.castBarBorderSize }) - castBar.backdrop:SetBackdropBorderColor(Gladdy.db.castBarBorderColor.r, Gladdy.db.castBarBorderColor.g, Gladdy.db.castBarBorderColor.b, Gladdy.db.castBarBorderColor.a) + castBar.backdrop:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.castBarBorderColor)) castBar.backdrop:SetFrameStrata(Gladdy.db.castBarFrameStrata) castBar.backdrop:SetFrameLevel(Gladdy.db.castBarFrameLevel - 1) castBar.bar = CreateFrame("StatusBar", nil, castBar) castBar.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "castBarTexture")) - castBar.bar:SetStatusBarColor(Gladdy.db.castBarColor.r, Gladdy.db.castBarColor.g, Gladdy.db.castBarColor.b, Gladdy.db.castBarColor.a) + castBar.bar:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.castBarColor)) castBar.bar:SetMinMaxValues(0, 100) castBar.bar:SetFrameLevel(0) castBar.bar:SetFrameStrata(Gladdy.db.castBarFrameStrata) @@ -92,7 +92,7 @@ function Castbar:CreateFrame(unit) castBar.bg = castBar.bar:CreateTexture(nil, "BACKGROUND") castBar.bg:SetAlpha(1) castBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "castBarTexture")) - castBar.bg:SetVertexColor(Gladdy.db.castBarBgColor.r, Gladdy.db.castBarBgColor.g, Gladdy.db.castBarBgColor.b, Gladdy.db.castBarBgColor.a) + castBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.castBarBgColor)) castBar.bg:SetAllPoints(castBar.bar) castBar.icon = CreateFrame("Frame", nil, castBar) @@ -114,7 +114,7 @@ function Castbar:CreateFrame(unit) castBar.spellText = castBar:CreateFontString(nil, "LOW") castBar.spellText:SetFont(Gladdy:SMFetch("font", "auraFont"), Gladdy.db.castBarFontSize) - castBar.spellText:SetTextColor(Gladdy.db.castBarFontColor.r, Gladdy.db.castBarFontColor.g, Gladdy.db.castBarFontColor.b, Gladdy.db.castBarFontColor.a) + castBar.spellText:SetTextColor(Gladdy:SetColor(Gladdy.db.castBarFontColor)) castBar.spellText:SetShadowOffset(1, -1) castBar.spellText:SetShadowColor(0, 0, 0, 1) castBar.spellText:SetJustifyH("CENTER") @@ -122,7 +122,7 @@ function Castbar:CreateFrame(unit) castBar.timeText = castBar:CreateFontString(nil, "LOW") castBar.timeText:SetFont(Gladdy:SMFetch("font", "auraFont"), Gladdy.db.castBarFontSize) - castBar.timeText:SetTextColor(Gladdy.db.castBarFontColor.r, Gladdy.db.castBarFontColor.g, Gladdy.db.castBarFontColor.b, Gladdy.db.castBarFontColor.a) + castBar.timeText:SetTextColor(Gladdy:SetColor(Gladdy.db.castBarFontColor)) castBar.timeText:SetShadowOffset(1, -1) castBar.timeText:SetShadowColor(0, 0, 0, 1) castBar.timeText:SetJustifyH("CENTER") @@ -152,20 +152,20 @@ function Castbar:UpdateFrame(unit) castBar:SetHeight(Gladdy.db.castBarHeight) castBar.backdrop:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "castBarBorderStyle"), edgeSize = Gladdy.db.castBarBorderSize }) - castBar.backdrop:SetBackdropBorderColor(Gladdy.db.castBarBorderColor.r, Gladdy.db.castBarBorderColor.g, Gladdy.db.castBarBorderColor.b, Gladdy.db.castBarBorderColor.a) + castBar.backdrop:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.castBarBorderColor)) castBar.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "castBarTexture")) castBar.bar:ClearAllPoints() - castBar.bar:SetStatusBarColor(Gladdy.db.castBarColor.r, Gladdy.db.castBarColor.g, Gladdy.db.castBarColor.b, Gladdy.db.castBarColor.a) + castBar.bar:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.castBarColor)) castBar.bar:SetPoint("TOPLEFT", castBar, "TOPLEFT", (Gladdy.db.castBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.castBarBorderSize/Gladdy.db.statusbarBorderOffset)) castBar.bar:SetPoint("BOTTOMRIGHT", castBar, "BOTTOMRIGHT", -(Gladdy.db.castBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.castBarBorderSize/Gladdy.db.statusbarBorderOffset)) castBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "castBarTexture")) - castBar.bg:SetVertexColor(Gladdy.db.castBarBgColor.r, Gladdy.db.castBarBgColor.g, Gladdy.db.castBarBgColor.b, Gladdy.db.castBarBgColor.a) + castBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.castBarBgColor)) if Gladdy.db.castBarSparkEnabled then castBar.spark:SetHeight(Gladdy.db.castBarHeight * 1.8) - castBar.spark:SetVertexColor(Gladdy.db.castBarSparkColor.r, Gladdy.db.castBarSparkColor.g, Gladdy.db.castBarSparkColor.b, Gladdy.db.castBarSparkColor.a) + castBar.spark:SetVertexColor(Gladdy:SetColor(Gladdy.db.castBarSparkColor)) else castBar.spark:SetAlpha(0) end @@ -193,13 +193,13 @@ function Castbar:UpdateFrame(unit) Gladdy:SetPosition(castBar, unit, "castBarXOffset", "castBarYOffset", Castbar:LegacySetPosition(castBar, unit, leftMargin, rightMargin), Castbar) castBar.spellText:SetFont(Gladdy:SMFetch("font", "castBarFont"), Gladdy.db.castBarFontSize) - castBar.spellText:SetTextColor(Gladdy.db.castBarFontColor.r, Gladdy.db.castBarFontColor.g, Gladdy.db.castBarFontColor.b, Gladdy.db.castBarFontColor.a) + castBar.spellText:SetTextColor(Gladdy:SetColor(Gladdy.db.castBarFontColor)) castBar.timeText:SetFont(Gladdy:SMFetch("font", "castBarFont"), Gladdy.db.castBarFontSize) - castBar.timeText:SetTextColor(Gladdy.db.castBarFontColor.r, Gladdy.db.castBarFontColor.g, Gladdy.db.castBarFontColor.b, Gladdy.db.castBarFontColor.a) + castBar.timeText:SetTextColor(Gladdy:SetColor(Gladdy.db.castBarFontColor)) castBar.icon.texture.overlay:SetTexture(Gladdy.db.castBarIconStyle) - castBar.icon.texture.overlay:SetVertexColor(Gladdy.db.castBarIconColor.r, Gladdy.db.castBarIconColor.g, Gladdy.db.castBarIconColor.b, Gladdy.db.castBarIconColor.a) + castBar.icon.texture.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.castBarIconColor)) if (unit == "arena1") then Gladdy:CreateMover(castBar, "castBarXOffset", "castBarYOffset", L["Cast Bar"], {"TOPLEFT", "TOPLEFT"}, Gladdy.db.castBarWidth, Gladdy.db.castBarHeight, 0, 0) @@ -409,7 +409,7 @@ function Castbar:CAST_START(unit, spell, icon, value, maxValue, test) castBar.channeling = test == "channel" end - castBar.bar:SetStatusBarColor(Gladdy.db.castBarColor.r, Gladdy.db.castBarColor.g, Gladdy.db.castBarColor.b, Gladdy.db.castBarColor.a) + castBar.bar:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.castBarColor)) castBar.value = value castBar.maxValue = maxValue castBar.bar:SetMinMaxValues(0, maxValue) @@ -594,7 +594,7 @@ function Castbar:GetOptions() desc = L["Height of the bar"], order = 3, min = 0, - max = 50, + max = 100, step = 1, width = "full", }), diff --git a/Modules/Classicon.lua b/Modules/Classicon.lua index 01099a6..906954c 100644 --- a/Modules/Classicon.lua +++ b/Modules/Classicon.lua @@ -134,7 +134,7 @@ function Classicon:UpdateFrame(unit) classIcon.texture:SetAllPoints(classIcon) classIcon.texture.overlay:SetTexture(Gladdy.db.classIconBorderStyle) - classIcon.texture.overlay:SetVertexColor(Gladdy.db.classIconBorderColor.r, Gladdy.db.classIconBorderColor.g, Gladdy.db.classIconBorderColor.b, Gladdy.db.classIconBorderColor.a) + classIcon.texture.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.classIconBorderColor)) if Gladdy.db.classIconEnabled then classIcon:Show() else diff --git a/Modules/CombatIndicator.lua b/Modules/CombatIndicator.lua index 5647178..dc2a693 100644 --- a/Modules/CombatIndicator.lua +++ b/Modules/CombatIndicator.lua @@ -51,7 +51,7 @@ function CombatIndicator:CreateFrame(unit) ciFrame.border = ciFrame:CreateTexture(nil, "OVERLAY") ciFrame.border:SetAllPoints(ciFrame) ciFrame.border:SetTexture(Gladdy.db.ciBorderStyle) - ciFrame.border:SetVertexColor(Gladdy.db.ciBorderColor.r, Gladdy.db.ciBorderColor.g, Gladdy.db.ciBorderColor.b, Gladdy.db.ciBorderColor.a) + ciFrame.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.ciBorderColor)) self.frames[unit] = ciFrame button.ciFrame = ciFrame @@ -70,7 +70,7 @@ function CombatIndicator:UpdateFrame(unit) ciFrame:SetHeight(Gladdy.db.ciSize) ciFrame:SetWidth(Gladdy.db.ciSize * Gladdy.db.ciWidthFactor) ciFrame.border:SetTexture(Gladdy.db.ciBorderStyle) - ciFrame.border:SetVertexColor(Gladdy.db.ciBorderColor.r, Gladdy.db.ciBorderColor.g, Gladdy.db.ciBorderColor.b, Gladdy.db.ciBorderColor.a) + ciFrame.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.ciBorderColor)) Gladdy:SetPosition(ciFrame, unit, "ciXOffset", "ciYOffset", CombatIndicator:LegacySetPosition(ciFrame, unit), CombatIndicator) diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 268762d..b08fa83 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -125,11 +125,11 @@ function Cooldowns:CreateFrame(unit) icon.border = icon.cooldownFrame:CreateTexture(nil, "OVERLAY") icon.border:SetAllPoints(icon) icon.border:SetTexture(Gladdy.db.cooldownBorderStyle) - icon.border:SetVertexColor(Gladdy.db.cooldownBorderColor.r, Gladdy.db.cooldownBorderColor.g, Gladdy.db.cooldownBorderColor.b, Gladdy.db.cooldownBorderColor.a) + icon.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.cooldownBorderColor)) icon.cooldownFont = icon.cooldownFrame:CreateFontString(nil, "OVERLAY") icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 2 * Gladdy.db.cooldownFontScale, "OUTLINE") - icon.cooldownFont:SetTextColor(Gladdy.db.cooldownFontColor.r, Gladdy.db.cooldownFontColor.g, Gladdy.db.cooldownFontColor.b, Gladdy.db.cooldownFontColor.a) + icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor)) icon.cooldownFont:SetAllPoints(icon) spellCooldownFrame["icon" .. x] = icon @@ -169,7 +169,7 @@ function Cooldowns:UpdateFrame(unit) icon:SetHeight(Gladdy.db.cooldownSize) icon:SetWidth(Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor) icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 2 * Gladdy.db.cooldownFontScale, "OUTLINE") - icon.cooldownFont:SetTextColor(Gladdy.db.cooldownFontColor.r, Gladdy.db.cooldownFontColor.g, Gladdy.db.cooldownFontColor.b, Gladdy.db.cooldownFontColor.a) + icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor)) icon:ClearAllPoints() if (Gladdy.db.cooldownXGrowDirection == "LEFT") then if (j == 1) then @@ -217,10 +217,10 @@ function Cooldowns:UpdateFrame(unit) icon.cooldown:SetAlpha(Gladdy.db.cooldownCooldownAlpha) icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), (icon:GetWidth()/2 - 1) * Gladdy.db.cooldownFontScale, "OUTLINE") - icon.cooldownFont:SetTextColor(Gladdy.db.cooldownFontColor.r, Gladdy.db.cooldownFontColor.g, Gladdy.db.cooldownFontColor.b, Gladdy.db.cooldownFontColor.a) + icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor)) icon.border:SetTexture(Gladdy.db.cooldownBorderStyle) - icon.border:SetVertexColor(Gladdy.db.cooldownBorderColor.r, Gladdy.db.cooldownBorderColor.g, Gladdy.db.cooldownBorderColor.b, Gladdy.db.cooldownBorderColor.a) + icon.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.cooldownBorderColor)) icon:Hide() end button.spellCooldownFrame:Show() diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index 98af424..a83b2d9 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -56,11 +56,11 @@ local Diminishings = Gladdy:NewModule("Diminishings", nil, { local function getDiminishColor(dr) if dr == 0.5 then - return Gladdy.db.drHalfColor.r, Gladdy.db.drHalfColor.g, Gladdy.db.drHalfColor.b, Gladdy.db.drHalfColor.a + return Gladdy:SetColor(Gladdy.db.drHalfColor) elseif dr == 0.25 then - return Gladdy.db.drQuarterColor.r, Gladdy.db.drQuarterColor.g, Gladdy.db.drQuarterColor.b, Gladdy.db.drQuarterColor.a + return Gladdy:SetColor(Gladdy.db.drQuarterColor) else - return Gladdy.db.drNullColor.r, Gladdy.db.drNullColor.g, Gladdy.db.drNullColor.b, Gladdy.db.drNullColor.a + return Gladdy:SetColor(Gladdy.db.drNullColor) end end @@ -138,7 +138,7 @@ function Diminishings:CreateFrame(unit) icon.text = icon.cooldownFrame:CreateFontString(nil, "OVERLAY") icon.text:SetDrawLayer("OVERLAY") icon.text:SetFont(Gladdy:SMFetch("font", "drFont"), 10, "OUTLINE") - icon.text:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a) + icon.text:SetTextColor(Gladdy:SetColor(Gladdy.db.drFontColor)) icon.text:SetShadowOffset(1, -1) icon.text:SetShadowColor(0, 0, 0, 1) icon.text:SetJustifyH("CENTER") @@ -147,7 +147,7 @@ function Diminishings:CreateFrame(unit) icon.timeText = icon.cooldownFrame:CreateFontString(nil, "OVERLAY") icon.timeText:SetDrawLayer("OVERLAY") icon.timeText:SetFont(Gladdy:SMFetch("font", "drFont"), 10, "OUTLINE") - icon.timeText:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a) + icon.timeText:SetTextColor(Gladdy:SetColor(Gladdy.db.drFontColor)) icon.timeText:SetShadowOffset(1, -1) icon.timeText:SetShadowColor(0, 0, 0, 1) icon.timeText:SetJustifyH("CENTER") @@ -216,9 +216,9 @@ function Diminishings:UpdateFrame(unit) icon.cooldownFrame:SetFrameLevel(Gladdy.db.drFrameLevel + 2) icon.text:SetFont(Gladdy:SMFetch("font", "drFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drFontScale, "OUTLINE") - icon.text:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a) + icon.text:SetTextColor(Gladdy:SetColor(Gladdy.db.drFontColor)) icon.timeText:SetFont(Gladdy:SMFetch("font", "drFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drFontScale, "OUTLINE") - icon.timeText:SetTextColor(Gladdy.db.drFontColor.r, Gladdy.db.drFontColor.g, Gladdy.db.drFontColor.b, Gladdy.db.drFontColor.a) + icon.timeText:SetTextColor(Gladdy:SetColor(Gladdy.db.drFontColor)) icon.drLevelText:SetFont(Gladdy:SMFetch("font", "drLevelTextFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drLevelTextFontScale, "OUTLINE") @@ -235,7 +235,7 @@ function Diminishings:UpdateFrame(unit) if Gladdy.db.drBorderColorsEnabled then icon.border:SetVertexColor(getDiminishColor(icon.diminishing)) else - icon.border:SetVertexColor(Gladdy.db.drBorderColor.r, Gladdy.db.drBorderColor.g, Gladdy.db.drBorderColor.b, Gladdy.db.drBorderColor.a) + icon.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.drBorderColor)) end if Gladdy.db.drLevelTextEnabled then @@ -355,7 +355,7 @@ function Diminishings:AuraFade(unit, spellID) if Gladdy.db.drBorderColorsEnabled then lastIcon.border:SetVertexColor(getDiminishColor(lastIcon.diminishing)) else - lastIcon.border:SetVertexColor(Gladdy.db.drBorderColor.r, Gladdy.db.drBorderColor.g, Gladdy.db.drBorderColor.b, Gladdy.db.drBorderColor.a) + lastIcon.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.drBorderColor)) end lastIcon.cooldown:SetCooldown(GetTime(), Gladdy.db.drDuration) if Gladdy.db.drCategories[drCat].forceIcon then diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index 78132cf..4d88014 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -43,7 +43,7 @@ function Healthbar:CreateFrame(unit) healthBar:EnableMouse(false) healthBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "healthBarBorderStyle"), edgeSize = Gladdy.db.healthBarBorderSize }) - healthBar:SetBackdropBorderColor(Gladdy.db.healthBarBorderColor.r, Gladdy.db.healthBarBorderColor.g, Gladdy.db.healthBarBorderColor.b, Gladdy.db.healthBarBorderColor.a) + healthBar:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.healthBarBorderColor)) healthBar:SetFrameStrata(Gladdy.db.healthFrameStrata) healthBar:SetFrameLevel(Gladdy.db.healthFrameLevel) @@ -58,7 +58,7 @@ function Healthbar:CreateFrame(unit) healthBar.bg:ClearAllPoints() healthBar.bg:SetAllPoints(healthBar.hp) healthBar.bg:SetAlpha(1) - healthBar.bg:SetVertexColor(Gladdy.db.healthBarBgColor.r, Gladdy.db.healthBarBgColor.g, Gladdy.db.healthBarBgColor.b, Gladdy.db.healthBarBgColor.a) + healthBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.healthBarBgColor)) healthBar.nameText = healthBar:CreateFontString(nil, "LOW", "GameFontNormalSmall") if (Gladdy.db.healthBarNameFontSize < 1) then @@ -68,7 +68,7 @@ function Healthbar:CreateFrame(unit) healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarNameFontSize) healthBar.nameText:Show() end - healthBar.nameText:SetTextColor(Gladdy.db.healthBarFontColor.r, Gladdy.db.healthBarFontColor.g, Gladdy.db.healthBarFontColor.b, Gladdy.db.healthBarFontColor.a) + healthBar.nameText:SetTextColor(Gladdy:SetColor(Gladdy.db.healthBarFontColor)) healthBar.nameText:SetShadowOffset(1, -1) healthBar.nameText:SetShadowColor(0, 0, 0, 1) healthBar.nameText:SetJustifyH("CENTER") @@ -82,7 +82,7 @@ function Healthbar:CreateFrame(unit) healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarHealthFontSize) healthBar.healthText:Hide() end - healthBar.healthText:SetTextColor(Gladdy.db.healthBarFontColor.r, Gladdy.db.healthBarFontColor.g, Gladdy.db.healthBarFontColor.b, Gladdy.db.healthBarFontColor.a) + healthBar.healthText:SetTextColor(Gladdy:SetColor(Gladdy.db.healthBarFontColor)) healthBar.healthText:SetShadowOffset(1, -1) healthBar.healthText:SetShadowColor(0, 0, 0, 1) healthBar.healthText:SetJustifyH("CENTER") @@ -160,11 +160,11 @@ function Healthbar:UpdateFrame(unit) healthBar.hp:SetFrameLevel(Gladdy.db.healthFrameLevel - 1) healthBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "healthBarTexture")) - healthBar.bg:SetVertexColor(Gladdy.db.healthBarBgColor.r, Gladdy.db.healthBarBgColor.g, Gladdy.db.healthBarBgColor.b, Gladdy.db.healthBarBgColor.a) + healthBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.healthBarBgColor)) healthBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "healthBarBorderStyle"), edgeSize = Gladdy.db.healthBarBorderSize }) - healthBar:SetBackdropBorderColor(Gladdy.db.healthBarBorderColor.r, Gladdy.db.healthBarBorderColor.g, Gladdy.db.healthBarBorderColor.b, Gladdy.db.healthBarBorderColor.a) + healthBar:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.healthBarBorderColor)) healthBar:ClearAllPoints() healthBar:SetPoint("TOPLEFT", Gladdy.buttons[unit], "TOPLEFT", 0, 0) healthBar:SetPoint("BOTTOMRIGHT", Gladdy.buttons[unit], "BOTTOMRIGHT") @@ -192,8 +192,8 @@ function Healthbar:UpdateFrame(unit) healthBar.nameText:Hide() end end - healthBar.nameText:SetTextColor(Gladdy.db.healthBarFontColor.r, Gladdy.db.healthBarFontColor.g, Gladdy.db.healthBarFontColor.b, Gladdy.db.healthBarFontColor.a) - healthBar.healthText:SetTextColor(Gladdy.db.healthBarFontColor.r, Gladdy.db.healthBarFontColor.g, Gladdy.db.healthBarFontColor.b, Gladdy.db.healthBarFontColor.a) + healthBar.nameText:SetTextColor(Gladdy:SetColor(Gladdy.db.healthBarFontColor)) + healthBar.healthText:SetTextColor(Gladdy:SetColor(Gladdy.db.healthBarFontColor)) end function Healthbar:ResetUnit(unit) diff --git a/Modules/Highlight.lua b/Modules/Highlight.lua index 0240caa..7430444 100644 --- a/Modules/Highlight.lua +++ b/Modules/Highlight.lua @@ -119,7 +119,7 @@ function Highlight:UpdateFrame(unit) end button.targetBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = borderSize }) - button.targetBorder:SetBackdropBorderColor(Gladdy.db.targetBorderColor.r, Gladdy.db.targetBorderColor.g, Gladdy.db.targetBorderColor.b, Gladdy.db.targetBorderColor.a) + button.targetBorder:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.targetBorderColor)) button.focusBorder:SetWidth(width) button.focusBorder:SetHeight(height) @@ -132,7 +132,7 @@ function Highlight:UpdateFrame(unit) end button.focusBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = borderSize }) - button.focusBorder:SetBackdropBorderColor(Gladdy.db.focusBorderColor.r, Gladdy.db.focusBorderColor.g, Gladdy.db.focusBorderColor.b, Gladdy.db.focusBorderColor.a) + button.focusBorder:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.focusBorderColor)) button.leaderBorder:SetWidth(width) button.leaderBorder:SetHeight(height) @@ -145,7 +145,7 @@ function Highlight:UpdateFrame(unit) end button.leaderBorder:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = borderSize }) - button.leaderBorder:SetBackdropBorderColor(Gladdy.db.leaderBorderColor.r, Gladdy.db.leaderBorderColor.g, Gladdy.db.leaderBorderColor.b, Gladdy.db.leaderBorderColor.a) + button.leaderBorder:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.leaderBorderColor)) if Gladdy.frame.testing then Highlight:Test(unit) end diff --git a/Modules/Pets.lua b/Modules/Pets.lua index fdd33b0..fc703b0 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -70,7 +70,7 @@ function Pets:PET_SPOTTED(unit) Gladdy.guids[UnitGUID(unit)] = unit if Gladdy.db.petEnabled then self.frames[unit].healthBar:SetAlpha(1) - self.frames[unit].healthBar.hp:SetStatusBarColor(Gladdy.db.petHealthBarColor.r, Gladdy.db.petHealthBarColor.g, Gladdy.db.petHealthBarColor.b, Gladdy.db.petHealthBarColor.a) + self.frames[unit].healthBar.hp:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.petHealthBarColor)) self.frames[unit].healthBar:SetScript("OnUpdate", function(self) self.hp:SetValue(UnitHealth(self.unit)) Pets:SetHealthText(self, UnitHealth(unit), UnitHealthMax(unit)) @@ -157,7 +157,7 @@ function Pets:CreateFrame(unitId) local healthBar = CreateFrame("Frame", nil, button, BackdropTemplateMixin and "BackdropTemplate") healthBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "petHealthBarBorderStyle"), edgeSize = Gladdy.db.petHealthBarBorderSize }) - healthBar:SetBackdropBorderColor(Gladdy.db.petHealthBarBorderColor.r, Gladdy.db.petHealthBarBorderColor.g, Gladdy.db.petHealthBarBorderColor.b, Gladdy.db.petHealthBarBorderColor.a) + healthBar:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.petHealthBarBorderColor)) healthBar:SetFrameStrata(Gladdy.db.petFrameStrata) healthBar:SetFrameLevel(Gladdy.db.petFrameLevel) healthBar:SetAllPoints(button) @@ -170,12 +170,12 @@ function Pets:CreateFrame(unitId) healthBar.portrait.border = healthBar:CreateTexture(nil, "OVERLAY") healthBar.portrait.border:SetAllPoints(healthBar.portrait) healthBar.portrait.border:SetTexture(Gladdy.db.classIconBorderStyle) - healthBar.portrait.border:SetVertexColor(Gladdy.db.petHealthBarBorderColor.r, Gladdy.db.petHealthBarBorderColor.g, Gladdy.db.petHealthBarBorderColor.b, Gladdy.db.petHealthBarBorderColor.a) + healthBar.portrait.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.petHealthBarBorderColor)) healthBar.hp = CreateFrame("StatusBar", nil, healthBar) healthBar.hp:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "petHealthBarTexture")) - healthBar.hp:SetStatusBarColor(Gladdy.db.petHealthBarColor.r, Gladdy.db.petHealthBarColor.g, Gladdy.db.petHealthBarColor.b, Gladdy.db.petHealthBarColor.a) + healthBar.hp:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.petHealthBarColor)) healthBar.hp:SetMinMaxValues(0, 100) healthBar.hp:SetFrameStrata(Gladdy.db.petFrameStrata) healthBar.hp:SetFrameLevel(Gladdy.db.petFrameLevel - 1) @@ -186,7 +186,7 @@ function Pets:CreateFrame(unitId) healthBar.bg:ClearAllPoints() healthBar.bg:SetAllPoints(healthBar.hp) healthBar.bg:SetAlpha(1) - healthBar.bg:SetVertexColor(Gladdy.db.petHealthBarBgColor.r, Gladdy.db.petHealthBarBgColor.g, Gladdy.db.petHealthBarBgColor.b, Gladdy.db.petHealthBarBgColor.a) + healthBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.petHealthBarBgColor)) healthBar.nameText = healthBar:CreateFontString(nil, "LOW", "GameFontNormalSmall") if (Gladdy.db.petHealthBarFontSize < 1) then @@ -196,7 +196,7 @@ function Pets:CreateFrame(unitId) healthBar.nameText:SetFont(Gladdy:SMFetch("font", "petHealthBarFont"), Gladdy.db.petHealthBarFontSize) healthBar.nameText:Show() end - healthBar.nameText:SetTextColor(Gladdy.db.petHealthBarFontColor.r, Gladdy.db.petHealthBarFontColor.g, Gladdy.db.petHealthBarFontColor.b, Gladdy.db.petHealthBarFontColor.a) + healthBar.nameText:SetTextColor(Gladdy:SetColor(Gladdy.db.petHealthBarFontColor)) healthBar.nameText:SetShadowOffset(1, -1) healthBar.nameText:SetShadowColor(0, 0, 0, 1) healthBar.nameText:SetJustifyH("CENTER") @@ -210,7 +210,7 @@ function Pets:CreateFrame(unitId) healthBar.healthText:SetFont(Gladdy:SMFetch("font", "petHealthBarFont"), Gladdy.db.petHealthBarFontSize) healthBar.healthText:Hide() end - healthBar.healthText:SetTextColor(Gladdy.db.petHealthBarFontColor.r, Gladdy.db.petHealthBarFontColor.g, Gladdy.db.petHealthBarFontColor.b, Gladdy.db.petHealthBarFontColor.a) + healthBar.healthText:SetTextColor(Gladdy:SetColor(Gladdy.db.petHealthBarFontColor)) healthBar.healthText:SetShadowOffset(1, -1) healthBar.healthText:SetShadowColor(0, 0, 0, 1) healthBar.healthText:SetJustifyH("CENTER") @@ -289,17 +289,17 @@ function Pets:UpdateFrame(unitId) healthBar.portrait.border:Show() end healthBar.portrait.border:SetTexture(Gladdy.db.petPortraitBorderStyle) - healthBar.portrait.border:SetVertexColor(Gladdy.db.petHealthBarBorderColor.r, Gladdy.db.petHealthBarBorderColor.g, Gladdy.db.petHealthBarBorderColor.b, Gladdy.db.petHealthBarBorderColor.a) + healthBar.portrait.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.petHealthBarBorderColor)) healthBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "petHealthBarTexture")) - healthBar.bg:SetVertexColor(Gladdy.db.petHealthBarBgColor.r, Gladdy.db.petHealthBarBgColor.g, Gladdy.db.petHealthBarBgColor.b, Gladdy.db.petHealthBarBgColor.a) + healthBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.petHealthBarBgColor)) healthBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "petHealthBarBorderStyle"), edgeSize = Gladdy.db.petHealthBarBorderSize }) - healthBar:SetBackdropBorderColor(Gladdy.db.petHealthBarBorderColor.r, Gladdy.db.petHealthBarBorderColor.g, Gladdy.db.petHealthBarBorderColor.b, Gladdy.db.petHealthBarBorderColor.a) + healthBar:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.petHealthBarBorderColor)) healthBar.hp:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "petHealthBarTexture")) - healthBar.hp:SetStatusBarColor(Gladdy.db.petHealthBarColor.r, Gladdy.db.petHealthBarColor.g, Gladdy.db.petHealthBarColor.b, Gladdy.db.petHealthBarColor.a) + healthBar.hp:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.petHealthBarColor)) healthBar.hp:ClearAllPoints() healthBar.hp:SetPoint("TOPLEFT", healthBar, "TOPLEFT", (Gladdy.db.petHealthBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.petHealthBarBorderSize/Gladdy.db.statusbarBorderOffset)) healthBar.hp:SetPoint("BOTTOMRIGHT", healthBar, "BOTTOMRIGHT", -(Gladdy.db.petHealthBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.petHealthBarBorderSize/Gladdy.db.statusbarBorderOffset)) @@ -315,8 +315,8 @@ function Pets:UpdateFrame(unitId) healthBar.healthText:SetFont(Gladdy:SMFetch("font", "petHealthBarFont"), Gladdy.db.petHealthBarFontSize) healthBar.healthText:Show() end - healthBar.nameText:SetTextColor(Gladdy.db.petHealthBarFontColor.r, Gladdy.db.petHealthBarFontColor.g, Gladdy.db.petHealthBarFontColor.b, Gladdy.db.petHealthBarFontColor.a) - healthBar.healthText:SetTextColor(Gladdy.db.petHealthBarFontColor.r, Gladdy.db.petHealthBarFontColor.g, Gladdy.db.petHealthBarFontColor.b, Gladdy.db.petHealthBarFontColor.a) + healthBar.nameText:SetTextColor(Gladdy:SetColor(Gladdy.db.petHealthBarFontColor)) + healthBar.healthText:SetTextColor(Gladdy:SetColor(Gladdy.db.petHealthBarFontColor)) if (unit == "arenapet1") then Gladdy:CreateMover(self.frames[unit], "petXOffset", "petYOffset", L["Pets"], {"TOPLEFT", "TOPLEFT"}) end diff --git a/Modules/Powerbar.lua b/Modules/Powerbar.lua index af76f5c..4e99810 100644 --- a/Modules/Powerbar.lua +++ b/Modules/Powerbar.lua @@ -42,7 +42,7 @@ function Powerbar:CreateFrame(unit) powerBar:EnableMouse(false) powerBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "powerBarBorderStyle"), edgeSize = Gladdy.db.powerBarBorderSize }) - powerBar:SetBackdropBorderColor(Gladdy.db.powerBarBorderColor.r, Gladdy.db.powerBarBorderColor.g, Gladdy.db.powerBarBorderColor.b, Gladdy.db.powerBarBorderColor.a) + powerBar:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.powerBarBorderColor)) powerBar:SetFrameStrata(Gladdy.db.powerFrameStrata) powerBar:SetFrameLevel(Gladdy.db.powerFrameLevel) @@ -56,11 +56,11 @@ function Powerbar:CreateFrame(unit) powerBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "powerBarTexture")) powerBar.bg:ClearAllPoints() powerBar.bg:SetAllPoints(powerBar.energy) - powerBar.bg:SetVertexColor(Gladdy.db.powerBarBgColor.r, Gladdy.db.powerBarBgColor.g, Gladdy.db.powerBarBgColor.b, Gladdy.db.powerBarBgColor.a) + powerBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.powerBarBgColor)) powerBar.raceText = powerBar:CreateFontString(nil, "LOW") powerBar.raceText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize) - powerBar.raceText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a) + powerBar.raceText:SetTextColor(Gladdy:SetColor(Gladdy.db.powerBarFontColor)) powerBar.raceText:SetShadowOffset(1, -1) powerBar.raceText:SetShadowColor(0, 0, 0, 1) powerBar.raceText:SetJustifyH("CENTER") @@ -68,7 +68,7 @@ function Powerbar:CreateFrame(unit) powerBar.powerText = powerBar:CreateFontString(nil, "LOW") powerBar.powerText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize) - powerBar.powerText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a) + powerBar.powerText:SetTextColor(Gladdy:SetColor(Gladdy.db.powerBarFontColor)) powerBar.powerText:SetShadowOffset(1, -1) powerBar.powerText:SetShadowColor(0, 0, 0, 1) powerBar.powerText:SetJustifyH("CENTER") @@ -152,7 +152,7 @@ function Powerbar:UpdateFrame(unit) powerBar:Show() end powerBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "powerBarTexture")) - powerBar.bg:SetVertexColor(Gladdy.db.powerBarBgColor.r, Gladdy.db.powerBarBgColor.g, Gladdy.db.powerBarBgColor.b, Gladdy.db.powerBarBgColor.a) + powerBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.powerBarBgColor)) powerBar:SetWidth(healthBar:GetWidth()) powerBar:SetHeight(Gladdy.db.powerBarHeight) @@ -162,7 +162,7 @@ function Powerbar:UpdateFrame(unit) powerBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "powerBarBorderStyle"), edgeSize = Gladdy.db.powerBarBorderSize }) - powerBar:SetBackdropBorderColor(Gladdy.db.powerBarBorderColor.r, Gladdy.db.powerBarBorderColor.g, Gladdy.db.powerBarBorderColor.b, Gladdy.db.powerBarBorderColor.a) + powerBar:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.powerBarBorderColor)) powerBar.energy:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "powerBarTexture")) powerBar.energy:ClearAllPoints() @@ -170,9 +170,9 @@ function Powerbar:UpdateFrame(unit) powerBar.energy:SetPoint("BOTTOMRIGHT", powerBar, "BOTTOMRIGHT", -(Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset)) powerBar.raceText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize) - powerBar.raceText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a) + powerBar.raceText:SetTextColor(Gladdy:SetColor(Gladdy.db.powerBarFontColor)) powerBar.powerText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize) - powerBar.powerText:SetTextColor(Gladdy.db.powerBarFontColor.r, Gladdy.db.powerBarFontColor.g, Gladdy.db.powerBarFontColor.b, Gladdy.db.powerBarFontColor.a) + powerBar.powerText:SetTextColor(Gladdy:SetColor(Gladdy.db.powerBarFontColor)) powerBar:SetFrameStrata(Gladdy.db.powerFrameStrata) powerBar:SetFrameLevel(Gladdy.db.powerFrameLevel) diff --git a/Modules/Racial.lua b/Modules/Racial.lua index 717e4d5..533aa6b 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -137,7 +137,7 @@ function Racial:UpdateFrame(unit) racial.texture:SetAllPoints(racial) racial.texture.overlay:SetTexture(Gladdy.db.racialBorderStyle) - racial.texture.overlay:SetVertexColor(Gladdy.db.racialBorderColor.r, Gladdy.db.racialBorderColor.g, Gladdy.db.racialBorderColor.b, Gladdy.db.racialBorderColor.a) + racial.texture.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.racialBorderColor)) Gladdy:SetPosition(racial, unit, "racialXOffset", "racialYOffset", Racial:LegacySetPosition(racial, unit), Racial) -- 2.39.5 From b22756b6ab0c9766616e50ed800d5151d94b55c2 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 23:09:01 +0100 Subject: [PATCH 063/227] readme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ce7c701..33dcec8 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,8 @@ Thank you for the great feedback and active contribution. - reset timer when buff was taken - add a configurable 2nd timer or show one timer with the closest CD - **CastBar Icon can be enabled/disabled** -- **Trinket: green/red option added** +- **Trinket solid color option added** + - color for Trinket on/off CD can bi configured (red/green by default) - **fixed some DR-categories** (Hibernate / Chastice / Dragonsbreath / ImpConcussiveShot / Counterattack) - **Pixel Perfect option added** (makes your Gladdy Frames pixel perfect - no more wierd scaling interferences) - **Pets can be grouped** (not perfect yet, but a first step) -- 2.39.5 From 83763aa0165b4c3b91cf05c3c0aa3b4aa075bb82 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Wed, 12 Jan 2022 23:17:35 +0100 Subject: [PATCH 064/227] fix colored trinket option toggle --- Modules/Trinket.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index a21ab5e..99af23c 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -134,7 +134,7 @@ function Trinket:UpdateFrame(unit) end trinket.texture:SetTexture() else - trinket:SetBackdropColor(Gladdy:SetColor(Gladdy.db.trinketColoredNoCd)) + trinket:SetBackdropColor(0,0,0,0) trinket.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02") end -- 2.39.5 From 0d9e9735daf3d7e68fdfc0461227780c4922766f Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 13 Jan 2022 23:11:06 +0100 Subject: [PATCH 065/227] add unregister messages to gladdy messages --- Gladdy.lua | 10 ++++++++++ Modules/Announcements.lua | 1 + 2 files changed, 11 insertions(+) diff --git a/Gladdy.lua b/Gladdy.lua index 416ba57..eb14d39 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -191,6 +191,16 @@ function Gladdy:NewModule(name, priority, defaults) self.messages[message] = func or message end + module.UnregisterMessage = function(self, message) + self.messages[message] = nil + end + + module.UnregisterAllMessages = function(self) + for msg,_ in pairs(self.messages) do + self.messages[msg] = nil + end + end + module.GetOptions = function() return nil end diff --git a/Modules/Announcements.lua b/Modules/Announcements.lua index 3c8b376..27de5f1 100644 --- a/Modules/Announcements.lua +++ b/Modules/Announcements.lua @@ -53,6 +53,7 @@ function Announcements:Initialize() end function Announcements:Reset() + self:UnregisterAllMessages() self.enemy = {} self.throttled = {} end -- 2.39.5 From 9dbab9939f2734d5b386eca9bf10b561ff9e88aa Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 13 Jan 2022 23:11:33 +0100 Subject: [PATCH 066/227] mover disabled on module disabled --- Frame.lua | 6 +- Modules/BuffsDebuffs.lua | 8 +- Modules/Castbar.lua | 9 +- Modules/Classicon.lua | 2 +- Modules/CombatIndicator.lua | 5 +- Modules/Cooldowns.lua | 2 +- Modules/Diminishings.lua | 315 +++++++++++++++++++++--------------- Modules/Racial.lua | 3 +- Modules/Trinket.lua | 2 +- 9 files changed, 211 insertions(+), 141 deletions(-) diff --git a/Frame.lua b/Frame.lua index 79a1354..c4e2d41 100644 --- a/Frame.lua +++ b/Frame.lua @@ -448,7 +448,11 @@ function Gladdy:CreateMover(frame, xConfig, yConfig, name, points, width, height frame.mover:SetWidth(width or frame:GetWidth()) end if self.frame and self.frame.testing and self.db.showMover then - frame.mover:Show() + if (activated ~= nil and not Gladdy.db[activated]) then + frame.mover:Hide() + else + frame.mover:Show() + end else frame.mover:Hide() end diff --git a/Modules/BuffsDebuffs.lua b/Modules/BuffsDebuffs.lua index d1575a9..45a960a 100644 --- a/Modules/BuffsDebuffs.lua +++ b/Modules/BuffsDebuffs.lua @@ -297,8 +297,8 @@ function BuffsDebuffs:UpdateFrame(unit) if (unit == "arena1") then Gladdy:CreateMover(self.frames[unit].debuffFrame, "buffsXOffset", "buffsYOffset", L["Debuffs"], {"TOPRIGHT", "TOPRIGHT"}, - Gladdy.db.buffsIconSize * Gladdy.db.buffsWidthFactor, - Gladdy.db.buffsIconSize, 0, 0) + Gladdy.db.buffsIconSize * Gladdy.db.buffsWidthFactor, Gladdy.db.buffsIconSize, + 0, 0, "buffsEnabled") if not Gladdy.db.buffsEnabled then self.frames[unit].debuffFrame.mover:Hide() end @@ -310,8 +310,8 @@ function BuffsDebuffs:UpdateFrame(unit) if (unit == "arena1") then Gladdy:CreateMover(self.frames[unit].buffFrame, "buffsBuffsXOffset", "buffsBuffsYOffset", L["Buffs"], {"TOPRIGHT", "TOPRIGHT"}, - Gladdy.db.buffsBuffsIconSize * Gladdy.db.buffsBuffsWidthFactor, - Gladdy.db.buffsBuffsIconSize, 0, 0) + Gladdy.db.buffsBuffsIconSize * Gladdy.db.buffsBuffsWidthFactor, Gladdy.db.buffsBuffsIconSize, + 0, 0, "buffsEnabled") if not Gladdy.db.buffsEnabled then self.frames[unit].buffFrame.mover:Hide() end diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 644bfcd..7302b1d 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -202,7 +202,12 @@ function Castbar:UpdateFrame(unit) castBar.icon.texture.overlay:SetVertexColor(Gladdy:SetColor(Gladdy.db.castBarIconColor)) if (unit == "arena1") then - Gladdy:CreateMover(castBar, "castBarXOffset", "castBarYOffset", L["Cast Bar"], {"TOPLEFT", "TOPLEFT"}, Gladdy.db.castBarWidth, Gladdy.db.castBarHeight, 0, 0) + Gladdy:CreateMover(castBar, "castBarXOffset", "castBarYOffset", L["Cast Bar"], + {"TOPLEFT", "TOPLEFT"}, Gladdy.db.castBarWidth, Gladdy.db.castBarHeight, + 0, 0, "castBarEnabled") + end + if not Gladdy.db.castBarEnabled then + self:CAST_STOP(unit) end end @@ -414,6 +419,7 @@ function Castbar:CAST_START(unit, spell, icon, value, maxValue, test) castBar.maxValue = maxValue castBar.bar:SetMinMaxValues(0, maxValue) castBar.bar:SetValue(value) + castBar.icon:SetAlpha(1) castBar.icon.texture:SetTexture(icon) castBar.spellText:SetText(spell) castBar.timeText:SetText(maxValue) @@ -440,6 +446,7 @@ function Castbar:CAST_STOP(unit, ...) castBar.channeling = nil castBar.value = 0 castBar.maxValue = 0 + castBar.icon:SetAlpha(0) castBar.icon.texture:SetTexture("") castBar.spellText:SetText("") castBar.timeText:SetText("") diff --git a/Modules/Classicon.lua b/Modules/Classicon.lua index 906954c..c419ab8 100644 --- a/Modules/Classicon.lua +++ b/Modules/Classicon.lua @@ -127,7 +127,7 @@ function Classicon:UpdateFrame(unit) Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor, Gladdy.db.classIconSize, 0, - 0) + 0, "classIconEnabled") end classIcon.texture:ClearAllPoints() diff --git a/Modules/CombatIndicator.lua b/Modules/CombatIndicator.lua index dc2a693..4ac51ee 100644 --- a/Modules/CombatIndicator.lua +++ b/Modules/CombatIndicator.lua @@ -82,7 +82,10 @@ function CombatIndicator:UpdateFrame(unit) ciFrame:Show() end if (unit == "arena1") then - Gladdy:CreateMover(ciFrame, "ciXOffset", "ciYOffset", L["Combat Indicator"], {"TOPLEFT", "TOPLEFT"}) + Gladdy:CreateMover(ciFrame, "ciXOffset", "ciYOffset", L["Combat Indicator"], + {"TOPLEFT", "TOPLEFT"}, + Gladdy.db.ciSize * Gladdy.db.ciWidthFactor, Gladdy.db.ciSize, + 0, 0, "ciEnabled") end end diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index b08fa83..8c695af 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -152,7 +152,7 @@ function Cooldowns:UpdateFrame(unit) if (unit == "arena1") then Gladdy:CreateMover(button.spellCooldownFrame,"cooldownXOffset", "cooldownYOffset", L["Cooldown"], {"TOPLEFT", "TOPLEFT"}, - Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor, Gladdy.db.cooldownSize) + Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor, Gladdy.db.cooldownSize, 0, 0, "cooldown") end -- Update each cooldown icon local o = 1 diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index a83b2d9..a9836bd 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -28,6 +28,7 @@ local function defaultCategories() end local Diminishings = Gladdy:NewModule("Diminishings", nil, { drFont = "DorisPP", + drFontColorsEnabled = false, drFontColor = { r = 1, g = 1, b = 0, a = 1 }, drFontScale = 1, drGrowDirection = "RIGHT", @@ -46,7 +47,9 @@ local Diminishings = Gladdy:NewModule("Diminishings", nil, { drNullColor = {r = 1, g = 0, b = 0, a = 1 }, drLevelTextEnabled = true, drLevelTextFont = "DorisPP", - drLevelTextFontScale = 0.8, + drLevelTextScale = 0.8, + drLevelTextColor = { r = 1, g = 1, b = 0, a = 1 }, + drLevelTextColorsEnabled = true, drWidthFactor = 1, drCategories = defaultCategories(), drDuration = 18, @@ -106,12 +109,12 @@ function Diminishings:CreateFrame(unit) self.dr = nil self.diminishing = 1.0 self.texture:SetTexture("") - self.text:SetText("") + self.timeText:SetText("") self:Hide() Diminishings:Positionate(unit) else self.timeLeft = self.timeLeft - elapsed - Gladdy:FormatTimer(self.text, self.timeLeft, self.timeLeft < 5) + Gladdy:FormatTimer(self.timeText, self.timeLeft, self.timeLeft < 5) end end end) @@ -135,15 +138,6 @@ function Diminishings:CreateFrame(unit) icon.border:SetTexture("Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp") icon.border:SetAllPoints(icon) - icon.text = icon.cooldownFrame:CreateFontString(nil, "OVERLAY") - icon.text:SetDrawLayer("OVERLAY") - icon.text:SetFont(Gladdy:SMFetch("font", "drFont"), 10, "OUTLINE") - icon.text:SetTextColor(Gladdy:SetColor(Gladdy.db.drFontColor)) - icon.text:SetShadowOffset(1, -1) - icon.text:SetShadowColor(0, 0, 0, 1) - icon.text:SetJustifyH("CENTER") - icon.text:SetPoint("CENTER") - icon.timeText = icon.cooldownFrame:CreateFontString(nil, "OVERLAY") icon.timeText:SetDrawLayer("OVERLAY") icon.timeText:SetFont(Gladdy:SMFetch("font", "drFont"), 10, "OUTLINE") @@ -199,7 +193,7 @@ function Diminishings:UpdateFrame(unit) Gladdy.db.drIconSize * Gladdy.db.drWidthFactor, Gladdy.db.drIconSize, 0, - 0) + 0, "drEnabled") end for i = 1, 16 do @@ -215,12 +209,19 @@ function Diminishings:UpdateFrame(unit) icon.cooldownFrame:SetFrameStrata(Gladdy.db.drFrameStrata) icon.cooldownFrame:SetFrameLevel(Gladdy.db.drFrameLevel + 2) - icon.text:SetFont(Gladdy:SMFetch("font", "drFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drFontScale, "OUTLINE") - icon.text:SetTextColor(Gladdy:SetColor(Gladdy.db.drFontColor)) icon.timeText:SetFont(Gladdy:SMFetch("font", "drFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drFontScale, "OUTLINE") - icon.timeText:SetTextColor(Gladdy:SetColor(Gladdy.db.drFontColor)) + if Gladdy.db.drFontColorsEnabled then + icon.timeText:SetTextColor(getDiminishColor(icon.diminishing)) + else + icon.timeText:SetTextColor(Gladdy:SetColor(Gladdy.db.drFontColor)) + end - icon.drLevelText:SetFont(Gladdy:SMFetch("font", "drLevelTextFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drLevelTextFontScale, "OUTLINE") + icon.drLevelText:SetFont(Gladdy:SMFetch("font", "drLevelTextFont"), (Gladdy.db.drIconSize/2 - 1) * Gladdy.db.drLevelTextScale, "OUTLINE") + if Gladdy.db.drLevelTextColorsEnabled then + icon.drLevelText:SetTextColor(getDiminishColor(icon.diminishing)) + else + icon.drLevelText:SetTextColor(Gladdy:SetColor(Gladdy.db.drLevelTextColor)) + end icon.cooldown:SetWidth(icon:GetWidth() - icon:GetWidth()/16) icon.cooldown:SetHeight(icon:GetHeight() - icon:GetHeight()/16) @@ -284,7 +285,6 @@ function Diminishings:ResetUnit(unit) icon.active = false icon.timeLeft = 0 icon.texture:SetTexture("") - icon.text:SetText("") icon.timeText:SetText("") icon:Hide() end @@ -363,11 +363,23 @@ function Diminishings:AuraFade(unit, spellID) else lastIcon.texture:SetTexture(select(3, GetSpellInfo(spellID))) end + + if Gladdy.db.drFontColorsEnabled then + lastIcon.timeText:SetTextColor(getDiminishColor(lastIcon.diminishing)) + else + lastIcon.timeText:SetTextColor(Gladdy:SetColor(Gladdy.db.drFontColor)) + end + + lastIcon.drLevelText:SetText(getDiminishText(lastIcon.diminishing)) + if Gladdy.db.drLevelTextColorsEnabled then + lastIcon.drLevelText:SetTextColor(getDiminishColor(lastIcon.diminishing)) + else + lastIcon.drLevelText:SetTextColor(Gladdy:SetColor(Gladdy.db.drLevelTextColor)) + end + lastIcon.active = true self:Positionate(unit) lastIcon:Show() - lastIcon.drLevelText:SetText(getDiminishText(lastIcon.diminishing)) - lastIcon.drLevelText:SetTextColor(getDiminishColor(lastIcon.diminishing)) end function Diminishings:Positionate(unit) @@ -519,34 +531,42 @@ function Diminishings:GetOptions() }, font = { type = "group", - name = L["Font"], + name = L["Cooldown Font"], order = 3, args = { headerFont = { type = "header", - name = L["Font"], - order = 10, + name = L["Cooldown Font"], + order = 1, }, - drFont = Gladdy:option({ - type = "select", - name = L["Font"], - desc = L["Font of the cooldown"], - order = 11, - dialogControl = "LSM30_Font", - values = AceGUIWidgetLSMlists.font, + drFontColorsEnabled = Gladdy:option({ + type = "toggle", + name = L["Enable DR Colors as Font Color"], + desc = L["Shows the current DR Level on the DR icon."], + order = 2, + width = "full", }), drFontColor = Gladdy:colorOption({ type = "color", name = L["Font color"], desc = L["Color of the text"], - order = 13, + order = 3, hasAlpha = true, + width = "full", + }), + drFont = Gladdy:option({ + type = "select", + name = L["Font"], + desc = L["Font of the cooldown"], + order = 4, + dialogControl = "LSM30_Font", + values = AceGUIWidgetLSMlists.font, }), drFontScale = Gladdy:option({ type = "range", name = L["Font scale"], desc = L["Scale of the text"], - order = 12, + order = 5, min = 0.1, max = 2, step = 0.1, @@ -554,10 +574,142 @@ function Diminishings:GetOptions() }), } }, + levelText = { + type = "group", + name = L["DR Font"], + order = 4, + args = { + headerBorder = { + type = "header", + name = L["DR Font"], + order = 1, + }, + drLevelTextEnabled = Gladdy:option({ + type = "toggle", + name = L["Enable DR Font"], + desc = L["Shows the current DR Level on the DR icon."], + order = 2, + width = "full", + }), + drLevelTextColorsEnabled = Gladdy:option({ + type = "toggle", + name = L["Enable DR Colors as Font Color"], + desc = L["Shows the current DR Level on the DR icon."], + order = 3, + width = "full", + disabled = function() + return not Gladdy.db.drLevelTextEnabled + end, + }), + drLevelTextColor = Gladdy:colorOption({ + type = "color", + name = L["DR Font color"], + desc = L["Color of the font"], + order = 4, + hasAlpha = true, + disabled = function() + return not Gladdy.db.drLevelTextEnabled + end, + }), + drLevelTextFont = Gladdy:option({ + type = "select", + name = L["Font"], + desc = L["Font of the DR Font"], + order = 5, + dialogControl = "LSM30_Font", + values = AceGUIWidgetLSMlists.font, + width = "full", + disabled = function() + return not Gladdy.db.drLevelTextEnabled + end, + }), + drLevelTextScale = Gladdy:option({ + type = "range", + name = L["Font scale"], + desc = L["Scale of the text"], + order = 6, + min = 0.1, + max = 2, + step = 0.1, + width = "full", + disabled = function() + return not Gladdy.db.drLevelTextEnabled + end, + }), + }, + }, + border = { + type = "group", + name = L["Border"], + order = 5, + args = { + headerBorder = { + type = "header", + name = L["Border"], + order = 1, + }, + drBorderColorsEnabled = Gladdy:option({ + type = "toggle", + name = L["Enable DR Colors as Border Color"], + desc = L["Colors borders of DRs in respective DR Colors"], + order = 2, + width = "full", + }), + drBorderColor = Gladdy:colorOption({ + type = "color", + name = L["Border color"], + desc = L["Color of the border"], + order = 3, + disabled = function() + return Gladdy.db.drBorderColorsEnabled + end, + hasAlpha = true, + }), + drBorderStyle = Gladdy:option({ + type = "select", + name = L["Border style"], + order = 4, + values = Gladdy:GetIconStyles() + }), + } + }, + levelColors = { + type = "group", + name = L["DR Colors"], + order = 6, + args = { + headerColors = { + type = "header", + name = L["DR Colors"], + order = 10, + }, + drHalfColor = Gladdy:colorOption({ + type = "color", + name = L["Half"], + desc = L["Color of the border"], + order = 42, + hasAlpha = true, + }), + drQuarterColor = Gladdy:colorOption({ + type = "color", + name = L["Quarter"], + desc = L["Color of the border"], + order = 43, + hasAlpha = true, + }), + drNullColor = Gladdy:colorOption({ + type = "color", + name = L["Immune"], + desc = L["Color of the border"], + order = 44, + hasAlpha = true, + }), + }, + }, position = { type = "group", name = L["Position"], - order = 6, + order = 7, args = { headerPosition = { type = "header", @@ -594,105 +746,10 @@ function Diminishings:GetOptions() }), }, }, - level = { - type = "group", - name = L["Level Text"], - order = 5, - args = { - headerBorder = { - type = "header", - name = L["DR Level"], - order = 1, - }, - drLevelTextEnabled = Gladdy:option({ - type = "toggle", - name = L["DR Level Text Enabled"], - desc = L["Shows the current DR Level on the DR icon."], - order = 2, - width = "full", - }), - drLevelTextFont = Gladdy:option({ - type = "select", - name = L["Font"], - desc = L["Font of the cooldown"], - order = 3, - dialogControl = "LSM30_Font", - values = AceGUIWidgetLSMlists.font, - }), - drLevelTextFontScale = Gladdy:option({ - type = "range", - name = L["Font scale"], - desc = L["Scale of the text"], - order = 4, - min = 0.1, - max = 2, - step = 0.1, - width = "full", - }), - }, - }, - border = { - type = "group", - name = L["Border"], - order = 4, - args = { - headerBorder = { - type = "header", - name = L["Border"], - order = 30, - }, - drBorderStyle = Gladdy:option({ - type = "select", - name = L["Border style"], - order = 31, - values = Gladdy:GetIconStyles() - }), - drBorderColor = Gladdy:colorOption({ - type = "color", - name = L["Border color"], - desc = L["Color of the border"], - order = 32, - hasAlpha = true, - }), - headerBorderColors = { - type = "header", - name = L["DR Border Colors"], - order = 40, - }, - drBorderColorsEnabled = Gladdy:option({ - type = "toggle", - name = L["Dr Border Colors Enabled"], - desc = L["Colors borders of DRs in respective DR-color below"], - order = 41, - width = "full", - }), - drHalfColor = Gladdy:colorOption({ - type = "color", - name = L["Half"], - desc = L["Color of the border"], - order = 42, - hasAlpha = true, - }), - drQuarterColor = Gladdy:colorOption({ - type = "color", - name = L["Quarter"], - desc = L["Color of the border"], - order = 43, - hasAlpha = true, - }), - drNullColor = Gladdy:colorOption({ - type = "color", - name = L["Immune"], - desc = L["Color of the border"], - order = 44, - hasAlpha = true, - }), - } - }, frameStrata = { type = "group", name = L["Frame Strata and Level"], - order = 7, + order = 8, args = { headerAuraLevel = { type = "header", diff --git a/Modules/Racial.lua b/Modules/Racial.lua index 533aa6b..7838b9b 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -146,8 +146,7 @@ function Racial:UpdateFrame(unit) {"TOPLEFT", "TOPLEFT"}, Gladdy.db.racialSize * Gladdy.db.racialWidthFactor, Gladdy.db.racialSize, - 0, - 0) + 0, 0, "racialEnabled") end if (Gladdy.db.racialEnabled == false) then diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index 99af23c..0c316e1 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -172,7 +172,7 @@ function Trinket:UpdateFrame(unit) Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor, Gladdy.db.trinketSize, 0, - 0) + 0, "trinketEnabled") end trinket.cooldown:SetAlpha(Gladdy.db.trinketCooldownAlpha) -- 2.39.5 From cf485a91a1f831b2af57870d78321460bf518029 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 13 Jan 2022 23:12:34 +0100 Subject: [PATCH 067/227] cleanup --- Modules/BuffsDebuffs.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Modules/BuffsDebuffs.lua b/Modules/BuffsDebuffs.lua index 45a960a..1574c54 100644 --- a/Modules/BuffsDebuffs.lua +++ b/Modules/BuffsDebuffs.lua @@ -299,9 +299,6 @@ function BuffsDebuffs:UpdateFrame(unit) {"TOPRIGHT", "TOPRIGHT"}, Gladdy.db.buffsIconSize * Gladdy.db.buffsWidthFactor, Gladdy.db.buffsIconSize, 0, 0, "buffsEnabled") - if not Gladdy.db.buffsEnabled then - self.frames[unit].debuffFrame.mover:Hide() - end end --BUFFS @@ -312,9 +309,6 @@ function BuffsDebuffs:UpdateFrame(unit) {"TOPRIGHT", "TOPRIGHT"}, Gladdy.db.buffsBuffsIconSize * Gladdy.db.buffsBuffsWidthFactor, Gladdy.db.buffsBuffsIconSize, 0, 0, "buffsEnabled") - if not Gladdy.db.buffsEnabled then - self.frames[unit].buffFrame.mover:Hide() - end end for i=1, #self.frames[unit].auras[AURA_TYPE_BUFF] do -- 2.39.5 From 038688bd5b77733798bf5067674c055b82506966 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 13 Jan 2022 23:37:09 +0100 Subject: [PATCH 068/227] fix Gladdy:Hide() should call Gladdy:Reset() --- Frame.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Frame.lua b/Frame.lua index c4e2d41..4baab81 100644 --- a/Frame.lua +++ b/Frame.lua @@ -270,6 +270,7 @@ function Gladdy:HideFrame() self.startTest = nil self.hideFrame = true else + self:Reset() self.frame:Hide() end -- 2.39.5 From fd37f588ac4af197a9f59ac9debad5940fe335fe Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 13 Jan 2022 23:42:42 +0100 Subject: [PATCH 069/227] readme Attention --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 33dcec8..e76dc02 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # Gladdy - TBC ### The most powerful arena addon for WoW TBC 2.5.1 + +--- + ## [v2.00-Release Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v2.00-Release/Gladdy_TBC-Classic_v2.00-Release.zip) ###### Please consider donating if you like my work @@ -71,13 +74,16 @@ Thank you! - **Hydra** (thanks for constructive feedback and suggestions) - **Xyz** (thanks for suggestions) +--- + ### Changes ### v2.00-Release + This is a packed release with new features and bugfixes. Most importantly, positioning of all elements has been redone with movable frames. Thank you for the great feedback and active contribution. -####Attention: Once you install this version it will drastically change your current profile! You can't go back to an earlier version. Either back up your WTF or export your Profile before updating! +***Attention: Once you install this version it will drastically change your current profile! You can't go back to an earlier version. Either back up your WTF or export your Profile before updating!*** **Here is a list of all changes:** - **major release version set to v2** -- 2.39.5 From 5f94e971f01ed2d8aa8bb88625c46533edbaff38 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 13 Jan 2022 23:45:46 +0100 Subject: [PATCH 070/227] readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e76dc02..66c0797 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ Thank you for the great feedback and active contribution. **Here is a list of all changes:** - **major release version set to v2** - - this will mean, that export strings will still be backwards compatible, but not forward (Gladdy v2.x String cant be imported into Gladdy v1.x but vice versa) + - this will mean, that export strings will still be backwards compatible, but not forward (Gladdy v2.x String can't be imported into Gladdy v1.x but vice versa) - **big overhaul of positioning elements added! All elements besides HP and PowerBar can be moved separately** - added Mover Frames for Auras, Interrupts, (De)Buffs, CastBar, ClassIcon, CombatIndicator, Cooldowns, DRs, Pets, Racial, Trinket - this will hopefully make configuration a lot easier -- 2.39.5 From 7ce6cdd5e0078821f8e066268a24f49fa6693016 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 13 Jan 2022 23:48:54 +0100 Subject: [PATCH 071/227] readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 66c0797..2c4d356 100644 --- a/README.md +++ b/README.md @@ -134,9 +134,9 @@ Thank you for the great feedback and active contribution. - add a configurable 2nd timer or show one timer with the closest CD - **CastBar Icon can be enabled/disabled** - **Trinket solid color option added** - - color for Trinket on/off CD can bi configured (red/green by default) + - color for Trinket on/off CD can be configured (red/green by default) - **fixed some DR-categories** (Hibernate / Chastice / Dragonsbreath / ImpConcussiveShot / Counterattack) -- **Pixel Perfect option added** (makes your Gladdy Frames pixel perfect - no more wierd scaling interferences) +- **Pixel Perfect option added** (makes your Gladdy Frames pixel perfect - no more weird scaling interferences) - **Pets can be grouped** (not perfect yet, but a first step) - **added DR-Level Text** (thanks https://github.com/ManneN1) - **added zhCN Locale** (thanks https://github.com/veiz) -- 2.39.5 From cd64e8b4818b2ceca30d6d908ef08a73b9d8c9fd Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 00:36:46 +0100 Subject: [PATCH 072/227] add Mir pixel perfect edited profil --- Images/BasicProfiles/Mir1_edited.blp | Bin 0 -> 175956 bytes ImportStrings.lua | 4 ++++ Modules/Castbar.lua | 4 ++-- Modules/XiconProfiles.lua | 19 +++++++++++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 Images/BasicProfiles/Mir1_edited.blp diff --git a/Images/BasicProfiles/Mir1_edited.blp b/Images/BasicProfiles/Mir1_edited.blp new file mode 100644 index 0000000000000000000000000000000000000000..1e2797bf23af93cb7dc251a851e64546b53a98af GIT binary patch literal 175956 zcmeFa3tUxI{x`f22y8I&R6`!;);TD8I7W)e1Wx5Sc(-W=(G7?wH#Nm-NaL@0;{aj^ zT9%ScS%U})hg(z8G$Mi`mX&t%XwUpb@P-P>ajGK@2>bc11HZM_-a0WpGw<`f&->2q z(+9ujcUfz%z1I4!`wIU}#5j#02yUWABe=mo0Bj#b{&y3$Z-D=c;Qw;?ztTb+APe&K^!^`(YZD<_u9s*D+UrYx9pfb!$=~-|?@J_qQ+|G7DA7l(w09Z1 z5qW*Tz7U$KWBvufe6`OH@kO3{?*90vM2_*-_P;3c?rLmbudR=g#Y{^uhSH%y{30V;p_)9J-}yj>1p{UcKID|K;5OcEwzK zw$E-W_D-}@p3>C=y&{ac?sx($VYko0T`erY86jr#rRJ1#$8`#N0l zli?xh>~`3{KmGgC{Tk$Q5^hA)TP}U{qqjA<@Z!7s?9s3O?Ymw2LfYQH`~d#6{o!DI zdr3g>2!DN`FjBpM75{$g-!YHE?CLJ&nidr&gN%bU_pUgELc-bC{&@z*1zJ9&9eZ{0II{=HmxhGK}1 z+|xtzKZ&1QN3)~s!ZOPr#D5K!|E5ovHm;}HsjzSBs-gLp$Z6yt&?VrXDg!3+)g8UG zybuhDx3l0N{?o=e>JCu-B@?EP>#k$<0g>0#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zRm8Clem;5L+As^$4$7a3Twj0Coko4z0F2iOmuHZ-ST^cA@{UlBJZbUL2f1EBG23z+ z{N-GMKfoV$9jY?Lmgg2CM;u=2MS;PO126tt6buLSK2J{W4bokbc9i1t-6g>y+wdig zZ@)?C*LJ=(^9jmxe+T}j}Ak7kpcb*8*ds~p}zke DtFY_{ literal 0 HcmV?d00001 diff --git a/ImportStrings.lua b/ImportStrings.lua index b2c8dba..effd467 100644 --- a/ImportStrings.lua +++ b/ImportStrings.lua @@ -26,4 +26,8 @@ end function Gladdy:GetMirProfile() return "4XzT80SCBJZKpm75XfXpee4OvsCIRnXXRLtntQAkndLeTf3ir6LKAZ45qE2)AGUbjejLIyIZLiAsGgn6Ur)pYc2I7xmF5(hEOEM9FUEvzXTPRxNx84IBylMxLw8y2R2KT6l3w(1SQzPv3N9pnlMTy(Q06g4pNvwToR6vLBlRSqk1nRLlUjAX8hD)BL9FBwmFnmOYTRl)AXLBFAdoU1vVoVoD52SxLxTABwiyFmeKrxihhOnv5fFjR5qOSCX8nzPBB2aW5M0Dzxvw0mp)FZwCdhMAXt3x2KT72TPnz1ou5YTFn9567tREmRjBTD6vPRYt3EBz9I53D9BF39wm1bLvPa8rmh34ZBEgEZ8RlAYQEiDv2FE561FSO(pF7wGi(8FE9U0hZQ)tCS)1B3wwdGSEtkqgQZFCtZ957ay0c1o(GNw92QYV(68QSvn5LfTyZ)Fwvn83)1U0)3YQ)Qy)o3SF8WXo7J3F)h)GBdxLTR0Tbwm)1Lv513E7I5pL185pcRuwZIB(nfhOZ7RsFFEDZRZEiD)2glPxLKez)nRWsExB5ppvLdqO55f3iJS0)0vFba6BM9PRUYYq4jCUyAtHXfXXtBkczsK5OtHf3oL21isePN2AehlM4ExWuk20McxOmYPnfbJXsoN9EifwFcY14mLyPEIRcpMNm19IKDCcglAaBuejJpoBCe(U2OpU0Oyu2UupXnHugjpoPA0fHfjp(ImY(wZ48PHujSjk8cYHhFgm(WtuAP6SocgSRncTAAyvmxE8zm(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UKG(MlYLlYwx7oVa)5RcSauUU4UI8k3BGj04SW6sqGm2IhL9YWvhCaqUWDG9tddrhm8hRVdeYjaXP(b91)6)ronC6aZASG2RxgUuI7dsQ5aj9HGKEoqYCiizMdKsoeKsMdKShcs25aP0dbP05aj836G9bkxpzC0WQzz7VNyTzZ6Dz516VPxY59(DfOXBY8q)Eh5hJ3A93amjh6NDgALgxRYHJX7O4Wdj5BnaWA(b(nFItf7D4X731TSnX9Swt(2MhQ7D0(ThPDOT27FzSdXomSwdX9Dt89mct)LAdliKL2h1MW(7l2w8y2McxNn2DvnUP8uxo)x6Rxb2(AD1VGSEoSNEI6SOJO)DEkQNOMQYbdA22HB44Q444brx1H4gozWv4)73RJhDPUxMWWEDguBfBAwU8)(7QXTTi" end \ No newline at end of file diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 7302b1d..3bf8f65 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -601,7 +601,7 @@ function Castbar:GetOptions() desc = L["Height of the bar"], order = 3, min = 0, - max = 100, + max = 200, step = 1, width = "full", }), @@ -611,7 +611,7 @@ function Castbar:GetOptions() desc = L["Width of the bars"], order = 4, min = 0, - max = 300, + max = 600, step = 1, width = "full", }), diff --git a/Modules/XiconProfiles.lua b/Modules/XiconProfiles.lua index bd12442..573634e 100644 --- a/Modules/XiconProfiles.lua +++ b/Modules/XiconProfiles.lua @@ -152,5 +152,24 @@ function XiconProfiles:GetOptions() width = "full", order = 15, }, + headerProfileMirEdited = { + type = "header", + name = "Mir's " .. L["Profile"] .. " edited", + order = 16, + }, + mirProfileEdited = { + type = "execute", + func = function() + Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile()) + applyProfile(Gladdy:GetMirEditedProfile()) + end, + name = " ", + desc = "Mir's " .. L["Profile"], + image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Mir1_edited.blp", + imageWidth = 350, + imageHeight = 175, + width = "full", + order = 17, + }, } end \ No newline at end of file -- 2.39.5 From 47a15bd2a17a1b5313a1898d3fe2c28b1a155420 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 00:39:46 +0100 Subject: [PATCH 073/227] dump version --- Gladdy.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gladdy.lua b/Gladdy.lua index eb14d39..24dc74a 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -27,7 +27,7 @@ local LibStub = LibStub --------------------------- -local MAJOR, MINOR = "Gladdy", 4 +local MAJOR, MINOR = "Gladdy", 5 local Gladdy = LibStub:NewLibrary(MAJOR, MINOR) local L Gladdy.version_major_num = 2 -- 2.39.5 From 89a5511fb93f577998725d672b992f2c257c1918 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 03:06:02 +0100 Subject: [PATCH 074/227] perception cd tracking improved (rogue out of stealth) --- EventListener.lua | 9 +++++++++ Modules/Racial.lua | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 23cd832..4d97d35 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -86,6 +86,9 @@ function Gladdy:SpotEnemy(unit, auraScan) end end end + if Gladdy.cooldownBuffs.racials[spellName] then + Gladdy:SendMessage("RACIAL_USED", unit, expirationTime, spellName) + end if Gladdy.specBuffs[spellName] then -- Check for auras that detect a spec local unitPet = string_gsub(unit, "%d$", "pet%1") if UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster) then @@ -216,6 +219,9 @@ Gladdy.exceptionNames = { -- TODO MOVE ME TO CLASSBUFFS LIB Gladdy.cooldownBuffs = { [GetSpellInfo(6346)] = { cd = 180, spellId = 6346 }, -- Fear Ward + racials = { + [GetSpellInfo(20600)] = { cd = 180, spellId = 20600 }, -- Perception + } } function EventListener:UNIT_AURA(unit) @@ -243,6 +249,9 @@ function EventListener:UNIT_AURA(unit) end end end + if Gladdy.cooldownBuffs.racials[spellName] then + Gladdy:SendMessage("RACIAL_USED", unit, spellName, expirationTime, spellName) + end if not button.spec and Gladdy.specBuffs[spellName] then local unitPet = string_gsub(unit, "%d$", "pet%1") if unitCaster and (UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster)) then diff --git a/Modules/Racial.lua b/Modules/Racial.lua index 7838b9b..ec5e237 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -165,13 +165,17 @@ function Racial:JOINED_ARENA() end) end -function Racial:RACIAL_USED(unit) +function Racial:RACIAL_USED(unit, expirationTime, spellName) local racial = self.frames[unit] local button = Gladdy.buttons[unit] if (not racial or not button or not button.race) then return end - Racial:Used(unit, GetTime(), Gladdy:Racials()[button.race].duration) + if expirationTime and Gladdy:Racials()[button.race].spellName ~= spellName then + return + end + local startTime = (expirationTime and expirationTime - Gladdy:Racials()[button.race].duration) or GetTime() + Racial:Used(unit, startTime, Gladdy:Racials()[button.race].duration) end function Racial:Used(unit, startTime, duration) -- 2.39.5 From ddccf7a62eb5bf4dda28792241c172af8044e8bf Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 03:14:02 +0100 Subject: [PATCH 075/227] frFR localization by Macumba --- Lang.lua | 353 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 353 insertions(+) diff --git a/Lang.lua b/Lang.lua index 740b673..3ae287d 100644 --- a/Lang.lua +++ b/Lang.lua @@ -1413,6 +1413,359 @@ elseif GetLocale() == "zhCN" then L["Background Color of the frame"] = "框架的背景顏色" L["Gladdy"] = "Gladdy框架" --Line 210, 709, 727 +elseif GetLocale() == "frFR" then + -- Announcements.lua + L["Announcements"] = "ANNONCE" + L["RESURRECTING: %s (%s)"] = "EN TRAIN DE RESSUSCITER: %s (%s)" + L["SPEC DETECTED: %s - %s (%s)"] = "SPEC DETECTÉ: %s - %s (%s)" + L["LOW HEALTH: %s (%s)"] = "VIE BASSE: %s (%s)" + L["TRINKET USED: %s (%s)"] = "TRINKET UTILISÉ: %s (%s)" + L["TRINKET READY: %s (%s)"] = "TRINKET PRÊT: %s (%s)" + L["DRINKING: %s (%s)"] = "EN TRAIN DE BOIRE: %s (%s)" + L["Self"] = "Soi" + L["Party"] = "Groupe" + L["Raid Warning"] = "Avertissement de raid" + L["Blizzard's Floating Combat Text"] = "Texte de combat flottant de Blizzard" + L["Trinket used"] = "Trinket utilisé" + L["Announce when an enemy's trinket is used"] = "Annonce quand un trinket ennemie est utilisé" + L["Trinket ready"] = "Trinket prêt" + L["Announce when an enemy's trinket is ready again"] = "Annonce quand un trinket ennemie est prêt de nouveau" + L["Drinking"] = "En train de boire" + L["Announces when enemies sit down to drink"] = "Annonce quand les ennemies s'assoient pour boire" + L["Resurrection"] = "Resurrection" + L["Announces when an enemy tries to resurrect a teammate"] = "Annonce quand un ennemie essaie de ressusciter un membre de son groupe" + L["New enemies"] = "Nouveaux ennemis" + L["Announces when new enemies are discovered"] = "Annonce quand les ennemies sont découverts" + L["Spec Detection"] = "Détection des SPEC" + L["Announces when the spec of an enemy was detected"] = "Annonce quand une spec d'un ennemie est détecté" + L["Low health"] = "Vie Basse" + L["Announces when an enemy drops below a certain health threshold"] = "Annonce quand un ennemie tombe en dessous d'un certain seuil de points de vie" + L["Low health threshold"] = "Seuil de points de vie bas" + L["Choose how low an enemy must be before low health is announced"] = "Choisissez à quel point un ennemi doit être bas avant d'annoncer une santé faible" + L["Destination"] = "Destination" + L["Choose how your announcements are displayed"] = "Choisissez comment vos annonces sont affichées" + + -- ArenaCountDown.lua + L["Arena Countdown"] = "Compte à rebours de l'arène" + L["Turn on/off"] = "Activer / désactiver" + L["Turns countdown before the start of an arena match on/off."] = "Active / désactive le compte à rebours avant le début d'un match d'arène" + L["Size"] = "Taille" + + -- Auras.lua + L["Auras"] = "Auras" + L["Frame"] = "Cadre" + L["Cooldown"] = "Temps de recharge" + L["No Cooldown Circle"] = "Pas de Balayage du temps de recharge" + L["Cooldown circle alpha"] = "Alpha du Balayage du temps de recharge" + L["Font"] = "Police de caractère" + L["Font of the cooldown"] = "Police du temps de recharge" + L["Font scale"] = "Échelle de police" + L["Scale of the text"] = "Échelle du texte" + L["Font color"] = "Couleur de la police" + L["Color of the text"] = "Couleur du texte" + L["Border"] = "Bordure" + L["Border style"] = "Style de bordure" + L["Buff color"] = "Couleur des buff" + L["Debuff color"] = "Couleur des Debuff" + L["Check All"] = "Vérifie tout" + L["Uncheck All"] = "Décocher tout" + L["Enabled"] = "Activé" + L["Priority"] = "Priorité" + + -- BuffsDebuffs.lua + L["Buffs and Debuffs"] = "Buffs et Debuffs" + L["Enable"] = "Activé" + L["Enabled Buffs and Debuffs module"] = "Module de buffs et debuffs activés" + L["Show CC"] = "Montrer les CC" + L["Shows all debuffs, which are displayed on the ClassIcon as well"] = "Montrer tout les debuffs, qui sont affichés sur l'icone de classe aussi" + L["Buffs"] = "Buffs" + L["Size & Padding"] = "Taille et remplissage" + L["Icon Size"] = "Taille de l'icône" + L["Size of the DR Icons"] = "Taille des icones de DR" + L["Icon Width Factor"] = "Facteur de largeur d'icône" + L["Stretches the icon"] = "Étire l'icône" + L["Icon Padding"] = "Remplissage d'icônes" + L["Space between Icons"] = "Espace entre les icônes" + L["Position"] = "Position" + L["Aura Position"] = "Position de l'aura" + L["Position of the aura icons"] = "Position de l'icône de l'aura" + L["Top"] = "Haut" + L["Bottom"] = "Bas" + L["Left"] = "Gauche" + L["Right"] = "Droite" + L["Grow Direction"] = "Direction de croissance" + L["Grow Direction of the aura icons"] = "Direction de croissance de l'icônr de l'aura" + L["Horizontal offset"] = "Décalage horizontal" + L["Vertical offset"] = "Décalage verticale" + L["Alpha"] = "Alpha" + L["Debuffs"] = "Debuffs" + L["Dynamic Timer Color"] = "Couleur de la minuterie dynamique" + L["Show dynamic color on cooldown numbers"] = "Afficher la couleur dynamique sur les numéros de recharge" + L["Color of the cooldown timer and stacks"] = "Couleur du temps de recharge et des piles" + L["Spell School Colors"] = "Couleurs de l'école de sorts" + L["Spell School Colors Enabled"] = "Couleurs de l'école de sorts" + L["Show border colors by spell school"] = "Afficher les couleurs des bordures par école de sorts" + L["Curse"] = "Malédiction" + L["Color of the border"] = "Couleur de la bordure" + L["Magic"] = "Magique" + L["Poison"] = "Poison" + L["Physical"] = "Physique" + L["Immune"] = "Immunisé" + L["Disease"] = "Maladie" + L["Aura"] = "Aura" + L["Form"] = "Forme" + + -- Castbar.lua + L["Cast Bar"] = "Barre d'incantation" + L["Bar"] = "Barre" + L["Bar Size"] = "Taille de la barre" + L["Bar height"] = "Hauteur de la barre" + L["Height of the bar"] = "Hauteur de la barre" + L["Bar width"] = "Largeur de la barre" + L["Width of the bars"] = "Largeur de la barre" + L["Texture"] = "Texture" + L["Bar texture"] = "Texture de la barre" + L["Texture of the bar"] = "Texture de la barre" + L["Bar color"] = "Couleur de la barre" + L["Color of the cast bar"] = "Couleur de la barre d'incantation" + L["Background color"] = "Couleur de l'Arrière plan" + L["Color of the cast bar background"] = "Couleur de l'Arrière plan de la barre d'incantation" + L["Border size"] = "taille de la bordure" + L["Status Bar border"] = "Bordure de la barre de statut" + L["Status Bar border color"] = "Couleur de la bordure de la barre de statut" + L["Icon"] = "Icone" + L["Icon size"] = "Taille de l'icone" + L["Icon border"] = "Bordure de l'icone" + L["Icon border color"] = "Couleur de la bordure de l'icone" + L["Spark"] = "Etincelle" + L["Spark enabled"] = "Etincelle activé" + L["Spark color"] = "Couleur de l'étincelle" + L["Color of the cast bar spark"] = "Couleur de l'étincelle de la barre d'incantation" + L["Font of the castbar"] = "Police de la barre d'incantation" + L["Font size"] = "Taille de la police" + L["Size of the text"] = "Taille du texte" + L["Format"] = "Format" + L["Timer Format"] = "Format du timer" + L["Remaining"] = "Restant" + L["Total"] = "Total" + L["Both"] = "Les deux" + L["Castbar position"] = "Position de la barre d'incantation" + L["Icon position"] = "Position de l'icone" + L["Offsets"] = "Décalage" + + -- Classicon.lua + L["Class Icon"] = "Icone de la classe" + L["Balance"] = "Equilibre" + L["Feral"] = "Combat farouche" + L["Restoration"] = "Restauration" + L["Beast Mastery"] = "Maîtrise des bêtes" + L["Marksmanship"] = "Précision" + L["Survival"] = "Survie" + L["Arcane"] = "Arcane" + L["Fire"] = "Feu" + L["Frost"] = "Givre" + L["Holy"] = "Sacré" + L["Retribution"] = "Vindicte" + L["Protection"] = "Protection" + L["Discipline"] = "Discipline" + L["Shadow"] = "Ombre" + L["Assassination"] = "Assassinat" + L["Combat"] = "Combat" + L["Subtlety"] = "Finesse" + L["Elemental"] = "Elementaire" + L["Enhancement"] = "Amélioration" + L["Affliction"] = "Affliction" + L["Demonology"] = "Démonologie" + L["Destruction"] = "Destruction" + L["Arms"] = "Armes" + L["Fury"] = "Fureur" + L["Show Spec Icon"] = "Afficher l'icone des spécialisations" + L["Shows Spec Icon once spec is detected"] = "Afficher l'icone des spécialisations une fois que les spé sont détectés" + L["Icon width factor"] = "Facteur de largeur d'icône" + L["This changes positions with trinket"] = "Cela change de position avec le trinket" + L["Border color"] = "Couleur de la bordure" + + --CombatIndicator.lua + L["Combat Indicator"] = "Indicateur de combat" + L["Enable Combat Indicator icon"] = "Activer l'icone de l'indicateur de combat" + L["Anchor"] = "Ancre" + L["This changes the anchor of the ci icon"] = "Cela change l'ancre de l'icône de l'indicateur de combat" + L["This changes position relative to its anchor of the ci icon"] = "Cela change la position par rapport à son ancre de l'icône de l'indicateur de combat" + + -- Cooldowns.lua + L["Cooldowns"] = "Temps de recharge (CD)" + L["COOLDOWN USED: %s (%s) used %s - %s sec. cooldown"] = "CD utilisé : %s (%s) utilisé %s - %s sec. cd" + L["Enabled cooldown module"] = "Module du temps de recharge activé" + L["Cooldown size"] = "Taille du temps de recharge" + L["Size of each cd icon"] = "Taille de chaque icone de CD" + L["Max Icons per row"] = "Nombre maximal d'icônes par ligne" + L["Scale of the font"] = "Échelle de la police" + L["Anchor of the cooldown icons"] = "Ancre de l'icone du temps de recharge" + L["Grow Direction of the cooldown icons"] = "Direction de croissance des icônes de temps de recharge" + L["Offset"] = "Décalage" + + -- Diminishings.lua + L["Diminishings"] = "Rendements décroissants (DR)" + L["Enabled DR module"] = "Activer le module DR" + L["DR Cooldown position"] = "Position du temps de recharge des DR" + L["Position of the cooldown icons"] = "Position des icones de temps de recharge" + L["DR Border Colors"] = "Couleur de la bordure des DR" + L["Dr Border Colors Enabled"] = "Couleur de la bordure des DR activé" + L["Colors borders of DRs in respective DR-color below"] = "Couleurs des bordures des DR dans la couleur DR respective ci-dessous" + L["Half"] = "Demi" + L["Quarter"] = "Quart" + L["Categories"] = "Catégories" + L["Force Icon"] = "Forcer les icones" + L["Icon of the DR"] = "Icones des DR" + + -- ExportImport.lua + L["Export Import"] = "Exporter Importer" + L["Profile Export Import"] = "Profile de l'Exporter Importer" + + -- Healthbar.lua + L["Health Bar"] = "Barre de vie" + L["DEAD"] = "MORT" + L["LEAVE"] = "QUITTER" + L["General"] = "Général" + L["Color of the status bar background"] = "Couleur de l'arrière-plan de la barre d'état" + L["Font of the bar"] = "Police de la barre" + L["Name font size"] = "Taille de la police du nom" + L["Size of the name text"] = "Taille du texte du nom" + L["Health font size"] = "Taille de la police de la santé" + L["Size of the health text"] = "Taille du texte de la santé" + L["Size of the border"] = "Taille de la bordure" + L["Health Bar Text"] = "Texte de la barre de santé" + L["Show name text"] = "Afficher le texte du nom" + L["Show the units name"] = "Afficher le nom des unités" + L["Show ArenaX"] = "Afficher ArenaX" + L["Show Arena1-5 as name instead"] = "Afficher Arena1-5 comme nom à la place" + L["Show the actual health"] = "Afficher la santé réelle" + L["Show the actual health on the health bar"] = "Afficher la santé réelle sur la barre de santé" + L["Show max health"] = "Afficher la santé maximale" + L["Show max health on the health bar"] = "Afficher la santé maximale sur la barre de santé" + L["Show health percentage"] = "Afficher le pourcentage de santé" + L["Show health percentage on the health bar"] = "Afficher le pourcentage de santé sur la barre de santé" + + -- Highlight.lua + L["Highlight"] = "Surbrillance" + L["Show Inside"] = "Afficher dedans" + L["Show Highlight border inside of frame"] = "Afficher la bordure de surbrillance à l'intérieur du cadre" + L["Colors"] = "Couleurs" + L["Target border color"] = "Couleur de la bordure cible" + L["Color of the selected targets border"] = "Couleur de la bordure des cibles sélectionnées" + L["Focus border color"] = "Couleur de la bordure du Focus" + L["Color of the focus border"] = "Couleur de la bordure du Focus" + L["Highlight target"] = "Mettre la cible en surbrillance" + L["Toggle if the selected target should be highlighted"] = "Basculer si la cible sélectionnée doit être mise en surbrillance" + L["Show border around target"] = "Afficher la bordure autour de la cible" + L["Toggle if a border should be shown around the selected target"] = "Basculer si une bordure doit être affichée autour de la cible sélectionnée" + L["Show border around focus"] = "Afficher la bordure autour du focus" + L["Toggle of a border should be shown around the current focus"] = "La bascule d'une bordure doit être affichée autour du focus actuel" + + -- Pets.lua + L["Pets"] = "Familier" + L["Enables Pets module"] = "Activer le module familier (pet)" + L["Width of the bar"] = "Largeur de la barre" + L["Health color"] = "Couleur de la santé" + L["Color of the status bar"] = "Couleur de la barre d'état" + L["Portrait"] = "Portrait" + L["Health Values"] = "Valeurs de santé" + + -- Powerbar.lua + L["Power Bar"] = "Barre de puissance" + L["Power Bar Text"] = "Texte de la barre de puissance" + L["Power Texts"] = "Textes de puissance" + L["Show race"] = "Afficher la race" + L["Show spec"] = "Afficher la spé" + L["Show the actual power"] = "Afficher la puissance actuelle" + L["Show the actual power on the power bar"] = "Afficher la puissance actuelle sur la barre de puissance" + L["Show max power"] = "Afficher la puissance maximale" + L["Show max power on the power bar"] = "Afficher la puissance maximale sur la barre de puissance" + L["Show power percentage"] = "Afficher le pourcentage de puissance" + L["Show power percentage on the power bar"] = "Afficher le pourcentage de puissance sur la barre de puissance" + + -- Racial.lua + L["Racial"] = "Raciale" + L["Enable racial icon"] = "Activer l'icone du raciale" + L["This changes the anchor of the racial icon"] = "Cela change l'ancre de l'icône du raciale" + L["This changes position relative to its anchor of the racial icon"] = "Cela change de position par rapport à son ancre de l'icône du raciale" + + -- TotemPlates.lua + L["Totem Plates"] = "Totem Plates" + L["Customize Totems"] = "Personnaliser les totems" + L["Custom totem name"] = "Personnaliser le nom des totems" + L["Totem General"] = "Totem Général" + L["Turns totem icons instead of nameplates on or off. (Requires reload)"] = "Active ou désactive les icônes totem au lieu des nameplates. (Nécessite un rechargement)" + L["Show friendly"] = "Montrer les amis" + L["Show enemy"] = "Montrer les ennemies" + L["Totem size"] = "Taille du totem" + L["Size of totem icons"] = "Taille de l'icone du totem" + L["Font of the custom totem name"] = "Police du nom du totem personnalisé" + L["Apply alpha when no target"] = "Appliquer l'alpha en l'absence de cible" + L["Always applies alpha, even when you don't have a target. Else it is 1."] = "Applique toujours l'alpha, même lorsque vous n'avez pas de cible. Sinon c'est 1." + L["Apply alpha when targeted"] = "Appliquer l'alpha lorsque ciblé" + L["Always applies alpha, even when you target the totem. Else it is 1."] = "Applique toujours l'alpha, même lorsque vous ciblez le totem. Sinon c'est 1." + L["All totem border alphas (configurable per totem)"] = "Tous les alphas de bordure de totem (configurables par totem)" + L["Totem icon border style"] = "Style de bordure d'icône totem" + L["All totem border color"] = "Toutes les couleurs de bordure de totem" + + -- Trinket.lua + L["Trinket"] = "Trinket (Bijoux PvP)" + L["Enable trinket icon"] = "Activer l'icone du trinket" + L["This changes positions of the trinket"] = "Cela change les positions du trinket" + + -- XiconProfiles.lua + L["Profile"] = "Profile" + + -- Frame.lua + L["Gladdy - drag to move"] = "Gladdy - faites glisser pour déplacer" + + -- Gladdy.lua + L["Welcome to Gladdy!"] = "Bienvenue chez Gladdy !" + L["First run has been detected, displaying test frame."] = "La première exécution a été détectée, affichant la trame de test." + L["Valid slash commands are:"] = "Les commandes de slash valides sont :" + L["If this is not your first run please lock or move the frame to prevent this from happening."] = "S'il ne s'agit pas de votre première utilisation, veuillez verrouiller ou déplacer le cadre pour éviter que cela ne se produise." + + -- Options.lua + L["settings"] = "paramètres" + L["Reset module"] = "Réinitialiser le module" + L["Reset module to defaults"] = "Réinitialiser le module" + L["No settings"] = "Pas de paramètres" + L["Module has no settings"] = "Le module n'a pas de paramètres" + L["General settings"] = "Paramètres général" + L["Lock frame"] = "Verouiller le cadre" + L["Toggle if frame can be moved"] = "Cliquez si le cadre peut être bougé" + L["Grow frame upwards"] = "Agrandir le cadre vers le haut" + L["If enabled the frame will grow upwards instead of downwards"] = "Si activé, le cadre grandira vers le haut au lieu de vers le bas" + L["Down"] = "Vers la bas" + L["Up"] = "Vers le haut" + L["Frame General"] = "Cadre général" + L["Frame scale"] = "Taille du cadre" + L["Scale of the frame"] = "Taille du cadre" + L["Frame padding"] = "Remplissage du cadre" + L["Padding of the frame"] = "Remplissage du cadre" + L["Frame width"] = "Largeur du cadre" + L["Margin"] = "Marge" + L["Margin between each button"] = "Marge entre chaque bouton" + L["Cooldown General"] = "Temps de recharge Général" + L["Font General"] = "Police Général" + L["General Font"] = "Police Général" + L["Font color text"] = "Texte de la couleur de la police" + L["Font color timer"] = "Texte de la couleur de la police" + L["Color of the timers"] = "Couleur des minuteurs" + L["Icons General"] = "Icônes Général" + L["Icon border style"] = "Style de bordure d'icône" + L["This changes the border style of all icons"] = "Cela change le style de bordure de toutes les icônes" + L["This changes the border color of all icons"] = "Cela change la couleur de bordure de toutes les icônes" + L["Statusbar General"] = "Barre d'état Général" + L["Statusbar texture"] = "Texture de la Barre d'état" + L["This changes the texture of all statusbar frames"] = "Cela change la texture de tous les cadres de la barre d'état" + L["Statusbar border style"] = "Style de bordure de la barre d'état" + L["This changes the border style of all statusbar frames"] = "Cela modifie le style de bordure de tous les cadres de la barre d'état" + L["Statusbar border offset divider (smaller is higher offset)"] = "Diviseur de décalage de bordure de barre d'état (le plus petit est le décalage le plus élevé)" + L["Offset of border to statusbar (in case statusbar shows beyond the border)"] = "Décalage de la bordure par rapport à la barre d'état (au cas où la barre d'état s'afficherait au-delà de la bordure)" + L["Statusbar border color"] = "Couleur de la bordure de la barre d'état" + L["This changes the border color of all statusbar frames"] = "Cela change la couleur de la bordure de tous les cadres de la barre d'état" end -- 2.39.5 From 35e119160a69d610428961177c8be07b2e7e174e Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 05:51:39 +0100 Subject: [PATCH 076/227] no more restoration warlocks --- Modules/Cooldowns.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 8c695af..4dea4e9 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -345,6 +345,12 @@ function Cooldowns:DetectSpec(unit, spec) end if button.class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) or button.class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) + or button.class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) + or button.class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) + or button.class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) + or button.class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) + or button.class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) + or button.class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) or button.class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then return end -- 2.39.5 From 4583cbdf24ba69f267a4b26cb04d65116e0d2833 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 05:51:56 +0100 Subject: [PATCH 077/227] add Flat Statusbar texture --- Gladdy.lua | 1 + Images/UI-StatusBar.blp | Bin 0 -> 1564 bytes 2 files changed, 1 insertion(+) create mode 100644 Images/UI-StatusBar.blp diff --git a/Gladdy.lua b/Gladdy.lua index 24dc74a..32fb1e3 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -268,6 +268,7 @@ function Gladdy:OnInitialize() self.LSM:Register("statusbar", "Smooth", "Interface\\AddOns\\Gladdy\\Images\\Smooth") self.LSM:Register("statusbar", "Minimalist", "Interface\\AddOns\\Gladdy\\Images\\Minimalist") self.LSM:Register("statusbar", "LiteStep", "Interface\\AddOns\\Gladdy\\Images\\LiteStep.tga") + self.LSM:Register("statusbar", "Flat", "Interface\\AddOns\\Gladdy\\Images\\UI-StatusBar") self.LSM:Register("border", "Gladdy Tooltip round", "Interface\\AddOns\\Gladdy\\Images\\UI-Tooltip-Border_round_selfmade") self.LSM:Register("border", "Gladdy Tooltip squared", "Interface\\AddOns\\Gladdy\\Images\\UI-Tooltip-Border_square_selfmade") self.LSM:Register("font", "DorisPP", "Interface\\AddOns\\Gladdy\\Images\\DorisPP.TTF") diff --git a/Images/UI-StatusBar.blp b/Images/UI-StatusBar.blp new file mode 100644 index 0000000000000000000000000000000000000000..0e8013c217fb76c5e08156932d91c0a0d6a32927 GIT binary patch literal 1564 zcmZ?r2{2-0U|?WkU|@6r(i}iMg$0ON85phr@fRRwVPjz60b&s#CJF!zbO0(;0Ac|k z2AK)NK;|eI4S~@R7!3iOArSvxeBXZ{7^TSz2a%=!|F2s0|36+D7`|Y6H2N2m{|`t5 E0G#DDBme*a literal 0 HcmV?d00001 -- 2.39.5 From 4885e11b106e4c3fb55ab4fdc7fc0d3031b82b33 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 06:20:06 +0100 Subject: [PATCH 078/227] fix avenging wrath resets Divine Shield to 60s when Divine Shield CD > 60 --- Modules/Cooldowns.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 4dea4e9..9c8b190 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -534,7 +534,17 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSecond for spellID,_ in pairs(cooldown.sharedCD) do if (spellID ~= "cd") then - self:CooldownStart(button, spellID, sharedCD) + local skip = false + for i = 1, button.lastCooldownSpell do + local icon = button.spellCooldownFrame["icon" .. i] + if (icon.spellId == spellID and icon.active and icon.timeLeft > sharedCD) then + skip = true + break + end + end + if not skip then + self:CooldownStart(button, spellID, sharedCD) + end end end end -- 2.39.5 From 016327c6599602fe33651d2ee12235b529c76069 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 06:35:49 +0100 Subject: [PATCH 079/227] add Conflagrate cd --- Constants.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Constants.lua b/Constants.lua index 8bbd4c7..87f9878 100644 --- a/Constants.lua +++ b/Constants.lua @@ -922,6 +922,7 @@ local cooldownList = { [27277] = 8, -- Devour Magic [30414] = { cd = 20, spec = L["Destruction"], }, -- Shadowfury [17877] = { cd = 15, spec = L["Destruction"], }, -- Shadowburn + [30912] = { cd = 10, spec = L["Destruction"], }, -- Conflagrate [18708] = { cd = 900, spec = L["Demonology"], }, -- Feldom }, -- 2.39.5 From 2d58d3fb7738bec9020532fa4e1e0d12ecf8af9f Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 14 Jan 2022 06:50:39 +0100 Subject: [PATCH 080/227] add Tree of Life druid spec detection --- Constants.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Constants.lua b/Constants.lua index 87f9878..0a5704e 100644 --- a/Constants.lua +++ b/Constants.lua @@ -20,6 +20,7 @@ local specBuffs = { [GetSpellInfo(24858)] = L["Restoration"], -- Moonkin Form; Dreamstate spec in TBC equals Restoration [GetSpellInfo(17007)] = L["Feral"], -- Leader of the Pack [GetSpellInfo(16188)] = L["Restoration"], -- Nature's Swiftness + [GetSpellInfo(33891)] = L["Restoration"], -- Tree of Life -- HUNTER [GetSpellInfo(34692)] = L["Beast Mastery"], -- The Beast Within @@ -97,6 +98,7 @@ local specSpells = { [GetSpellInfo(33987)] = L["Feral"], -- Mangle (Bear) [GetSpellInfo(18562)] = L["Restoration"], -- Swiftmend [GetSpellInfo(16188)] = L["Restoration"], -- Nature's Swiftness + [GetSpellInfo(33891)] = L["Restoration"], -- Tree of Life -- HUNTER [GetSpellInfo(19577)] = L["Beast Mastery"], -- Intimidation -- 2.39.5 From 19eba81faa2814b72fef20db0dd8e58dc4922621 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 25 Jan 2022 19:58:51 +0100 Subject: [PATCH 081/227] shadowsight fix enabled/disabled --- Modules/ShadowsightTimer.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Modules/ShadowsightTimer.lua b/Modules/ShadowsightTimer.lua index 09d9631..8843cc2 100644 --- a/Modules/ShadowsightTimer.lua +++ b/Modules/ShadowsightTimer.lua @@ -148,13 +148,15 @@ end --------------------------- function ShadowsightTimer:JOINED_ARENA() - self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL") - self:SetScript("OnEvent", ShadowsightTimer.OnEvent) - for i=1,2 do - self["timerFrame" .. i].font:SetText("1:30") - self["timerFrame" .. i].font:SetTextColor(1, 0.8, 0) + if Gladdy.db.shadowsightTimerEnabled then + self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL") + self:SetScript("OnEvent", ShadowsightTimer.OnEvent) + for i=1,2 do + self["timerFrame" .. i].font:SetText("1:30") + self["timerFrame" .. i].font:SetTextColor(1, 0.8, 0) + end + self.anchor:Show() end - self.anchor:Show() end function ShadowsightTimer:AURA_GAIN(unit, auraType, spellID) -- 2.39.5 From 9266274c1646adaa0a28bc3312429555516d3bb6 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 25 Jan 2022 20:01:42 +0100 Subject: [PATCH 082/227] legacy to newlayout fix when frame has width = 0 or height = 0 --- Frame.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Frame.lua b/Frame.lua index 4baab81..84f5453 100644 --- a/Frame.lua +++ b/Frame.lua @@ -368,6 +368,10 @@ function Gladdy:SetPosition(frame, unit, xOffsetDB, yOffsetDB, newLayout, module if (not newLayout) then --Gladdy:Debug("INFO", name, "old X/Y:", frame:GetCenter()) local xOffset, yOffset = frame:GetLeft(), frame:GetTop() + if not xOffset or not yOffset then + xOffset = frame:GetCenter() - frame:GetWidth()/2 + yOffset = select(2, frame:GetCenter()) + frame:GetHeight()/2 + end local x,y = button.healthBar:GetLeft(), button.healthBar:GetTop() local newXOffset = math_abs(x - xOffset) * (x > xOffset and -1 or 1) local newYOffset = math_abs(y - yOffset) * (y > yOffset and -1 or 1) -- 2.39.5 From 37902e37e793026c2e578bbaefe68caf20165026 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 25 Jan 2022 20:03:17 +0100 Subject: [PATCH 083/227] hide countdown frame when not used --- Modules/ArenaCountDown.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/ArenaCountDown.lua b/Modules/ArenaCountDown.lua index dda004f..6218064 100644 --- a/Modules/ArenaCountDown.lua +++ b/Modules/ArenaCountDown.lua @@ -26,7 +26,7 @@ function ACDFrame:Initialize() ACDNumFrame:SetHeight(512) ACDNumFrame:SetWidth(512) ACDNumFrame:SetPoint("CENTER", 0, 256) - ACDNumFrame:Show() + ACDNumFrame:Hide() self.ACDNumFrame = ACDNumFrame local ACDNumTens = ACDNumFrame:CreateTexture("ACDNumTens", "HIGH") @@ -88,6 +88,7 @@ function ACDFrame.OnUpdate(self, elapse) self.countdown = self.countdown - elapse; else self.hidden = true; + self.ACDNumFrame:Hide() self.ACDNumTens:Hide(); self.ACDNumOnes:Hide(); self.ACDNumOne:Hide(); -- 2.39.5 From 27eeade50744adca5306dc2ed8b1aa4b578c8ee4 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 25 Jan 2022 20:40:42 +0100 Subject: [PATCH 084/227] better class icons --- Images/Classes/INV_Hammer_01.blp | Bin 23016 -> 6660 bytes Images/Classes/INV_Sword_27.blp | Bin 23016 -> 6660 bytes Images/Classes/INV_ThrowingKnife_04.blp | Bin 6660 -> 6660 bytes Images/Classes/Spell_Nature_Drowsy.blp | Bin 6660 -> 6660 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --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r1IyV zrdiW7sf6=SjPX%(H;iM!pO}!SuD5Yn8ebYiZH7#x4o_|*)40dURyLSsKl_kso4cMo zN4c-;qqKoJ)B$r4?u%M;TZHQq6XLI?^L~4mf%(+&!Ijiu^pj*BQA!IruKLl+E;Md% zI29IkrR4Hr&fkxMxGneQYug5Pq?qWKtC^XZ$+6L$uUdHTKBIdAWu)P!(~p%l?M{HjMwkK~>i8E>U>8BDe&Q!kzqj~$*xdw;|4 zp1-n(iU#DI2o4HVtS#AQiRL!6a(d5VlCzpqg%=O@q2zukSSLx9H z-_nC6W{QjMNLKbw_k;kB;q6EpR?ehjM~?CQsg&za8|n}eNWBK-QqkHcsBXy^+VSgO z)4L~s&*QLQYRh#hBsiFI(j#f&f{~QB;Wb+S+F9E3+!X4~^NRa;Oc~6-XQV_?|51G? zv}!5!*|3g^Hm{>zWqrAv@xL|Kf%8v_J!4{&D&^E%@AtWwhg6cr(WwZ lVLbIN8$f~W{jXUQB7U6z$mAafPaXfGEi>uIK_&fu{9iFDiaP)R diff --git a/Images/Classes/INV_ThrowingKnife_04.blp b/Images/Classes/INV_ThrowingKnife_04.blp index 51ba1239d4e3ff7a406c445442890342d97b40cf..39678daf07ac3d9c74d84406052be4130aebc140 100644 GIT binary patch literal 6660 zcmb7J4^&h29{({Q?|=!I92M!fA$w1hiDXmpoMZ#*m46b!%Lr*Or=|#ss6ARDQy~8! zT0Um^vJPsfO=k6SW}1QEpVu+Lo=q$bCZI!6hsPGAzt32eI#`#3+z` zufB0Ki+yK>%^J?~10E>P35!^|(an#hT;cdxS#I3n^#BYWJYgiu5B>+a;{ZBa2X-)S z|9QmzJD&R@fA4BL!}-r+)_GPR=mEVTm)OMH_f!XVobZQRVD4x>UgN?uoCs$M(>yVJ zhqsEWGGA*I81MI1ecQn0H_W9S(cfSD%V8WIevkKaSlPW-`-%PT&mF(=@+-XqeOcng zW?t@{AN-AMC{^EFW4jJbu=C%!;`ZZPexH|TdDt-pKWsjw6*oBlK(F!5R!+|)iH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!cG*LsUk8qERyx1pd=LUh2gBJnh}SeVbHH;xjtJ ze-ZZw5Ae_Z;CyAw9NB!pXMFQo8)R&JU+i(rFlfxA9%jzn7poug9R>cwc)ltv)o1`m zo_}P&p~TqUym>0iP`)QGI#bLzYiwVFAw)$XUP!~k8_C*N*PQs!+xWt=ZO5Z z-xL4NCFY3ai&|TOzE;*JDl9I&40z~SPK?~n=39t)W(nf*NxVV~-KjKq_5%MYZ+@pj zu#otF!Kdq#wth(H7e~5$h|AtDU$`{_O;%fYe?I)DhrfJgg27=HwzGtS_iTr2NrU2Guv`i1$*?MlD+ZU%C zKnUocnX;$Kol4Tbg3Pxwa6HKV80G`7(ZkMn7e`LIa~hIf2l-Lvs4LCR)_-7R%OQ=& zY-RS~*H0>QPfETR&wmCr3ZTun)X|dJc%CttYQpjzjCdE7jZh)?@VGzMLY;VirjeES z7pBu_Uj%09zsGdj1pZm`IKmh!L--$<#}y)Lh~O3(Pt0XldOyZE7=*rdAujg3P}UAk@-y znar=Lcpk(PND0IYwdMA;AJ{RSpF5jAio+h6jQ>q zK8)wtVtp5onPn9mDk|+aZur5Dg<8rK@OS_Z1eE^u3ynP##`@mscP(Q)Y1j{?mnZdGnjJ z#ekdeepKpWa-W3XYdD-1pjS02sFtp6`vG@VccgFdE+qFw!zw&KT^T0*Ez{ky6$o6kBRF?xd(tZ-YZ!A+Utp|EkoB}D;Tyo$4anH9LdC=zv`kUUP zHO1E+IRSV>Pe)~x?ENcsu^--(P33sWms!C0Nfong!swz3cBgI3+pTFRF*XqBr0`xVNixJv{ z>pK-|z$pn1ap diff --git a/Images/Classes/Spell_Nature_Drowsy.blp b/Images/Classes/Spell_Nature_Drowsy.blp index 355c6dd59f9c946ee479bf47b2e1d48b5ff08caf..420120bfe08dadc89e9b1d32a1ce5c5f7c438037 100644 GIT binary patch literal 6660 zcmai&3se(V8h|gcu7QZqqqKBum&7)^phdze3hk)`+wPHSS5Sr|G?D;aTi{p$OB;fi zfMCl*+wv%uP^BP<34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z5;dG+4p6)%e$Y%7Zuga^cFGF&V`lN+;ciLR>G(-G_!&#rB?TDhzdgVagy&il(yrb) z8ASMOOGizRYjhLg$+gtdcQ4l#5{@m_(H7&6o*s{)Pry^t_cH{0Tlto0>wk}v?{Q&f zJwA3r@Uou<&T$4-IIFAss~KCfTtm;j5iO=AvD#;I7r|59!f^9l`L;BNH$fLHYDriY zVJasZoa!i#pnrDlX>vQUz1wLsycbv4lgEE6HkN*n#c1%iWg-{w^9^lTO-TL%obaeu -- 2.39.5 From 66931e18f96e7169c9535f8c1e1774710c08aa84 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 25 Jan 2022 20:41:32 +0100 Subject: [PATCH 085/227] fix castbar width/height being 0 on import --- Modules/Castbar.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 3bf8f65..38f0ff0 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -879,6 +879,12 @@ function Castbar:LegacySetPosition(castBar, unit, leftMargin, rightMargin) return Gladdy.db.newLayout end castBar:ClearAllPoints() + if Gladdy.db.castBarWidth <= 0 then + castBar:SetWidth(0.1) + end + if Gladdy.db.castBarHeight <= 0 then + castBar:SetHeight(0.1) + end local horizontalMargin = (Gladdy.db.highlightInset and 0 or Gladdy.db.highlightBorderSize) + Gladdy.db.padding if (Gladdy.db.castBarPos == "LEFT") then local anchor = Gladdy:GetAnchor(unit, "LEFT") -- 2.39.5 From 5ceedb53dea7fb5c2d04dac0d85a3ce718e57d4a Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 25 Jan 2022 20:42:33 +0100 Subject: [PATCH 086/227] temp fix for legacy xOffset yOffset not present --- Frame.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Frame.lua b/Frame.lua index 84f5453..2713510 100644 --- a/Frame.lua +++ b/Frame.lua @@ -369,8 +369,8 @@ function Gladdy:SetPosition(frame, unit, xOffsetDB, yOffsetDB, newLayout, module --Gladdy:Debug("INFO", name, "old X/Y:", frame:GetCenter()) local xOffset, yOffset = frame:GetLeft(), frame:GetTop() if not xOffset or not yOffset then - xOffset = frame:GetCenter() - frame:GetWidth()/2 - yOffset = select(2, frame:GetCenter()) + frame:GetHeight()/2 + xOffset = frame:GetCenter()-- - frame:GetWidth()/2 + yOffset = select(2, frame:GetCenter())-- + frame:GetHeight()/2 end local x,y = button.healthBar:GetLeft(), button.healthBar:GetTop() local newXOffset = math_abs(x - xOffset) * (x > xOffset and -1 or 1) -- 2.39.5 From 0b512af2b7ba5f537e8f56bf27d89db6c53bb6af Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 27 Jan 2022 01:02:31 +0100 Subject: [PATCH 087/227] cooldowns first refactor: - no more lastCooldownSpell - unused icons are in iconCache for later reuse - only create as many icons as needed - no more weired indexing - cleanup duplicate code - testmode cleanup --- Modules/Cooldowns.lua | 569 ++++++++++++++++++++---------------------- 1 file changed, 269 insertions(+), 300 deletions(-) diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 9c8b190..61ec21a 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -1,4 +1,4 @@ -local type, pairs, ipairs, ceil, tonumber, mod, tostring, upper, select = type, pairs, ipairs, ceil, tonumber, mod, tostring, string.upper, select +local type, pairs, ipairs, ceil, tonumber, mod, tostring, upper, select, tinsert, tremove = type, pairs, ipairs, ceil, tonumber, mod, tostring, string.upper, select, tinsert, tremove local GetTime = GetTime local CreateFrame = CreateFrame local RACE_ICON_TCOORDS = { @@ -74,6 +74,7 @@ local Cooldowns = Gladdy:NewModule("Cooldowns", nil, { function Cooldowns:Initialize() self.cooldownSpellIds = {} self.spellTextures = {} + self.iconCache = {} for _,spellTable in pairs(Gladdy:GetCooldownList()) do for spellId,_ in pairs(spellTable) do local spellName, _, texture = GetSpellInfo(spellId) @@ -91,6 +92,10 @@ function Cooldowns:Initialize() self:RegisterMessage("UNIT_DESTROYED") end +--------------------- +-- Frame +--------------------- + function Cooldowns:CreateFrame(unit) local button = Gladdy.buttons[unit] -- Cooldown frame @@ -99,42 +104,105 @@ function Cooldowns:CreateFrame(unit) spellCooldownFrame:SetMovable(true) spellCooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) spellCooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel) - for x = 1, 14 do - local icon = CreateFrame("Frame", nil, spellCooldownFrame) + spellCooldownFrame.icons = {} + button.spellCooldownFrame = spellCooldownFrame +end + +function Cooldowns:CreateIcon() -- returns iconFrame + local icon + if (#self.iconCache > 0) then + icon = tremove(self.iconCache, #self.iconCache) + else + icon = CreateFrame("Frame") icon:EnableMouse(false) - icon:SetFrameStrata(Gladdy.db.cooldownFrameStrata) - icon:SetFrameLevel(Gladdy.db.cooldownFrameLevel) + icon.texture = icon:CreateTexture(nil, "BACKGROUND") icon.texture:SetMask("Interface\\AddOns\\Gladdy\\Images\\mask") icon.texture:SetAllPoints(icon) icon.cooldown = CreateFrame("Cooldown", nil, icon, "CooldownFrameTemplate") icon.cooldown.noCooldownCount = true - - icon.cooldown:SetFrameStrata(Gladdy.db.cooldownFrameStrata) - icon.cooldown:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 1) icon.cooldown:SetReverse(false) icon.cooldown:SetHideCountdownNumbers(true) icon.cooldownFrame = CreateFrame("Frame", nil, icon) icon.cooldownFrame:ClearAllPoints() icon.cooldownFrame:SetAllPoints(icon) - icon.cooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) - icon.cooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 2) icon.border = icon.cooldownFrame:CreateTexture(nil, "OVERLAY") icon.border:SetAllPoints(icon) - icon.border:SetTexture(Gladdy.db.cooldownBorderStyle) - icon.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.cooldownBorderColor)) icon.cooldownFont = icon.cooldownFrame:CreateFontString(nil, "OVERLAY") - icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 2 * Gladdy.db.cooldownFontScale, "OUTLINE") - icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor)) icon.cooldownFont:SetAllPoints(icon) - spellCooldownFrame["icon" .. x] = icon + self:UpdateIcon(icon) + end + return icon +end + +function Cooldowns:UpdateIcon(icon) + icon:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + icon:SetFrameLevel(Gladdy.db.cooldownFrameLevel) + icon.cooldown:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + icon.cooldown:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 1) + icon.cooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) + icon.cooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 2) + + icon:SetHeight(Gladdy.db.cooldownSize) + icon:SetWidth(Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor) + icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 2 * Gladdy.db.cooldownFontScale, "OUTLINE") + icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor)) + + icon.cooldown:SetWidth(icon:GetWidth() - icon:GetWidth()/16) + icon.cooldown:SetHeight(icon:GetHeight() - icon:GetHeight()/16) + icon.cooldown:ClearAllPoints() + icon.cooldown:SetPoint("CENTER", icon, "CENTER") + icon.cooldown:SetAlpha(Gladdy.db.cooldownCooldownAlpha) + + icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), (icon:GetWidth()/2 - 1) * Gladdy.db.cooldownFontScale, "OUTLINE") + icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor)) + + icon.border:SetTexture(Gladdy.db.cooldownBorderStyle) + icon.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.cooldownBorderColor)) +end + +function Cooldowns:IconsSetPoint(button) + for i,icon in ipairs(button.spellCooldownFrame.icons) do + icon:SetParent(button.spellCooldownFrame) + icon:ClearAllPoints() + if (Gladdy.db.cooldownXGrowDirection == "LEFT") then + if (i == 1) then + icon:SetPoint("LEFT", button.spellCooldownFrame, "LEFT", 0, 0) + elseif (mod(i-1,Gladdy.db.cooldownMaxIconsPerLine) == 0) then + if (Gladdy.db.cooldownYGrowDirection == "DOWN") then + icon:SetPoint("TOP", button.spellCooldownFrame.icons[i-Gladdy.db.cooldownMaxIconsPerLine], "BOTTOM", 0, -Gladdy.db.cooldownIconPadding) + else + icon:SetPoint("BOTTOM", button.spellCooldownFrame.icons[i-Gladdy.db.cooldownMaxIconsPerLine], "TOP", 0, Gladdy.db.cooldownIconPadding) + end + else + icon:SetPoint("RIGHT", button.spellCooldownFrame.icons[i-1], "LEFT", -Gladdy.db.cooldownIconPadding, 0) + end + end + if (Gladdy.db.cooldownXGrowDirection == "RIGHT") then + if (i == 1) then + icon:SetPoint("LEFT", button.spellCooldownFrame, "LEFT", 0, 0) + elseif (mod(i-1,Gladdy.db.cooldownMaxIconsPerLine) == 0) then + if (Gladdy.db.cooldownYGrowDirection == "DOWN") then + icon:SetPoint("TOP", button.spellCooldownFrame.icons[i-Gladdy.db.cooldownMaxIconsPerLine], "BOTTOM", 0, -Gladdy.db.cooldownIconPadding) + else + icon:SetPoint("BOTTOM", button.spellCooldownFrame.icons[i-Gladdy.db.cooldownMaxIconsPerLine], "TOP", 0, Gladdy.db.cooldownIconPadding) + end + else + icon:SetPoint("LEFT", button.spellCooldownFrame.icons[i-1], "RIGHT", Gladdy.db.cooldownIconPadding, 0) + end + end + end +end + +function Cooldowns:UpdateFrameOnce() + for _,icon in ipairs(self.iconCache) do + Cooldowns:UpdateIcon(icon) end - button.spellCooldownFrame = spellCooldownFrame end function Cooldowns:UpdateFrame(unit) @@ -145,7 +213,6 @@ function Cooldowns:UpdateFrame(unit) button.spellCooldownFrame:SetWidth(1) button.spellCooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) button.spellCooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel) - button.spellCooldownFrame:Show() Gladdy:SetPosition(button.spellCooldownFrame, unit, "cooldownXOffset", "cooldownYOffset", Cooldowns:LegacySetPosition(button, unit), Cooldowns) @@ -155,92 +222,65 @@ function Cooldowns:UpdateFrame(unit) Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor, Gladdy.db.cooldownSize, 0, 0, "cooldown") end -- Update each cooldown icon - local o = 1 - for j = 1, 14 do - local icon = button.spellCooldownFrame["icon" .. j] - - icon:SetFrameStrata(Gladdy.db.cooldownFrameStrata) - icon:SetFrameLevel(Gladdy.db.cooldownFrameLevel) - icon.cooldown:SetFrameStrata(Gladdy.db.cooldownFrameStrata) - icon.cooldown:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 1) - icon.cooldownFrame:SetFrameStrata(Gladdy.db.cooldownFrameStrata) - icon.cooldownFrame:SetFrameLevel(Gladdy.db.cooldownFrameLevel + 2) - - icon:SetHeight(Gladdy.db.cooldownSize) - icon:SetWidth(Gladdy.db.cooldownSize * Gladdy.db.cooldownWidthFactor) - icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), Gladdy.db.cooldownSize / 2 * Gladdy.db.cooldownFontScale, "OUTLINE") - icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor)) - icon:ClearAllPoints() - if (Gladdy.db.cooldownXGrowDirection == "LEFT") then - if (j == 1) then - icon:SetPoint("LEFT", button.spellCooldownFrame, "LEFT", 0, 0) - elseif (mod(j-1,Gladdy.db.cooldownMaxIconsPerLine) == 0) then - if (Gladdy.db.cooldownYGrowDirection == "DOWN") then - icon:SetPoint("TOP", button.spellCooldownFrame["icon" .. o], "BOTTOM", 0, -Gladdy.db.cooldownIconPadding) - else - icon:SetPoint("BOTTOM", button.spellCooldownFrame["icon" .. o], "TOP", 0, Gladdy.db.cooldownIconPadding) - end - o = o + tonumber(Gladdy.db.cooldownMaxIconsPerLine) - else - icon:SetPoint("RIGHT", button.spellCooldownFrame["icon" .. j - 1], "LEFT", -Gladdy.db.cooldownIconPadding, 0) - end - end - if (Gladdy.db.cooldownXGrowDirection == "RIGHT") then - if (j == 1) then - icon:SetPoint("LEFT", button.spellCooldownFrame, "LEFT", 0, 0) - elseif (mod(j-1,Gladdy.db.cooldownMaxIconsPerLine) == 0) then - if (Gladdy.db.cooldownYGrowDirection == "DOWN") then - icon:SetPoint("TOP", button.spellCooldownFrame["icon" .. o], "BOTTOM", 0, -Gladdy.db.cooldownIconPadding) - else - icon:SetPoint("BOTTOM", button.spellCooldownFrame["icon" .. o], "TOP", 0, Gladdy.db.cooldownIconPadding) - end - o = o + tonumber(Gladdy.db.cooldownMaxIconsPerLine) - else - icon:SetPoint("LEFT", button.spellCooldownFrame["icon" .. j - 1], "RIGHT", Gladdy.db.cooldownIconPadding, 0) - end - end - - if (icon.active) then - icon.active = false - icon.cooldown:SetCooldown(GetTime(), 0) - icon.cooldownFont:SetText("") - icon:SetScript("OnUpdate", nil) - end - icon.spellId = nil - icon:SetAlpha(1) - icon.texture:SetTexture("Interface\\Icons\\Spell_Holy_PainSupression") - - icon.cooldown:SetWidth(icon:GetWidth() - icon:GetWidth()/16) - icon.cooldown:SetHeight(icon:GetHeight() - icon:GetHeight()/16) - icon.cooldown:ClearAllPoints() - icon.cooldown:SetPoint("CENTER", icon, "CENTER") - icon.cooldown:SetAlpha(Gladdy.db.cooldownCooldownAlpha) - - icon.cooldownFont:SetFont(Gladdy:SMFetch("font", "cooldownFont"), (icon:GetWidth()/2 - 1) * Gladdy.db.cooldownFontScale, "OUTLINE") - icon.cooldownFont:SetTextColor(Gladdy:SetColor(Gladdy.db.cooldownFontColor)) - - icon.border:SetTexture(Gladdy.db.cooldownBorderStyle) - icon.border:SetVertexColor(Gladdy:SetColor(Gladdy.db.cooldownBorderColor)) - icon:Hide() + for _,icon in pairs(button.spellCooldownFrame.icons) do + self:UpdateIcon(icon) end + self:IconsSetPoint(button) button.spellCooldownFrame:Show() else button.spellCooldownFrame:Hide() end - if (Gladdy.frame.testing) then - self:Test(unit) +end + +function Cooldowns:ResetUnit(unit) + local button = Gladdy.buttons[unit] + if not button then + return + end + for i=#button.spellCooldownFrame.icons,1,-1 do + self:ClearIcon(button, i) end end +function Cooldowns:ClearIcon(button, index, spellId, icon) + if index then + icon = tremove(button.spellCooldownFrame.icons, index) + else + for i=#button.spellCooldownFrame.icons,1,-1 do + if icon then + if button.spellCooldownFrame.icons[i] == icon then + icon = tremove(button.spellCooldownFrame.icons, index) + end + end + if not icon and spellId then + if button.spellCooldownFrame.icons[i].spellId == spellId then + icon = tremove(button.spellCooldownFrame.icons, index) + end + end + end + end + icon:ClearAllPoints() + icon:SetParent(nil) + icon:Hide() + icon.spellId = nil + icon.active = false + icon.cooldown:Hide() + icon.cooldownFont:SetText("") + icon:SetScript("OnUpdate", nil) + tinsert(self.iconCache, icon) +end + +--------------------- +-- Test +--------------------- + function Cooldowns:Test(unit) local button = Gladdy.buttons[unit] if Gladdy.db.cooldown then button.spellCooldownFrame:Show() - button.lastCooldownSpell = 1 self:UpdateTestCooldowns(unit) else button.spellCooldownFrame:Hide() - button.lastCooldownSpell = 1 self:UpdateTestCooldowns(unit) end @@ -250,11 +290,9 @@ function Cooldowns:UpdateTestCooldowns(unit) local button = Gladdy.buttons[unit] if (button.testSpec and button.testSpec == Gladdy.testData[unit].testSpec) then - button.lastCooldownSpell = 1 self:UpdateCooldowns(button) button.spec = nil self:DetectSpec(unit, button.testSpec) - button.test = true -- use class spells for spellId,_ in pairs(Gladdy:GetCooldownList()[button.class]) do @@ -267,6 +305,10 @@ function Cooldowns:UpdateTestCooldowns(unit) end end +--------------------- +-- Events +--------------------- + function Cooldowns:ENEMY_SPOTTED(unit) self:UpdateCooldowns(Gladdy.buttons[unit]) end @@ -275,18 +317,25 @@ function Cooldowns:SPEC_DETECTED(unit, spec) self:DetectSpec(unit, spec) end +function Cooldowns:UNIT_DESTROYED(unit) + +end + +--------------------- +-- Cooldown Start/Ready +--------------------- + function Cooldowns:CooldownStart(button, spellId, duration, start) -- starts timer frame if not duration or duration == nil or type(duration) ~= "number" then return end - for i = 1, button.lastCooldownSpell + 1 do - if (button.spellCooldownFrame["icon" .. i].spellId == spellId) then - local frame = button.spellCooldownFrame["icon" .. i] - frame.active = true - frame.timeLeft = start and start - GetTime() + duration or duration - if (not Gladdy.db.cooldownDisableCircle) then frame.cooldown:SetCooldown(start or GetTime(), duration) end - frame:SetScript("OnUpdate", function(self, elapsed) + for _,icon in pairs(button.spellCooldownFrame.icons) do + if (icon.spellId == spellId) then + icon.active = true + icon.timeLeft = start and start - GetTime() + duration or duration + if (not Gladdy.db.cooldownDisableCircle) then icon.cooldown:SetCooldown(start or GetTime(), duration) end + icon:SetScript("OnUpdate", function(self, elapsed) self.timeLeft = self.timeLeft - elapsed local timeLeft = ceil(self.timeLeft) if timeLeft >= 540 then @@ -298,26 +347,25 @@ function Cooldowns:CooldownStart(button, spellId, duration, start) end Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 0) if (self.timeLeft <= 0) then - Cooldowns:CooldownReady(button, spellId, frame) + Cooldowns:CooldownReady(button, spellId, icon) end if (self.timeLeft <= 0) then - Cooldowns:CooldownReady(button, spellId, frame) + Cooldowns:CooldownReady(button, spellId, icon) end end) + --C_VoiceChat.SpeakText(2, GetSpellInfo(spellId), 3, 4, 100) end end end function Cooldowns:CooldownReady(button, spellId, frame) if (frame == false) then - for i = 1, button.lastCooldownSpell do - frame = button.spellCooldownFrame["icon" .. i] - - if (frame.spellId == spellId) then - frame.active = false - frame.cooldown:Hide() - frame.cooldownFont:SetText("") - frame:SetScript("OnUpdate", nil) + for _,icon in pairs(button.spellCooldownFrame.icons) do + if (icon.spellId == spellId) then + icon.active = false + icon.cooldown:Hide() + icon.cooldownFont:SetText("") + icon:SetScript("OnUpdate", nil) end end else @@ -328,175 +376,6 @@ function Cooldowns:CooldownReady(button, spellId, frame) end end -local function notIn(spec, list) - for _,v in ipairs(list) do - if spec == v then - return false - end - end - return true -end - -function Cooldowns:DetectSpec(unit, spec) - - local button = Gladdy.buttons[unit] - if (not button or not spec or button.spec) then - return - end - if button.class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) - or button.class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) - or button.class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) - or button.class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) - or button.class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) - or button.class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) - or button.class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) - or button.class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) - or button.class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then - return - end - - button.spec = spec - if not button.test then - Gladdy:SendMessage("UNIT_SPEC", unit, spec) - end - - - -- update cooldown tracker - --[[ - All of this could possibly be handled in a "once they're used, they show up"-manner - but I PERSONALLY prefer it this way. It also meant less work and makes spec-specific cooldowns easier - ]] - if (Gladdy.db.cooldown) then - local class = Gladdy.buttons[unit].class - for k, v in pairs(Gladdy:GetCooldownList()[class]) do - if Gladdy.db.cooldownCooldowns[tostring(k)] then - --if (self.db.cooldownList[k] ~= false and self.db.cooldownList[class] ~= false) then - if (type(v) == "table" and ((v.spec ~= nil and v.spec == spec) or (v.notSpec ~= nil and v.notSpec ~= spec))) then - local sharedCD = false - if (type(v) == "table" and v.sharedCD ~= nil and v.sharedCD.cd == nil) then - for spellId, _ in pairs(v.sharedCD) do - for i = 1, button.lastCooldownSpell do - local icon = button.spellCooldownFrame["icon" .. i] - if (icon.spellId == spellId) then - sharedCD = true - end - end - end - end - if sharedCD then - return - end - - local icon = button.spellCooldownFrame["icon" .. button.lastCooldownSpell] - icon:Show() - icon.texture:SetTexture(self.spellTextures[k]) - icon.spellId = k - button.spellCooldownFrame["icon" .. button.lastCooldownSpell] = icon - button.lastCooldownSpell = button.lastCooldownSpell + 1 - end - end - end - end - ---------------------- - --- RACE FUNCTIONALITY - ---------------------- - local race = Gladdy.buttons[unit].race - if Gladdy:GetCooldownList()[race] then - for k, v in pairs(Gladdy:GetCooldownList()[race]) do - if Gladdy.db.cooldownCooldowns[tostring(k)] then - --if (self.db.cooldownList[k] ~= false and self.db.cooldownList[class] ~= false) then - if (type(v) == "table" and ((v.spec ~= nil and v.spec == spec) or (v.notSpec ~= nil and v.notSpec ~= spec))) then - local sharedCD = false - if (type(v) == "table" and v.sharedCD ~= nil and v.sharedCD.cd == nil) then - for spellId, _ in pairs(v.sharedCD) do - for i = 1, button.lastCooldownSpell do - local icon = button.spellCooldownFrame["icon" .. i] - if (icon.spellId == spellId) then - sharedCD = true - end - end - end - end - if sharedCD then - return - end - - local icon = button.spellCooldownFrame["icon" .. button.lastCooldownSpell] - icon:Show() - icon.texture:SetTexture(self.spellTextures[k]) - icon.spellId = k - button.spellCooldownFrame["icon" .. button.lastCooldownSpell] = icon - button.lastCooldownSpell = button.lastCooldownSpell + 1 - end - end - end - end -end - -function Cooldowns:ResetUnit(unit) - Gladdy.buttons[unit].lastCooldownSpell = nil - Gladdy.buttons[unit].test = nil -end - -function Cooldowns:UNIT_DESTROYED(unit) - -end - -function Cooldowns:UpdateCooldowns(button) - local class = button.class - local race = button.race - if ( not button.lastCooldownSpell) then - button.lastCooldownSpell = 1 - end - - if (Gladdy.db.cooldown) then - for k, v in pairs(Gladdy:GetCooldownList()[class]) do - if Gladdy.db.cooldownCooldowns[tostring(k)] then - if (type(v) ~= "table" or (type(v) == "table" and v.spec == nil and v.notSpec == nil)) then - -- see if we have shared cooldowns without a cooldown defined - -- e.g. hunter traps have shared cooldowns, so only display one trap instead all of them - local sharedCD = false - if (type(v) == "table" and v.sharedCD ~= nil and v.sharedCD.cd == nil) then - for spellId, _ in pairs(v.sharedCD) do - for i = 1, button.lastCooldownSpell do - local icon = button.spellCooldownFrame["icon" .. i] - if (icon.spellId == spellId) then - sharedCD = true - end - end - end - end - - if (not sharedCD) then - local icon = button.spellCooldownFrame["icon" .. button.lastCooldownSpell] - icon:Show() - icon.spellId = k - icon.texture:SetTexture(self.spellTextures[k]) - button.spellCooldownFrame["icon" .. button.lastCooldownSpell] = icon - button.lastCooldownSpell = button.lastCooldownSpell + 1 - end - end - end - end - ---- - -- RACE FUNCTIONALITY - ---- - - for k, v in pairs(Gladdy:GetCooldownList()[race]) do - if Gladdy.db.cooldownCooldowns[tostring(k)] then - if (type(v) ~= "table" or (type(v) == "table" and v.spec == nil and v.notSpec == nil)) then - local icon = button.spellCooldownFrame["icon" .. button.lastCooldownSpell] - icon:Show() - icon.spellId = k - icon.texture:SetTexture(self.spellTextures[k]) - button.spellCooldownFrame["icon" .. button.lastCooldownSpell] = icon - button.lastCooldownSpell = button.lastCooldownSpell + 1 - end - end - end - end -end - function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSeconds) local button = Gladdy.buttons[unit] if not button then @@ -535,8 +414,7 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSecond for spellID,_ in pairs(cooldown.sharedCD) do if (spellID ~= "cd") then local skip = false - for i = 1, button.lastCooldownSpell do - local icon = button.spellCooldownFrame["icon" .. i] + for _,icon in pairs(button.spellCooldownFrame.icons) do if (icon.spellId == spellID and icon.active and icon.timeLeft > sharedCD) then skip = true break @@ -566,6 +444,119 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSecond end ]] end +--------------------- +-- Detect Spec +--------------------- + +local function notIn(spec, list) + for _,v in ipairs(list) do + if spec == v then + return false + end + end + return true +end + +function Cooldowns:DetectSpec(unit, spec) + local button = Gladdy.buttons[unit] + if (not button or not spec or button.spec) then + return + end + if button.class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) + or button.class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) + or button.class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) + or button.class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) + or button.class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) + or button.class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) + or button.class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) + or button.class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) + or button.class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then + return + end + if not button.spec then + button.spec = spec + Gladdy:SendMessage("UNIT_SPEC", unit, spec) + Cooldowns:UpdateCooldowns(button) + end +end + +function Cooldowns:AddCooldown(spellID, value, button) + -- see if we have shared cooldowns without a cooldown defined + -- e.g. hunter traps have shared cooldowns, so only display one trap instead all of them + local sharedCD = false + if (type(value) == "table" and value.sharedCD ~= nil and value.sharedCD.cd == nil) then + for spellId, _ in pairs(value.sharedCD) do + for _,icon in pairs(button.spellCooldownFrame.icons) do + if (icon.spellId == spellId) then + sharedCD = true + end + end + end + end + for _,icon in pairs(button.spellCooldownFrame.icons) do + if (icon and icon.spellId == spellID) then + sharedCD = true + end + end + if (not sharedCD) then + local icon = self:CreateIcon() + icon:Show() + icon.spellId = spellID + icon.texture:SetTexture(self.spellTextures[spellID]) + tinsert(button.spellCooldownFrame.icons, icon) + self:IconsSetPoint(button) + Gladdy:Debug("Cooldowns:AddCooldown", button.unit, GetSpellInfo(spellID)) + end +end + +function Cooldowns:UpdateCooldowns(button) + local class = button.class + local race = button.race + local spec = button.spec + if not class or not race then + return + end + + if spec then + if class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) + or class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) + or class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) + or class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) + or class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) + or class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) + or class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) + or class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) + or class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then + return + end + end + + for k, v in pairs(Gladdy:GetCooldownList()[class]) do + if Gladdy.db.cooldownCooldowns[tostring(k)] then + if (type(v) ~= "table" or (type(v) == "table" and v.spec == nil)) then + Cooldowns:AddCooldown(k, v, button) + end + if (type(v) == "table" and v.spec ~= nil and v.spec == spec) then + Cooldowns:AddCooldown(k, v, button) + end + end + end + for k, v in pairs(Gladdy:GetCooldownList()[button.race]) do + if Gladdy.db.cooldownCooldowns[tostring(k)] then + if (type(v) ~= "table" or (type(v) == "table" and v.spec == nil)) then + Cooldowns:AddCooldown(k, v, button) + end + if (type(v) == "table" and v.spec ~= nil and v.spec == spec) then + Cooldowns:AddCooldown(k, v, button) + end + end + end +end + +--------------------- +-- Options +--------------------- + function Cooldowns:GetOptions() return { headerCooldown = { @@ -900,28 +891,6 @@ function Cooldowns:GetCooldownOptions() return group end -function Gladdy:UpdateTestCooldowns(i) - local unit = "arena" .. i - local button = Gladdy.buttons[unit] - - if (button.testSpec and button.testSpec == Gladdy.testData[unit].testSpec) then - button.lastCooldownSpell = 1 - Cooldowns:UpdateCooldowns(button) - button.spec = nil - Cooldowns:DetectSpec(unit, button.testSpec) - - -- use class spells - for spellID,_ in pairs(Gladdy:GetCooldownList()[button.class]) do - --k is spellId - Cooldowns:CooldownUsed(unit, button.class, spellID) - end - -- use race spells - for spellID,_ in pairs(Gladdy:GetCooldownList()[button.race]) do - Cooldowns:CooldownUsed(unit, button.race, spellID) - end - end -end - --------------------------- -- LAGACY HANDLER -- 2.39.5 From 23729f5960e7b3c45c5278d0ec037895d534300e Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 27 Jan 2022 01:30:28 +0100 Subject: [PATCH 088/227] move DetectSpec to EventListener --- EventListener.lua | 64 +++++++++++++++++++++++++-------- Modules/Cooldowns.lua | 84 ++++++++++--------------------------------- 2 files changed, 67 insertions(+), 81 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 4d97d35..c7f2172 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -1,4 +1,4 @@ -local select, string_gsub, tostring, pairs = select, string.gsub, tostring, pairs +local select, string_gsub, tostring, pairs, ipairs = select, string.gsub, tostring, pairs, ipairs local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo local AURA_TYPE_DEBUFF = AURA_TYPE_DEBUFF @@ -11,10 +11,11 @@ local FindAuraByName = AuraUtil.FindAuraByName local GetTime = GetTime local Gladdy = LibStub("Gladdy") +local L = Gladdy.L local Cooldowns = Gladdy.modules["Cooldowns"] local Diminishings = Gladdy.modules["Diminishings"] -local EventListener = Gladdy:NewModule("EventListener", nil, { +local EventListener = Gladdy:NewModule("EventListener", 100, { test = true, }) @@ -51,12 +52,6 @@ function EventListener:Reset() self:SetScript("OnEvent", nil) end -function Gladdy:DetectSpec(unit, spec) - if spec then - self.modules["Cooldowns"]:DetectSpec(unit, spec) - end -end - function Gladdy:SpotEnemy(unit, auraScan) local button = self.buttons[unit] if not unit or not button then @@ -92,7 +87,7 @@ function Gladdy:SpotEnemy(unit, auraScan) if Gladdy.specBuffs[spellName] then -- Check for auras that detect a spec local unitPet = string_gsub(unit, "%d$", "pet%1") if UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster) then - Gladdy:DetectSpec(unit, Gladdy.specBuffs[spellName]) + EventListener:DetectSpec(unit, Gladdy.specBuffs[spellName]) end end end @@ -144,7 +139,7 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() unitClass = Gladdy.buttons[srcUnit].race end Cooldowns:CooldownUsed(srcUnit, unitClass, spellId) - Gladdy:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) + self:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) end end @@ -157,7 +152,7 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() Gladdy:SpotEnemy(srcUnit, true) end if not Gladdy.buttons[srcUnit].spec then - Gladdy:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) + self:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) end end end @@ -255,7 +250,7 @@ function EventListener:UNIT_AURA(unit) if not button.spec and Gladdy.specBuffs[spellName] then local unitPet = string_gsub(unit, "%d$", "pet%1") if unitCaster and (UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster)) then - Gladdy:DetectSpec(unit, Gladdy.specBuffs[spellName]) + self:DetectSpec(unit, Gladdy.specBuffs[spellName]) end end if Gladdy.exceptionNames[spellID] then @@ -271,7 +266,7 @@ function EventListener:UNIT_SPELLCAST_START(unit) if Gladdy.buttons[unit] then local spellName = UnitCastingInfo(unit) if Gladdy.specSpells[spellName] and not Gladdy.buttons[unit].spec then - Gladdy:DetectSpec(unit, Gladdy.specSpells[spellName]) + self:DetectSpec(unit, Gladdy.specSpells[spellName]) end end end @@ -280,7 +275,7 @@ function EventListener:UNIT_SPELLCAST_CHANNEL_START(unit) if Gladdy.buttons[unit] then local spellName = UnitChannelInfo(unit) if Gladdy.specSpells[spellName] and not Gladdy.buttons[unit].spec then - Gladdy:DetectSpec(unit, Gladdy.specSpells[spellName]) + self:DetectSpec(unit, Gladdy.specSpells[spellName]) end end end @@ -289,7 +284,46 @@ function EventListener:UNIT_SPELLCAST_SUCCEEDED(unit) if Gladdy.buttons[unit] then local spellName = UnitCastingInfo(unit) if Gladdy.specSpells[spellName] and not Gladdy.buttons[unit].spec then - Gladdy:DetectSpec(unit, Gladdy.specSpells[spellName]) + self:DetectSpec(unit, Gladdy.specSpells[spellName]) end end end + +local function notIn(spec, list) + for _,v in ipairs(list) do + if spec == v then + return false + end + end + return true +end + +function EventListener:DetectSpec(unit, spec) + local button = Gladdy.buttons[unit] + if (not button or not spec or button.spec) then + return + end + if button.class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) + or button.class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) + or button.class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) + or button.class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) + or button.class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) + or button.class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) + or button.class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) + or button.class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) + or button.class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then + return + end + if not button.spec then + button.spec = spec + Gladdy:SendMessage("UNIT_SPEC", unit, spec) + end +end + +function EventListener:Test(unit) + local button = Gladdy.buttons[unit] + if (Gladdy.testData[unit].testSpec) then + button.spec = nil + self:DetectSpec(unit, button.testSpec) + end +end diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 61ec21a..64ccdfb 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -278,30 +278,22 @@ function Cooldowns:Test(unit) local button = Gladdy.buttons[unit] if Gladdy.db.cooldown then button.spellCooldownFrame:Show() - self:UpdateTestCooldowns(unit) else button.spellCooldownFrame:Hide() - self:UpdateTestCooldowns(unit) end - + self:UpdateTestCooldowns(unit) end function Cooldowns:UpdateTestCooldowns(unit) local button = Gladdy.buttons[unit] - - if (button.testSpec and button.testSpec == Gladdy.testData[unit].testSpec) then - self:UpdateCooldowns(button) - button.spec = nil - self:DetectSpec(unit, button.testSpec) - - -- use class spells - for spellId,_ in pairs(Gladdy:GetCooldownList()[button.class]) do - self:CooldownUsed(unit, button.class, spellId) - end - -- use race spells - for spellId,_ in pairs(Gladdy:GetCooldownList()[button.race]) do - self:CooldownUsed(unit, button.race, spellId) - end + self:UpdateCooldowns(button) + -- use class spells + for spellId,_ in pairs(Gladdy:GetCooldownList()[button.class]) do + self:CooldownUsed(unit, button.class, spellId) + end + -- use race spells + for spellId,_ in pairs(Gladdy:GetCooldownList()[button.race]) do + self:CooldownUsed(unit, button.race, spellId) end end @@ -310,11 +302,17 @@ end --------------------- function Cooldowns:ENEMY_SPOTTED(unit) + if (not Gladdy.buttons[unit]) then + return + end self:UpdateCooldowns(Gladdy.buttons[unit]) end -function Cooldowns:SPEC_DETECTED(unit, spec) - self:DetectSpec(unit, spec) +function Cooldowns:SPEC_DETECTED(unit) + if (not Gladdy.buttons[unit]) then + return + end + self:UpdateCooldowns(Gladdy.buttons[unit]) end function Cooldowns:UNIT_DESTROYED(unit) @@ -445,41 +443,9 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSecond end --------------------- --- Detect Spec +-- Update Cooldowns --------------------- -local function notIn(spec, list) - for _,v in ipairs(list) do - if spec == v then - return false - end - end - return true -end - -function Cooldowns:DetectSpec(unit, spec) - local button = Gladdy.buttons[unit] - if (not button or not spec or button.spec) then - return - end - if button.class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) - or button.class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) - or button.class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) - or button.class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) - or button.class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) - or button.class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) - or button.class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) - or button.class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) - or button.class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then - return - end - if not button.spec then - button.spec = spec - Gladdy:SendMessage("UNIT_SPEC", unit, spec) - Cooldowns:UpdateCooldowns(button) - end -end - function Cooldowns:AddCooldown(spellID, value, button) -- see if we have shared cooldowns without a cooldown defined -- e.g. hunter traps have shared cooldowns, so only display one trap instead all of them @@ -517,20 +483,6 @@ function Cooldowns:UpdateCooldowns(button) return end - if spec then - if class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) - or class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) - or class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) - or class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) - or class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) - or class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) - or class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) - or class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) - or class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then - return - end - end - for k, v in pairs(Gladdy:GetCooldownList()[class]) do if Gladdy.db.cooldownCooldowns[tostring(k)] then if (type(v) ~= "table" or (type(v) == "table" and v.spec == nil)) then -- 2.39.5 From ce3812d2341e6d74ed13ae94c738bf98385ee6a9 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 27 Jan 2022 01:51:02 +0100 Subject: [PATCH 089/227] improve warrior icon --- Images/Classes/INV_Sword_27.blp | Bin 6660 -> 6660 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Images/Classes/INV_Sword_27.blp b/Images/Classes/INV_Sword_27.blp index eea39b6e845a50ec28eeb5b8da7591bcee74aac2..c9249b6fa650a63e3c04ab7e646c669d247b2b95 100644 GIT binary patch delta 1943 zcmah}TTE0}6y5UxE(`<1d!|sG8yw5<2sV|3X&VZ}+Jb3fTC-EpAvI+idK5X?gjpr&<$!e3pdm~-hF7UI!+(LPmL>|-JYu$=v446}YRrb#cl zq>3%M_m}KILun)g`2dx2maEV563c9jmz^54a-N%9jps&2f>F9UIoaIf&sL6m5+2M} zD3Uwh%lVb9+%YX1h&dimgifksH^V8f%)He6NK3ip_hm-oh^~&>nuxo|@&ihqZMcm0 z?ljS(X?297@pJ^6%{$dPe_+aCy^eXoB&a9#Pq&rpA=g6i6abqvaC?IBc^~Mz#qiD$ zSTb{1RLJ@L!v2{3@J_jHClMTERFB`Hy z$SOpmn)O@WU~=22d=_|c5cS=ZBEKA8hKl*&zGfV~jQ?~lh@BakpE15zII8oa9Bs0O z_O)xp*crg5nz95*lA@+$%Xqdo6C{;74|QvckWahDVH^}e0#M2r8wXVsckzT$cXFIA z^OxalSsyAhV)`lsDYGt=F1!{nY&`}*3~b{Dq)rhmfi*QsKMnq^8C~!jN;u={FvaCd z5?1<1on|N~-@l*FooUVzYDl0q|8#WS&wwWUzw#HMf&^*`m{*$tH446PU>Pn-t`Y&Y z1~v|V}Nzl0D^_(hQ@5< zoi8)UFxnRxwPr2d4_>zdY$HDkSQx+yWaLaUfb01CJ5XC>db**ZBg`4(e!{nHnbj9d zSf%E;bTXw%!cf-_Scm&D9&Q3CtNjI|$S8Z*xM(p|SHH89lMkaWqV^iwt@Uu?#F0Zh zd-SHCNs`=YXkD~jczETAm=@)hP#XajG4VOOeb+9uF2*j zT|XRt5#Z>J_jcUJ>~oWi=`T=~zkNFw=!-=Fx7)>W>Fkz7Y|(#$Gw>wMl}=u@I`T^L zc|8~1F{VZ~zLF)(-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 14:00:59 +0100 Subject: [PATCH 090/227] Anouncements + Gladdy RegisterMessages --- EventListener.lua | 4 ++-- Gladdy.lua | 12 ++++++++++ Modules/Announcements.lua | 50 +++++++++++++++++++++++---------------- Modules/Auras.lua | 2 +- 4 files changed, 45 insertions(+), 23 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index c7f2172..0086627 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -15,7 +15,7 @@ local L = Gladdy.L local Cooldowns = Gladdy.modules["Cooldowns"] local Diminishings = Gladdy.modules["Diminishings"] -local EventListener = Gladdy:NewModule("EventListener", 100, { +local EventListener = Gladdy:NewModule("EventListener", 10, { test = true, }) @@ -214,6 +214,7 @@ Gladdy.exceptionNames = { -- TODO MOVE ME TO CLASSBUFFS LIB Gladdy.cooldownBuffs = { [GetSpellInfo(6346)] = { cd = 180, spellId = 6346 }, -- Fear Ward + -- TODO sprint, shadowstep racials = { [GetSpellInfo(20600)] = { cd = 180, spellId = 20600 }, -- Perception } @@ -257,7 +258,6 @@ function EventListener:UNIT_AURA(unit) spellName = Gladdy.exceptionNames[spellID] end Gladdy:SendMessage("AURA_GAIN", unit, auraType, spellID, spellName, texture, duration, expirationTime, count, debuffType, i) - Gladdy:Call("Announcements", "CheckDrink", unit, spellName) end end end diff --git a/Gladdy.lua b/Gladdy.lua index 32fb1e3..63c5d17 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -187,6 +187,12 @@ function Gladdy:NewModule(name, priority, defaults) module.defaults = defaults or {} module.messages = {} + module.RegisterMessages = function(self, ...) + for _,message in pairs({...}) do + self.messages[message] = message + end + end + module.RegisterMessage = function(self, message, func) self.messages[message] = func or message end @@ -195,6 +201,12 @@ function Gladdy:NewModule(name, priority, defaults) self.messages[message] = nil end + module.UnregisterMessages = function(self, ...) + for _,message in pairs({...}) do + self.messages[message] = nil + end + end + module.UnregisterAllMessages = function(self) for msg,_ in pairs(self.messages) do self.messages[msg] = nil diff --git a/Modules/Announcements.lua b/Modules/Announcements.lua index 27de5f1..5cb0066 100644 --- a/Modules/Announcements.lua +++ b/Modules/Announcements.lua @@ -16,7 +16,7 @@ local UnitName = UnitName local Gladdy = LibStub("Gladdy") local L = Gladdy.L -local Announcements = Gladdy:NewModule("Announcements", nil, { +local Announcements = Gladdy:NewModule("Announcements", 101, { announcements = { drinks = true, resurrections = true, @@ -42,18 +42,20 @@ function Announcements:Initialize() [GetSpellInfo(20777)] = true, } - self:RegisterMessage("CAST_START") - self:RegisterMessage("ENEMY_SPOTTED") - self:RegisterMessage("UNIT_SPEC") - self:RegisterMessage("UNIT_HEALTH") - self:RegisterMessage("TRINKET_USED") - self:RegisterMessage("TRINKET_READY") - self:RegisterMessage("SHADOWSIGHT") - self:RegisterMessage("SPELL_INTERRUPT") + self:RegisterMessage("JOINED_ARENA") end function Announcements:Reset() - self:UnregisterAllMessages() + self:UnregisterMessages( + "CAST_START", + "ENEMY_SPOTTED", + "UNIT_SPEC", + "AURA_GAIN", + "UNIT_HEALTH", + "TRINKET_USED", + "TRINKET_READY", + "SHADOWSIGHT", + "SPELL_INTERRUPT") self.enemy = {} self.throttled = {} end @@ -63,17 +65,25 @@ function Announcements:Test(unit) if (not button) then return end - - if (unit == "arena1") then - self:UNIT_SPEC(unit, button.testSpec) - elseif (unit == "arena2") then - self:CheckDrink(unit, self.DRINK_AURA) - elseif (unit == "arena3") then - self:UNIT_HEALTH(unit, button.health, button.healthMax) - self:ENEMY_SPOTTED(unit) + self:JOINED_ARENA() + if unit == "arena1" then + self:AURA_GAIN(unit, nil, nil, self.DRINK_AURA) end end +function Announcements:JOINED_ARENA() + self:RegisterMessages( + "CAST_START", + "ENEMY_SPOTTED", + "UNIT_SPEC", + "AURA_GAIN", + "UNIT_HEALTH", + "TRINKET_USED", + "TRINKET_READY", + "SHADOWSIGHT", + "SPELL_INTERRUPT") +end + function Announcements:CAST_START(unit, spell) local button = Gladdy.buttons[unit] if (not button or not Gladdy.db.announcements.resurrections) then @@ -149,13 +159,13 @@ function Announcements:SPELL_INTERRUPT(destUnit,spellID,spellName,spellSchool,ex self:Send(L["INTERRUPTED: %s (%s)"]:format(extraSpellName, button.name or ""), nil, RAID_CLASS_COLORS[button.class]) end -function Announcements:CheckDrink(unit, aura) +function Announcements:AURA_GAIN(unit, auraType, spellID, spellName) local button = Gladdy.buttons[unit] if (not button or not Gladdy.db.announcements.drinks) then return end - if (aura == self.DRINK_AURA) then + if (spellName == self.DRINK_AURA) then self:Send(L["DRINKING: %s (%s)"]:format(button.name, button.classLoc), 3, RAID_CLASS_COLORS[button.class]) end end diff --git a/Modules/Auras.lua b/Modules/Auras.lua index 7d903e4..5d33667 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -472,7 +472,7 @@ function Auras:Test(unit) local extraSpellSchool = spellSchools[rand(1, #spellSchools)] spellid = tonumber(enabledInterrupts[rand(1, #enabledInterrupts)]) spellName = select(1, GetSpellInfo(spellid)) - self:SPELL_INTERRUPT(unit,spellid, spellName, "physical", spellid, spellName, extraSpellSchool) + Gladdy:SendMessage("SPELL_INTERRUPT", unit,spellid, spellName, "physical", spellid, spellName, extraSpellSchool) end end end -- 2.39.5 From 41b299e0b1c118846f6ec633a89cd6768335cbcf Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 5 Feb 2022 04:16:44 +0100 Subject: [PATCH 091/227] initial TotemPulse --- Modules/TotemPulse.lua | 476 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 476 insertions(+) create mode 100644 Modules/TotemPulse.lua diff --git a/Modules/TotemPulse.lua b/Modules/TotemPulse.lua new file mode 100644 index 0000000..a2a49a9 --- /dev/null +++ b/Modules/TotemPulse.lua @@ -0,0 +1,476 @@ +local C_NamePlate = C_NamePlate +local Gladdy = LibStub("Gladdy") +local L = Gladdy.L +local tremove, tinsert = tremove, tinsert +local GetSpellInfo, CreateFrame = GetSpellInfo, CreateFrame +local GetTime, GetPlayerInfoByGUID, UnitIsEnemy, UnitGUID = GetTime, GetPlayerInfoByGUID, UnitIsEnemy, UnitGUID +local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo + +local cooldowns = { + [2484] = 3, --Earthbind + [8143] = 4, -- Tremor + [8166] = 4, -- Poison Cleansing + [8170] = 4, -- Disease Cleansing + [1535] = { cd = 4, once = true }, -- Fire Nova 1 + [8498] = { cd = 4, once = true }, -- Fire Nova 2 + [8499] = { cd = 4, once = true }, -- Fire Nova 3 + [11314] = { cd = 4, once = true }, -- Fire Nova 4 + [11315] = { cd = 4, once = true }, -- Fire Nova 5 + [25546] = { cd = 4, once = true }, -- Fire Nova 6 + [25547] = { cd = 4, once = true }, -- Fire Nova 7 + [8190] = 2, -- Magma 1 + [10585] = 2, -- Magma 2 + [10586] = 2, -- Magma 3 + [10587] = 2, -- Magma 4 + [25552] = 2, -- Magma 5 + [5394] = 2, -- Healing Stream 1 + [6375] = 2, -- Healing Stream 2 + [6377] = 2, -- Healing Stream 3 + [10462] = 2, -- Healing Stream 4 + [10463] = 2, -- Healing Stream 5 + [25567] = 2, -- Healing Stream 6 + [5675] = 2, -- Mana Spring 1 + [10495] = 2, -- Mana Spring 2 + [10496] = 2, -- Mana Spring 3 + [10497] = 2, -- Mana Spring 4 + [25570] = 2, -- Mana Spring 5 +} + +local ninetyDegreeInRad = 90 * math.pi / 180 + +--------------------------------------------------- + +-- Core + +--------------------------------------------------- + + +local TotemPulse = Gladdy:NewModule("Totem Pulse", nil, { + totemPulseEnabled = true, + totemPulseEnabledShowFriendly = true, + totemPulseEnabledShowEnemy = true, + totemPulseAttachToTotemPlate = true, + totemPulseStyle = "", -- "COOLDOWN", "COOLDOWNREVERSE", "BARVERTICAL", "BARHORIZONTAL" + totemPulseTextColor = { r = 1, g = 1, b = 1, a = 0 }, + --bar + totemPulseBarWidth = 40, + totemPulseBarHeight = 20, + totemPulseBarColor = { r = 1, g = 0, b = 0, a = 1 }, + totemPulseBarBgColor = { r = 0, g = 1, b = 0, a = 1 }, + totemPulseBarBorderColor = { r = 0, g = 0, b = 0, a = 1 }, + totemPulseBarBorderSize = 5, + totemPulseBarBorderStyle = "Gladdy Tooltip squared", + totemPulseBarTexture = "Smooth", + --cooldown + totemPulseCooldownAlpha = 1, +}) + +function TotemPulse.OnEvent(self, event, ...) + TotemPulse[event](self, ...) +end + +function TotemPulse:Initialize() + self.cooldowns = cooldowns + self.timeStamps = {} + self.cooldownCache = {} + self.barCache = {} + self.activeFrames = { bars = {}, cooldowns = {} } + self:SetScript("OnEvent", self.OnEvent) + self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") + self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") + self:RegisterEvent("NAME_PLATE_UNIT_ADDED") + self:RegisterEvent("UNIT_NAME_UPDATE") +end + +--------------------------------------------------- + +-- EVENTS + +--------------------------------------------------- + +function TotemPulse:COMBAT_LOG_EVENT_UNFILTERED() + local _,eventType,_,sourceGUID,_,_,_,destGUID,_,_,_,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool = CombatLogGetCurrentEventInfo() + print(eventType, spellName, spellID, destGUID) + if eventType == "SPELL_SUMMON" then + if cooldowns[spellID] then + print(eventType, spellName, spellID, GetPlayerInfoByGUID(sourceGUID)) + self.timeStamps[destGUID] = { timeStamp = GetTime(), spellID = spellID } + end + elseif eventType == "UNIT_DESTROYED" then + self.timeStamps[destGUID] = nil + end +end + +function TotemPulse:NAME_PLATE_UNIT_REMOVED(unitId) + local nameplate = C_NamePlate.GetNamePlateForUnit(unitId) + if nameplate.totemTick then + print("NAME_PLATE_UNIT_REMOVED", nameplate.totemTick) + nameplate.totemTick:SetScript("OnUpdate", nil) + nameplate.totemTick:Hide() + nameplate.totemTick:SetParent(nil) + tinsert(nameplate.totemTick.bar and self.barCache or self.cooldownCache, nameplate.totemTick) + self.activeFrames.bars[nameplate.totemTick] = nil + self.activeFrames.cooldowns[nameplate.totemTick] = nil + nameplate.totemTick = nil + end +end + +function TotemPulse:NAME_PLATE_UNIT_ADDED(unitId) + self:OnUnitAdded(unitId, "NAME_PLATE_UNIT_ADDED") +end + +function TotemPulse:UNIT_NAME_UPDATE(unitId) + self:OnUnitAdded(unitId, "UNIT_NAME_UPDATE") +end + +function TotemPulse:OnUnitAdded(unitId, event) + local isEnemy = UnitIsEnemy("player", unitId) + local guid = UnitGUID(unitId) + + local nameplate = C_NamePlate.GetNamePlateForUnit(unitId) + + if nameplate then + print(event, self.timeStamps[guid], nameplate.totemTick) + if self.timeStamps[guid] then + self:AddTimerFrame(nameplate, self.timeStamps[guid], Gladdy.db.totemPulseAttachToTotemPlate and nameplate.gladdyTotemFrame) + else + if nameplate.totemTick then + nameplate.totemTick:SetScript("OnUpdate", nil) + nameplate.totemTick:Hide() + nameplate.totemTick:SetParent(nil) + tinsert(nameplate.totemTick.bar and self.barCache or self.cooldownCache, nameplate.totemTick) + self.activeFrames.bars[nameplate.totemTick] = nil + self.activeFrames.cooldowns[nameplate.totemTick] = nil + nameplate.totemTick = nil + end + end + end +end + +--------------------------------------------------- + +-- FRAMES + +--------------------------------------------------- + +function TotemPulse:CreateCooldownFrame(gladdyTotemFrame) + local totemTick + + if gladdyTotemFrame then + if #self.cooldownCache > 0 then + totemTick = tremove(self.cooldownCache, #self.cooldownCache) + else + Gladdy:Print("TotemPulse:CreateCooldownFrame()", "CreateCooldown") + totemTick = CreateFrame("Cooldown", nil, nil, "CooldownFrameTemplate") + totemTick.noCooldownCount = true + totemTick:SetFrameStrata("MEDIUM") + totemTick:SetFrameLevel(4) + totemTick:SetReverse(true) + totemTick:SetHideCountdownNumbers(true) + totemTick:SetAlpha(Gladdy.db.totemPulseCooldownAlpha) + + totemTick.text = totemTick:CreateFontString(nil, "OVERLAY") + totemTick.text:SetPoint("LEFT", totemTick, "LEFT", 4, 0) + totemTick.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") + totemTick.text:SetJustifyH("LEFT") + totemTick.text:SetShadowOffset(1, -1) + totemTick.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) + end + else + if #self.barCache > 0 then + Gladdy:Print("TotemPulse:CreateCooldownFrame()", #self.barCache) + totemTick = tremove(self.barCache, #self.barCache) + else + Gladdy:Print("TotemPulse:CreateCooldownFrame()", "CreateBar") + totemTick = CreateFrame("Frame", nil) + + totemTick:SetWidth(Gladdy.db.totemPulseBarWidth) + totemTick:SetHeight(Gladdy.db.totemPulseBarHeight) + + totemTick.backdrop = CreateFrame("Frame", nil, totemTick, BackdropTemplateMixin and "BackdropTemplate") + totemTick.backdrop:SetAllPoints(totemTick) + totemTick.backdrop:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "totemPulseBarBorderStyle"), + edgeSize = Gladdy.db.totemPulseBarBorderSize }) + totemTick.backdrop:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBorderColor)) + totemTick.backdrop:SetFrameLevel(1) + --totemTick.backdrop:SetFrameStrata(Gladdy.db.castBarFrameStrata) + --totemTick.backdrop:SetFrameLevel(Gladdy.db.castBarFrameLevel - 1) + + totemTick.bar = CreateFrame("StatusBar", nil, totemTick) + totemTick.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) + totemTick.bar:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.totemPulseBarColor)) + totemTick.bar:SetOrientation("Vertical") + totemTick.bar:SetFrameLevel(0) + totemTick.bar:SetPoint("TOPLEFT", totemTick, "TOPLEFT", (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) + totemTick.bar:SetPoint("BOTTOMRIGHT", totemTick, "BOTTOMRIGHT", -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) + + totemTick.spark = totemTick.bar:CreateTexture(nil, "OVERLAY") + totemTick.spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark") + totemTick.spark:SetBlendMode("ADD") + totemTick.spark:SetWidth(8) + totemTick.spark:SetHeight(40) + totemTick.spark.position = 0 + totemTick.spark:SetRotation(ninetyDegreeInRad) + + totemTick.bg = totemTick.bar:CreateTexture(nil, "BACKGROUND") + totemTick.bg:SetTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) + totemTick.bg:SetAllPoints(totemTick.bar) + totemTick.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBgColor)) + + totemTick.text = totemTick.bar:CreateFontString(nil, "OVERLAY") + totemTick.text:SetPoint("LEFT", totemTick, "LEFT", 4, 0) + totemTick.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") + totemTick.text:SetJustifyH("LEFT") + totemTick.text:SetShadowOffset(1, -1) + totemTick.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) + end + end + return totemTick +end + +function TotemPulse:AddTimerFrame(nameplate, timestamp, gladdyTotemFrame) + if nameplate:IsShown() and cooldowns[timestamp.spellID] then + if not nameplate.totemTick then + nameplate.totemTick = TotemPulse:CreateCooldownFrame(gladdyTotemFrame) + end + nameplate.totemTick:SetParent(nameplate) + nameplate.totemTick:ClearAllPoints() + if gladdyTotemFrame then + nameplate.totemTick:SetPoint("TOPLEFT", gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) + nameplate.totemTick:SetPoint("BOTTOMRIGHT", gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) + else + nameplate.totemTick:SetPoint("TOP", nameplate, "BOTTOM") + end + + local cd = type(cooldowns[timestamp.spellID]) == "table" and cooldowns[timestamp.spellID].cd or cooldowns[timestamp.spellID] + local once = type(cooldowns[timestamp.spellID]) == "table" + local cooldown = (timestamp.timeStamp - GetTime()) % cd + + if not gladdyTotemFrame then + nameplate.totemTick.bar:SetMinMaxValues(0, cd) + nameplate.totemTick.bar:SetValue(cooldown) + self.activeFrames.bars[nameplate.totemTick] = nameplate.totemTick + else + self.activeFrames.cooldowns[nameplate.totemTick] = nameplate.totemTick + end + + nameplate.totemTick.timestamp = timestamp.timeStamp + nameplate.totemTick.maxValue = cd + nameplate.totemTick.value = cooldown + nameplate.totemTick.once = once + + print("once", once, " - totemTick.once", nameplate.totemTick.once, " - cd off", math.abs(timestamp.timeStamp - GetTime()) > cd) + if once and GetTime() - timestamp.timeStamp > cd then + nameplate.totemTick:SetScript("OnUpdate", nil) + nameplate.totemTick:Hide() + print("nameplate.totemTick:Hide()") + else + nameplate.totemTick:SetScript("OnUpdate", function(totemTick, elapsed) + totemTick.now = GetTime() + totemTick.value = (totemTick.timestamp - totemTick.now) % totemTick.maxValue + if totemTick.once and totemTick.now - totemTick.timestamp >= totemTick.maxValue then + totemTick:SetScript("OnUpdate", nil) + print("OnUpdate totemTick:Hide()") + totemTick:Hide() + end + if not totemTick.bar and not (totemTick.once and totemTick.now - totemTick.timestamp >= totemTick.maxValue) then + totemTick:SetCooldown(totemTick.now - totemTick.value, totemTick.maxValue) + elseif totemTick.bar then + totemTick.spark.position = (totemTick.value / totemTick.maxValue) * totemTick.bar:GetHeight() + if ( totemTick.spark.position < 0 ) then + totemTick.spark.position = 0 + end + totemTick.spark:SetPoint("CENTER", totemTick.bar, "BOTTOM", 0, totemTick.spark.position) + totemTick.bar:SetValue(totemTick.value) + end + totemTick.text:SetFormattedText("%.1f", totemTick.value) + end) + print("nameplate.totemTick:Show()") + nameplate.totemTick:Show() + end + else + if nameplate.totemTick then + nameplate.totemTick:SetScript("OnUpdate", nil) + nameplate.totemTick:Hide() + nameplate.totemTick:SetParent(nil) + tinsert(nameplate.totemTick.bar and self.barCache or self.cooldownCache, nameplate.totemTick) + self.activeFrames.bars[nameplate.totemTick] = nil + self.activeFrames.cooldowns[nameplate.totemTick] = nil + nameplate.totemTick = nil + end + end +end + +function TotemPulse:UpdateBar(bar) + bar:SetWidth(Gladdy.db.totemPulseBarWidth) + bar:SetHeight(Gladdy.db.totemPulseBarHeight) + + bar.backdrop:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "totemPulseBarBorderStyle"), + edgeSize = Gladdy.db.totemPulseBarBorderSize }) + bar.backdrop:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBorderColor)) + + bar.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) + bar.bar:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.totemPulseBarColor)) + bar.bar:SetOrientation("Vertical") + bar.bar:SetPoint("TOPLEFT", bar, "TOPLEFT", (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) + bar.bar:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) + + bar.spark:SetWidth(8) + bar.spark:SetHeight(40) + bar.spark:SetRotation(ninetyDegreeInRad) + + bar.bg:SetTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) + bar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBgColor)) + + bar.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") + bar.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) +end + +function TotemPulse:UpdateCooldown(cooldown) + cooldown:SetReverse(true) + cooldown:SetAlpha(Gladdy.db.totemPulseCooldownAlpha) + cooldown.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") + cooldown.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) +end + +function TotemPulse:UpdateFrameOnce() + for _,bar in pairs(self.activeFrames.bars) do + self:UpdateBar(bar) + end + for _,cooldown in pairs(self.activeFrames.cooldowns) do + self:UpdateCooldown(cooldown) + end + for _,bar in pairs(self.barCache) do + self:UpdateBar(bar) + end + for _,cooldown in pairs(self.cooldownCache) do + self:UpdateCooldown(cooldown) + end +end + +--------------------------------------------------- + +-- TEST + +--------------------------------------------------- + + +--------------------------------------------------- + +-- OPTIONS + +--------------------------------------------------- + +function TotemPulse:GetOptions() + return { + headerClassicon = { + type = "header", + name = L["Totem Pulse"], + order = 2, + }, + totemPulseEnabled = Gladdy:option({ + type = "toggle", + name = L["Totem Pulse Enabled"], + order = 3, + }), + totemPulseAttachToTotemPlate = Gladdy:option({ + type = "toggle", + name = L["Attach to Totem Plates"], + order = 4, + }), + group = { + type = "group", + childGroups = "tree", + name = L["Frame"], + order = 4, + args = { + barFrame = { + type = "group", + name = L["Bar"], + order = 1, + args = { + headerSize = { + type = "header", + name = L["Bar Size"], + order = 1, + }, + totemPulseBarHeight = Gladdy:option({ + type = "range", + name = L["Bar height"], + desc = L["Height of the bar"], + order = 3, + min = 0.1, + max = 200, + step = .1, + width = "full", + }), + totemPulseBarWidth = Gladdy:option({ + type = "range", + name = L["Bar width"], + desc = L["Width of the bars"], + order = 4, + min = 0.1, + max = 600, + step = .1, + width = "full", + }), + headerTexture = { + type = "header", + name = L["Texture"], + order = 5, + }, + totemPulseBarTexture = Gladdy:option({ + type = "select", + name = L["Bar texture"], + desc = L["Texture of the bar"], + order = 9, + dialogControl = "LSM30_Statusbar", + values = AceGUIWidgetLSMlists.statusbar, + }), + totemPulseBarColor = Gladdy:colorOption({ + type = "color", + name = L["Bar color"], + desc = L["Color of the cast bar"], + order = 10, + hasAlpha = true, + }), + totemPulseBarBgColor = Gladdy:colorOption({ + type = "color", + name = L["Background color"], + desc = L["Color of the cast bar background"], + order = 11, + hasAlpha = true, + }), + headerBorder = { + type = "header", + name = L["Border"], + order = 12, + }, + totemPulseBarBorderSize = Gladdy:option({ + type = "range", + name = L["Border size"], + order = 13, + min = 0.5, + max = Gladdy.db.castBarHeight/2, + step = 0.5, + width = "full", + }), + totemPulseBarBorderStyle = Gladdy:option({ + type = "select", + name = L["Status Bar border"], + order = 51, + dialogControl = "LSM30_Border", + values = AceGUIWidgetLSMlists.border, + }), + totemPulseBarBorderColor = Gladdy:colorOption({ + type = "color", + name = L["Status Bar border color"], + order = 52, + hasAlpha = true, + }), + }, + }, + }, + }, + } +end \ No newline at end of file -- 2.39.5 From 803abd6f076b9407302da681e271dca2785b186a Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 5 Feb 2022 04:17:03 +0100 Subject: [PATCH 092/227] initial TotemPulse --- Gladdy.toc | 1 + 1 file changed, 1 insertion(+) diff --git a/Gladdy.toc b/Gladdy.toc index 5113781..5dfaf9b 100644 --- a/Gladdy.toc +++ b/Gladdy.toc @@ -26,6 +26,7 @@ Modules\Clicks.lua Modules\Diminishings.lua Modules\Highlight.lua Modules\TotemPlates.lua +Modules\TotemPulse.lua Modules\Trinket.lua Modules\Racial.lua Modules\Cooldowns.lua -- 2.39.5 From 09bfb996815dd2a2a7995b18010245e2d3c428c2 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 5 Feb 2022 04:17:41 +0100 Subject: [PATCH 093/227] add improved wingclip, entrapment, disarm to DRs --- Libs/DRData-1.0/DRData-1.0.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Libs/DRData-1.0/DRData-1.0.lua b/Libs/DRData-1.0/DRData-1.0.lua index 6b7d0e7..a3a3c8d 100644 --- a/Libs/DRData-1.0/DRData-1.0.lua +++ b/Libs/DRData-1.0/DRData-1.0.lua @@ -182,7 +182,13 @@ Data.spells = { --[[ RANDOM ROOTS ]]-- -- Improved Hamstring [23694] = "rndroot", - + + -- Entrapment (Hunter Talent) + [19185] = "rndroot", + + -- Improved Wingclip + [19229] = "rndroot", + -- Frostbite [12494] = "rndroot", @@ -244,7 +250,10 @@ Data.spells = { [10912] = "charm", -- Counterattack - [19306] = "counterattack" + [19306] = "counterattack", + + -- Disarm + [676] = "disarm", } -- DR Category names @@ -267,7 +276,8 @@ Data.typeNames = { ["repentance"] = "Repentance", ["dragonsbreath"] = "Dragon's Breath", ["ua"] = "Unstable Affliction Silence", - ["counterattack"] = "Counterattack Immobilize" + ["counterattack"] = "Counterattack Immobilize", + ["disarm"] = "Disarm" } -- Categories that have DR in PvE as well as PvP -- 2.39.5 From 5212479daec0b1757cb8c1d830a2c758df21b55c Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 5 Feb 2022 04:19:53 +0100 Subject: [PATCH 094/227] completely hide nameplate TotemPlates added --- Modules/TotemPlates.lua | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/Modules/TotemPlates.lua b/Modules/TotemPlates.lua index f87053d..5570b97 100644 --- a/Modules/TotemPlates.lua +++ b/Modules/TotemPlates.lua @@ -98,6 +98,18 @@ local function GetTotemColorDefaultOptions() end) for i=1,#indexedList do defaultDB["totem" .. indexedList[i].id] = {color = indexedList[i].color, enabled = indexedList[i].enabled, alpha = 0.6, customText = ""} + options["npTotemsHideDisabledTotems"] = { + order = 1, + name = L["Hide Disabled Totem Plates"], + desc = L["Hide Disabled Totem Plates"], + type = "toggle", + width = "full", + get = function() return Gladdy.dbi.profile.npTotemsHideDisabledTotems end, + set = function(_, value) + Gladdy.dbi.profile.npTotemsHideDisabledTotems = value + Gladdy:UpdateFrame() + end + } options["totem" .. indexedList[i].id] = { order = i+1, name = select(1, GetSpellInfo(indexedList[i].id)), @@ -198,7 +210,8 @@ local TotemPlates = Gladdy:NewModule("Totem Plates", nil, { npTotemPlatesAlpha = 0.6, npTotemPlatesAlphaAlways = false, npTotemPlatesAlphaAlwaysTargeted = false, - npTotemColors = select(1, GetTotemColorDefaultOptions()) + npTotemColors = select(1, GetTotemColorDefaultOptions()), + npTotemsHideDisabledTotems = false, }) LibStub("AceHook-3.0"):Embed(TotemPlates) @@ -295,6 +308,18 @@ function TotemPlates:UpdateFrameOnce() nameplate.gladdyTotemFrame:Hide() self:ToggleAddon(nameplate, true) end + if Gladdy.db.npTotems and Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled then + nameplate.gladdyTotemFrame:Show() + self:ToggleAddon(nameplate) + end + if Gladdy.db.npTotems and not Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled then + nameplate.gladdyTotemFrame:Hide() + self:ToggleAddon(nameplate, true) + end + if Gladdy.db.npTotems and not Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled and Gladdy.db.npTotemsHideDisabledTotems then + nameplate.gladdyTotemFrame:Hide() + self:ToggleAddon(nameplate) + end end for _,gladdyTotemFrame in ipairs(self.totemPlateCache) do gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor) @@ -395,7 +420,7 @@ function TotemPlates:ToggleAddon(nameplate, show) end function TotemPlates.OnUpdate(self) - if (UnitIsUnit("mouseover", self.unitID) or UnitIsUnit("target", self.unitID)) then + if (UnitIsUnit("mouseover", self.unitID) or UnitIsUnit("target", self.unitID)) and Gladdy.db.npTotemColors["totem" .. self.totemDataEntry.id].alpha > 0 then self.selectionHighlight:SetAlpha(.25) else self.selectionHighlight:SetAlpha(0) @@ -452,6 +477,14 @@ function TotemPlates:OnUnitEvent(unitID) TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, unitID) self:ToggleAddon(nameplate) self.activeTotemNameplates[unitID] = nameplate + elseif totemDataEntry and not Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled and Gladdy.db.npTotemsHideDisabledTotems then + if nameplate.gladdyTotemFrame then + nameplate.gladdyTotemFrame:Hide() + nameplate.gladdyTotemFrame:SetParent(nil) + tinsert(self.totemPlateCache, nameplate.gladdyTotemFrame) + nameplate.gladdyTotemFrame = nil + end + self:ToggleAddon(nameplate) else self:ToggleAddon(nameplate, true) end -- 2.39.5 From 86337919b880f7c62992dd6227106eaf8f14268d Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 12 Feb 2022 02:08:51 +0100 Subject: [PATCH 095/227] fix UnitIsUnit errors when unitCaster is nil --- EventListener.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 0086627..75cbba1 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -73,7 +73,7 @@ function Gladdy:SpotEnemy(unit, auraScan) if ( not spellName ) then break end - if Gladdy.cooldownBuffs[spellName] then -- Check for auras that detect used CDs (like Fear Ward) + if Gladdy.cooldownBuffs[spellName] and unitCaster then -- Check for auras that detect used CDs (like Fear Ward) for arenaUnit,v in pairs(self.buttons) do if (UnitIsUnit(arenaUnit, unitCaster)) then Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, expirationTime - GetTime()) @@ -84,7 +84,7 @@ function Gladdy:SpotEnemy(unit, auraScan) if Gladdy.cooldownBuffs.racials[spellName] then Gladdy:SendMessage("RACIAL_USED", unit, expirationTime, spellName) end - if Gladdy.specBuffs[spellName] then -- Check for auras that detect a spec + if Gladdy.specBuffs[spellName] and unitCaster then -- Check for auras that detect a spec local unitPet = string_gsub(unit, "%d$", "pet%1") if UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster) then EventListener:DetectSpec(unit, Gladdy.specBuffs[spellName]) @@ -238,7 +238,7 @@ function EventListener:UNIT_AURA(unit) Gladdy:SendMessage("AURA_GAIN_LIMIT", unit, auraType, n - 1) break end - if Gladdy.cooldownBuffs[spellName] then -- Check for auras that hint used CDs (like Fear Ward) + if Gladdy.cooldownBuffs[spellName] and unitCaster then -- Check for auras that hint used CDs (like Fear Ward) for arenaUnit,v in pairs(Gladdy.buttons) do if (UnitIsUnit(arenaUnit, unitCaster)) then Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, expirationTime - GetTime()) @@ -248,7 +248,7 @@ function EventListener:UNIT_AURA(unit) if Gladdy.cooldownBuffs.racials[spellName] then Gladdy:SendMessage("RACIAL_USED", unit, spellName, expirationTime, spellName) end - if not button.spec and Gladdy.specBuffs[spellName] then + if not button.spec and Gladdy.specBuffs[spellName] and unitCaster then local unitPet = string_gsub(unit, "%d$", "pet%1") if unitCaster and (UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster)) then self:DetectSpec(unit, Gladdy.specBuffs[spellName]) -- 2.39.5 From 3e59a03ce98887699f15010c2229d86c79b7181f Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 15 Feb 2022 22:59:21 +0100 Subject: [PATCH 096/227] disable options for disabled module + (un)register messages when enabled/disabled --- Modules/ArenaCountDown.lua | 18 +++++++++++++++--- Modules/BuffsDebuffs.lua | 37 +++++++++++++++++++++++++++++------- Modules/Castbar.lua | 16 ++++++++++++++-- Modules/Classicon.lua | 20 ++++++++++++++++--- Modules/CombatIndicator.lua | 13 ++++++++++++- Modules/Diminishings.lua | 5 ++++- Modules/Pets.lua | 25 +++++++++++++++++++----- Modules/Powerbar.lua | 30 +++++++++++++++++++++++++---- Modules/Racial.lua | 19 +++++++++++++++--- Modules/RangeCheck.lua | 20 ++++++++++++++++--- Modules/ShadowsightTimer.lua | 14 +++++++++++++- Modules/Trinket.lua | 21 +++++++++++++------- 12 files changed, 198 insertions(+), 40 deletions(-) diff --git a/Modules/ArenaCountDown.lua b/Modules/ArenaCountDown.lua index 6218064..4f7e5df 100644 --- a/Modules/ArenaCountDown.lua +++ b/Modules/ArenaCountDown.lua @@ -47,13 +47,22 @@ function ACDFrame:Initialize() ACDNumOne:SetPoint("CENTER", ACDNumFrame, "CENTER", 0, 0) self.ACDNumOne = ACDNumOne - self:RegisterMessage("JOINED_ARENA") - self:RegisterMessage("ENEMY_SPOTTED") - self:RegisterMessage("UNIT_SPEC") + if Gladdy.db.countdown then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("UNIT_SPEC") + end self.faction = UnitFactionGroup("player") end function ACDFrame:UpdateFrameOnce() + if Gladdy.db.countdown then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("UNIT_SPEC") + else + self:UnregisterAllMessages() + end self.ACDNumFrame:SetFrameStrata(Gladdy.db.arenaCountdownFrameStrata) self.ACDNumFrame:SetFrameLevel(Gladdy.db.arenaCountdownFrameLevel) end @@ -189,6 +198,7 @@ function ACDFrame:GetOptions() max = 512, step = 16, width = "full", + disabled = function() return not Gladdy.db.countdown end, }), headerAuraLevel = { type = "header", @@ -201,6 +211,7 @@ function ACDFrame:GetOptions() order = 6, values = Gladdy.frameStrata, sorting = Gladdy.frameStrataSorting, + disabled = function() return not Gladdy.db.countdown end, }), arenaCountdownFrameLevel = Gladdy:option({ type = "range", @@ -210,6 +221,7 @@ function ACDFrame:GetOptions() step = 1, order = 7, width = "full", + disabled = function() return not Gladdy.db.countdown end, }), } end diff --git a/Modules/BuffsDebuffs.lua b/Modules/BuffsDebuffs.lua index 1574c54..a61fb95 100644 --- a/Modules/BuffsDebuffs.lua +++ b/Modules/BuffsDebuffs.lua @@ -76,13 +76,16 @@ function BuffsDebuffs:Initialize() self.icons = {} self.trackedCC = {} self.framePool = {} - self:RegisterMessage("JOINED_ARENA") - self:RegisterMessage("UNIT_DESTROYED") - self:RegisterMessage("UNIT_DEATH") - self:RegisterMessage("AURA_FADE") - self:RegisterMessage("AURA_GAIN") - self:RegisterMessage("AURA_GAIN_LIMIT") - self:SetScript("OnEvent", BuffsDebuffs.OnEvent) + if Gladdy.db.buffsEnabled then + self:RegisterMessages( + "JOINED_ARENA", + "UNIT_DESTROYED", + "UNIT_DEATH", + "AURA_FADE", + "AURA_GAIN", + "AURA_GAIN_LIMIT") + self:SetScript("OnEvent", BuffsDebuffs.OnEvent) + end spellSchoolToOptionValueTable = { curse = Gladdy.db.buffsBorderColorCurse, magic = Gladdy.db.buffsBorderColorMagic, @@ -290,6 +293,22 @@ local function styleIcon(aura, auraType) aura.stacks:SetTextColor(Gladdy.db.buffsFontColor.r, Gladdy.db.buffsFontColor.g, Gladdy.db.buffsFontColor.b, 1) end +function BuffsDebuffs:UpdateFrameOnce() + if Gladdy.db.buffsEnabled then + self:RegisterMessages( + "JOINED_ARENA", + "UNIT_DESTROYED", + "UNIT_DEATH", + "AURA_FADE", + "AURA_GAIN", + "AURA_GAIN_LIMIT") + self:SetScript("OnEvent", BuffsDebuffs.OnEvent) + else + self:UnregisterAllMessages() + self:SetScript("OnEvent", nil) + end +end + function BuffsDebuffs:UpdateFrame(unit) --DEBUFFS self.frames[unit].debuffFrame:SetHeight(Gladdy.db.buffsIconSize) @@ -485,12 +504,14 @@ function BuffsDebuffs:GetOptions() name = L["Show CC"], desc = L["Shows all debuffs, which are displayed on the ClassIcon as well"], order = 4, + disabled = function() return not Gladdy.db.buffsEnabled end, }), group = { type = "group", childGroups = "tree", name = L["Frame"], order = 5, + disabled = function() return not Gladdy.db.buffsEnabled end, args = { buffs = { type = "group", @@ -919,6 +940,7 @@ function BuffsDebuffs:GetOptions() name = L["Debuff Lists"], type = "group", order = 11, + disabled = function() return not Gladdy.db.buffsEnabled end, childGroups = "tree", args = select(1, Gladdy:GetAuras(AURA_TYPE_DEBUFF)), set = function(info, state) @@ -934,6 +956,7 @@ function BuffsDebuffs:GetOptions() name = L["Buff Lists"], type = "group", order = 12, + disabled = function() return not Gladdy.db.buffsEnabled end, childGroups = "tree", args = select(1, Gladdy:GetAuras(AURA_TYPE_BUFF)), set = function(info, state) diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 38f0ff0..24fc6a7 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -48,8 +48,10 @@ local Castbar = Gladdy:NewModule("Cast Bar", 70, { function Castbar:Initialize() self.frames = {} - self:RegisterMessage("UNIT_DEATH") - self:RegisterMessage("JOINED_ARENA") + if Gladdy.db.castBarEnabled then + self:RegisterMessage("UNIT_DEATH") + self:RegisterMessage("JOINED_ARENA") + end end --------------------------- @@ -133,6 +135,15 @@ function Castbar:CreateFrame(unit) self:ResetUnit(unit) end +function Castbar:UpdateFrameOnce() + if Gladdy.db.castBarEnabled then + self:RegisterMessage("UNIT_DEATH") + self:RegisterMessage("JOINED_ARENA") + else + self:UnregisterAllMessages() + end +end + function Castbar:UpdateFrame(unit) local castBar = self.frames[unit] if (not castBar) then @@ -584,6 +595,7 @@ function Castbar:GetOptions() childGroups = "tree", name = L["Frame"], order = 4, + disabled = function() return not Gladdy.db.castBarEnabled end, args = { barFrame = { type = "group", diff --git a/Modules/Classicon.lua b/Modules/Classicon.lua index c419ab8..e20ce46 100644 --- a/Modules/Classicon.lua +++ b/Modules/Classicon.lua @@ -82,9 +82,21 @@ local specIcons = { function Classicon:Initialize() self.frames = {} - self:RegisterMessage("ENEMY_SPOTTED") - self:RegisterMessage("UNIT_DEATH") - self:RegisterMessage("UNIT_SPEC") + if Gladdy.db.classIconEnabled then + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("UNIT_DEATH") + self:RegisterMessage("UNIT_SPEC") + end +end + +function Classicon:UpdateFrameOnce() + if Gladdy.db.classIconEnabled then + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("UNIT_DEATH") + self:RegisterMessage("UNIT_SPEC") + else + self:UnregisterAllMessages() + end end function Classicon:CreateFrame(unit) @@ -191,6 +203,7 @@ function Classicon:GetOptions() name = L["Show Spec Icon"], desc = L["Shows Spec Icon once spec is detected"], order = 4, + disabled = function() return not Gladdy.db.classIconEnabled end, get = function() return Gladdy.db.classIconSpecIcon end, set = function(_, value) Gladdy.db.classIconSpecIcon = value @@ -210,6 +223,7 @@ function Classicon:GetOptions() childGroups = "tree", name = L["Frame"], order = 4, + disabled = function() return not Gladdy.db.classIconEnabled end, args = { size = { type = "group", diff --git a/Modules/CombatIndicator.lua b/Modules/CombatIndicator.lua index 4ac51ee..276bcaf 100644 --- a/Modules/CombatIndicator.lua +++ b/Modules/CombatIndicator.lua @@ -20,7 +20,9 @@ local CombatIndicator = Gladdy:NewModule("Combat Indicator", nil, { function CombatIndicator:Initialize() self.frames = {} - self:RegisterMessage("JOINED_ARENA") + if Gladdy.db.ciEnabled then + self:RegisterMessage("JOINED_ARENA") + end self.updateInterval = 0.05 self.combatIndicatorIcon = select(3, GetSpellInfo(674)) end @@ -57,6 +59,14 @@ function CombatIndicator:CreateFrame(unit) button.ciFrame = ciFrame end +function CombatIndicator:UpdateFrameOnce() + if Gladdy.db.ciEnabled then + self:RegisterMessage("JOINED_ARENA") + else + self:UnregisterAllMessages() + end +end + function CombatIndicator:UpdateFrame(unit) local button = Gladdy.buttons[unit] local ciFrame = self.frames[unit] @@ -133,6 +143,7 @@ function CombatIndicator:GetOptions() childGroups = "tree", name = L["Frame"], order = 4, + disabled = function() return not Gladdy.db.ciEnabled end, args = { general = { type = "group", diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index a9836bd..32337ef 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -79,7 +79,7 @@ end function Diminishings:Initialize() self.frames = {} - self:RegisterMessage("UNIT_DEATH", "ResetUnit", "AURA_FADE", "UNIT_DESTROYED") + self:RegisterMessage("UNIT_DESTROYED") end function Diminishings:CreateFrame(unit) @@ -434,6 +434,7 @@ function Diminishings:GetOptions() name = L["DR Duration"], desc = L["Change the DR Duration in seconds (DR is dynamic between 15-20s)"], order = 4, + disabled = function() return not Gladdy.db.drEnabled end, min = 15, max = 20, step = .1, @@ -443,6 +444,7 @@ function Diminishings:GetOptions() childGroups = "tree", name = L["Frame"], order = 5, + disabled = function() return not Gladdy.db.drEnabled end, args = { icon = { type = "group", @@ -781,6 +783,7 @@ function Diminishings:GetOptions() type = "group", name = L["Categories"], order = 6, + disabled = function() return not Gladdy.db.drEnabled end, args = Diminishings:CategoryOptions(), }, } diff --git a/Modules/Pets.lua b/Modules/Pets.lua index fc703b0..5a7eca1 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -31,11 +31,25 @@ local Pets = Gladdy:NewModule("Pets", nil, { function Pets:Initialize() self.frames = {} - self:RegisterMessage("JOINED_ARENA") - self:RegisterMessage("PET_SPOTTED") - self:RegisterMessage("PET_DESTROYED") - self:RegisterMessage("PET_STEALTH") - self:RegisterMessage("ENEMY_SPOTTED") + if Gladdy.db.petEnabled then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("PET_SPOTTED") + self:RegisterMessage("PET_DESTROYED") + self:RegisterMessage("PET_STEALTH") + self:RegisterMessage("ENEMY_SPOTTED") + end +end + +function Pets:UpdateFrameOnce() + if Gladdy.db.petEnabled then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("PET_SPOTTED") + self:RegisterMessage("PET_DESTROYED") + self:RegisterMessage("PET_STEALTH") + self:RegisterMessage("ENEMY_SPOTTED") + else + self:UnregisterAllMessages() + end end function Pets:JOINED_ARENA() @@ -380,6 +394,7 @@ function Pets:GetOptions() childGroups = "tree", name = L["Frame"], order = 3, + disabled = function() return not Gladdy.db.petEnabled end, args = { general = { type = "group", diff --git a/Modules/Powerbar.lua b/Modules/Powerbar.lua index 4e99810..5f48021 100644 --- a/Modules/Powerbar.lua +++ b/Modules/Powerbar.lua @@ -29,10 +29,23 @@ local Powerbar = Gladdy:NewModule("Power Bar", 90, { function Powerbar:Initialize() self.frames = {} - self:RegisterMessage("ENEMY_SPOTTED") - self:RegisterMessage("UNIT_SPEC") - self:RegisterMessage("UNIT_DEATH") - self:RegisterMessage("UNIT_DESTROYED") + if Gladdy.db.powerBarEnabled then + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("UNIT_SPEC") + self:RegisterMessage("UNIT_DEATH") + self:RegisterMessage("UNIT_DESTROYED") + end +end + +function Powerbar:UpdateFrameOnce() + if Gladdy.db.powerBarEnabled then + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("UNIT_SPEC") + self:RegisterMessage("UNIT_DEATH") + self:RegisterMessage("UNIT_DESTROYED") + else + self:UnregisterAllMessages() + end end function Powerbar:CreateFrame(unit) @@ -147,8 +160,16 @@ function Powerbar:UpdateFrame(unit) if not Gladdy.db.powerBarEnabled then powerBar:Hide() + powerBar:UnregisterEvent("UNIT_POWER_UPDATE") + powerBar:UnregisterEvent("UNIT_MAXPOWER") + powerBar:UnregisterEvent("UNIT_DISPLAYPOWER") + powerBar:SetScript("OnEvent", nil) return else + powerBar:RegisterUnitEvent("UNIT_POWER_UPDATE", unit) + powerBar:RegisterUnitEvent("UNIT_MAXPOWER", unit) + powerBar:RegisterUnitEvent("UNIT_DISPLAYPOWER", unit) + powerBar:SetScript("OnEvent", Powerbar.OnEvent) powerBar:Show() end powerBar.bg:SetTexture(Gladdy:SMFetch("statusbar", "powerBarTexture")) @@ -351,6 +372,7 @@ function Powerbar:GetOptions() childGroups = "tree", name = L["Frame"], order = 4, + disabled = function() return not Gladdy.db.powerBarEnabled end, args = { general = { type = "group", diff --git a/Modules/Racial.lua b/Modules/Racial.lua index ec5e237..e9dff61 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -26,9 +26,21 @@ local Racial = Gladdy:NewModule("Racial", 79, { function Racial:Initialize() self.frames = {} - self:RegisterMessage("JOINED_ARENA") - self:RegisterMessage("ENEMY_SPOTTED") - self:RegisterMessage("RACIAL_USED") + if Gladdy.db.racialEnabled then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("RACIAL_USED") + end +end + +function Racial:UpdateFrameOnce() + if Gladdy.db.racialEnabled then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("RACIAL_USED") + else + self:UnregisterAllMessages() + end end local function iconTimer(self,elapsed) @@ -235,6 +247,7 @@ function Racial:GetOptions() childGroups = "tree", name = L["Frame"], order = 4, + disabled = function() return not Gladdy.db.racialEnabled end, args = { general = { type = "group", diff --git a/Modules/RangeCheck.lua b/Modules/RangeCheck.lua index 3e95600..36cdcfc 100644 --- a/Modules/RangeCheck.lua +++ b/Modules/RangeCheck.lua @@ -52,12 +52,24 @@ local RangeCheck = Gladdy:NewModule("Range Check", nil, { }) function RangeCheck:Initialize() - self:RegisterMessage("JOINED_ARENA") - self:RegisterMessage("ENEMY_STEALTH") - self:RegisterMessage("ENEMY_SPOTTED") + if Gladdy.db.rangeCheckEnabled then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("ENEMY_STEALTH") + self:RegisterMessage("ENEMY_SPOTTED") + end self.playerClass = select(2, UnitClass("player")) end +function RangeCheck:UpdateFrameOnce() + if Gladdy.db.rangeCheckEnabled then + self:RegisterMessage("JOINED_ARENA") + self:RegisterMessage("ENEMY_STEALTH") + self:RegisterMessage("ENEMY_SPOTTED") + else + self:UnregisterAllMessages() + end +end + function RangeCheck:Reset() self.test = nil end @@ -268,6 +280,7 @@ function RangeCheck:GetOptions() childGroups = "tree", name = L["General"], order = 5, + disabled = function() return not Gladdy.db.rangeCheckEnabled end, args = { general = { type = "group", @@ -340,6 +353,7 @@ function RangeCheck:GetOptions() childGroups = "tree", name = L["Spells"], order = 5, + disabled = function() return not Gladdy.db.rangeCheckEnabled end, args = RangeCheck:GetSpells(), }, } diff --git a/Modules/ShadowsightTimer.lua b/Modules/ShadowsightTimer.lua index 8843cc2..9606f86 100644 --- a/Modules/ShadowsightTimer.lua +++ b/Modules/ShadowsightTimer.lua @@ -34,8 +34,10 @@ end function ShadowsightTimer:Initialize() self.locale = Gladdy:GetArenaTimer() - self:RegisterMessage("JOINED_ARENA") self:CreateAnchor() + if Gladdy.db.shadowsightTimerEnabled then + self:RegisterMessage("JOINED_ARENA") + end end function ShadowsightTimer:Reset() @@ -106,6 +108,12 @@ function ShadowsightTimer:CreateAnchor() end function ShadowsightTimer:UpdateFrameOnce() + if Gladdy.db.shadowsightTimerEnabled then + self:RegisterMessage("JOINED_ARENA") + else + self:UnregisterAllMessages() + end + self.anchor:EnableMouse(not Gladdy.db.shadowsightTimerLocked) self.anchor:SetFrameStrata(Gladdy.db.shadowsightTimerFrameStrata) @@ -299,23 +307,27 @@ function ShadowsightTimer:GetOptions() name = L["Locked"], --desc = L["Turns countdown before the start of an arena match on/off."], order = 4, + disabled = function() return not Gladdy.db.shadowsightTimerEnabled end, }), shadowsightTimerShowTwoTimer = Gladdy:option({ type = "toggle", name = L["Show two timers"], order = 5, + disabled = function() return not Gladdy.db.shadowsightTimerEnabled end, }), shadowsightAnnounce = Gladdy:option({ type = "toggle", name = L["Announce"], --desc = L["Turns countdown before the start of an arena match on/off."], order = 6, + disabled = function() return not Gladdy.db.shadowsightTimerEnabled end, }), group = { type = "group", childGroups = "tree", name = L["Frame"], order = 7, + disabled = function() return not Gladdy.db.shadowsightTimerEnabled end, args = { general = { type = "group", diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index 0c316e1..13f7f49 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -29,8 +29,17 @@ local Trinket = Gladdy:NewModule("Trinket", 80, { function Trinket:Initialize() self.frames = {} + if Gladdy.db.trinketEnabled then + self:RegisterMessage("JOINED_ARENA") + end +end - self:RegisterMessage("JOINED_ARENA") +function Trinket:UpdateFrameOnce() + if Gladdy.db.trinketEnabled then + self:RegisterMessage("JOINED_ARENA") + else + self:UnregisterAllMessages() + end end local function iconTimer(self, elapsed) @@ -272,6 +281,7 @@ function Trinket:GetOptions() name = L["Colored trinket"], desc = L["Shows a solid colored icon when off/off CD."], order = 4, + disabled = function() return not Gladdy.db.trinketEnabled end, }), trinketColoredCd = Gladdy:colorOption({ type = "color", @@ -279,9 +289,7 @@ function Trinket:GetOptions() desc = L["Color of the border"], order = 5, hasAlpha = true, - disabled = function() - return not Gladdy.db.trinketColored - end, + disabled = function() return not Gladdy.db.trinketEnabled end, }), trinketColoredNoCd = Gladdy:colorOption({ type = "color", @@ -289,15 +297,14 @@ function Trinket:GetOptions() desc = L["Color of the border"], order = 6, hasAlpha = true, - disabled = function() - return not Gladdy.db.trinketColored - end, + disabled = function() return not Gladdy.db.trinketEnabled end, }), group = { type = "group", childGroups = "tree", name = L["Frame"], order = 5, + disabled = function() return not Gladdy.db.trinketEnabled end, args = { general = { type = "group", -- 2.39.5 From 051571f4efd33241e4be7c9b7ef3391fa9b471a9 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Tue, 15 Feb 2022 23:17:51 +0100 Subject: [PATCH 097/227] change identifying totems by name to identifying by guid (npcId) - faster and localization independent --- Constants.lua | 342 +++++++++++++++++++++++++++++++++++++++- Modules/TotemPlates.lua | 281 +++++++++++++++++---------------- 2 files changed, 484 insertions(+), 139 deletions(-) diff --git a/Constants.lua b/Constants.lua index 0a5704e..8df815c 100644 --- a/Constants.lua +++ b/Constants.lua @@ -1,4 +1,4 @@ -local tbl_sort, select = table.sort, select +local tbl_sort, select, string_lower = table.sort, select, string.lower local GetSpellInfo = GetSpellInfo local GetItemInfo = GetItemInfo @@ -1259,4 +1259,342 @@ Gladdy.frameStrataSorting = { [6] = "FULLSCREEN", [7] = "FULLSCREEN_DIALOG", [8] = "TOOLTIP", -} \ No newline at end of file +} + + +--------------------- +-- TOTEM STUFF +--------------------- + +local totemData = { + -- Fire + [string_lower("Searing Totem")] = {id = 3599,texture = select(3, GetSpellInfo(3599)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Flametongue Totem")] = {id = 8227,texture = select(3, GetSpellInfo(8227)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Magma Totem")] = {id = 8190,texture = select(3, GetSpellInfo(8190)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, + [string_lower("Fire Nova Totem")] = {id = 1535,texture = select(3, GetSpellInfo(1535)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = { cd = 4, once = true }}, + [string_lower("Totem of Wrath")] = {id = 30706,texture = select(3, GetSpellInfo(30706)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Fire Elemental Totem")] = {id = 32982,texture = select(3, GetSpellInfo(32982)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Frost Resistance Totem")] = {id = 8181,texture = select(3, GetSpellInfo(8181)), color = {r = 0, g = 0, b = 0, a = 1}}, + -- Water + [string_lower("Fire Resistance Totem")] = {id = 8184,texture = select(3, GetSpellInfo(8184)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Poison Cleansing Totem")] = {id = 8166,texture = select(3, GetSpellInfo(8166)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 4}, + [string_lower("Disease Cleansing Totem")] = {id = 8170,texture = select(3, GetSpellInfo(8170)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 4}, + [string_lower("Healing Stream Totem")] = {id = 5394,texture = select(3, GetSpellInfo(5394)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, + [string_lower("Mana Tide Totem")] = {id = 16190,texture = select(3, GetSpellInfo(16190)), color = {r = 0.078, g = 0.9, b = 0.16, a = 1}}, + [string_lower("Mana Spring Totem")] = {id = 5675,texture = select(3, GetSpellInfo(5675)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, + -- Earth + [string_lower("Earthbind Totem")] = {id = 2484,texture = select(3, GetSpellInfo(2484)), color = {r = 0.5, g = 0.5, b = 0.5, a = 1}, pulse = 3}, + [string_lower("Stoneclaw Totem")] = {id = 5730,texture = select(3, GetSpellInfo(5730)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, + [string_lower("Stoneskin Totem")] = {id = 8071,texture = select(3, GetSpellInfo(8071)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Strength of Earth Totem")] = {id = 8075,texture = select(3, GetSpellInfo(8075)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Earth Elemental Totem")] = {id = 33663,texture = select(3, GetSpellInfo(33663)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Tremor Totem")] = {id = 8143,texture = select(3, GetSpellInfo(8143)), color = {r = 1, g = 0.9, b = 0.1, a = 1}, pulse = 3}, + -- Air + [string_lower("Grounding Totem")] = {id = 8177,texture = select(3, GetSpellInfo(8177)), color = {r = 0, g = 0.53, b = 0.92, a = 1}}, + [string_lower("Grace of Air Totem")] = {id = 8835,texture = select(3, GetSpellInfo(8835)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Nature Resistance Totem")] = {id = 10595,texture = select(3, GetSpellInfo(10595)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Windfury Totem")] = {id = 8512,texture = select(3, GetSpellInfo(8512)), color = {r = 0.96, g = 0, b = 0.07, a = 1}}, + [string_lower("Sentry Totem")] = {id = 6495, texture = select(3, GetSpellInfo(6495)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Windwall Totem")] = {id = 15107,texture = select(3, GetSpellInfo(15107)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Wrath of Air Totem")] = {id = 3738,texture = select(3, GetSpellInfo(3738)), color = {r = 0, g = 0, b = 0, a = 1}}, + [string_lower("Tranquil Air Totem")] = {id = 25908,texture = select(3, GetSpellInfo(25908)), color = {r = 0, g = 0, b = 0, a = 1}}, +} + +local totemSpellIdToPulse = { + [GetSpellInfo(totemData[string_lower("Earthbind Totem")].id)] = totemData[string_lower("Earthbind Totem")].pulse, + [2484] = totemData[string_lower("Earthbind Totem")].pulse, + [GetSpellInfo(totemData[string_lower("Tremor Totem")].id)] = totemData[string_lower("Tremor Totem")].pulse, + [8143] = totemData[string_lower("Tremor Totem")].pulse, + [GetSpellInfo(totemData[string_lower("Poison Cleansing Totem")].id)] = totemData[string_lower("Poison Cleansing Totem")].pulse, + [8166] = totemData[string_lower("Poison Cleansing Totem")].pulse, + [GetSpellInfo(totemData[string_lower("Disease Cleansing Totem")].id)] = totemData[string_lower("Disease Cleansing Totem")].pulse, + [8170] = totemData[string_lower("Disease Cleansing Totem")].pulse, + [GetSpellInfo(totemData[string_lower("Fire Nova Totem")].id)] = totemData[string_lower("Fire Nova Totem")].pulse, + [1535] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 1 + [8498] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 2 + [8499] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 3 + [11314] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 4 + [11315] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 5 + [25546] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 6 + [25547] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 7 + [GetSpellInfo(totemData[string_lower("Magma Totem")].id)] = totemData[string_lower("Magma Totem")].pulse, + [8190] = totemData[string_lower("Magma Totem")].pulse, -- Rank 1 + [10585] = totemData[string_lower("Magma Totem")].pulse, -- Rank 2 + [10586] = totemData[string_lower("Magma Totem")].pulse, -- Rank 3 + [10587] = totemData[string_lower("Magma Totem")].pulse, -- Rank 4 + [25552] = totemData[string_lower("Magma Totem")].pulse, -- Rank 5 + [GetSpellInfo(totemData[string_lower("Healing Stream Totem")].id)] = totemData[string_lower("Healing Stream Totem")].pulse, + [5394] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 1 + [6375] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 2 + [6377] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 3 + [10462] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 4 + [10463] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 5 + [25567] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 6 + [GetSpellInfo(totemData[string_lower("Mana Spring Totem")].id)] = totemData[string_lower("Mana Spring Totem")].pulse, + [5675] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 1 + [10495] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 2 + [10496] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 3 + [10497] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 4 + [25570] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 5 + [GetSpellInfo(totemData[string_lower("Stoneclaw Totem")].id)] = totemData[string_lower("Stoneclaw Totem")].pulse, + [5730] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 1 + [6390] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 2 + [6391] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 3 + [6392] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 4 + [10427] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 5 + [10428] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 6 + [25525] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 7 +} + +local totemNpcIdsToTotemData = { + --fire + [2523] = totemData[string_lower("Searing Totem")], + [3902] = totemData[string_lower("Searing Totem")], + [3903] = totemData[string_lower("Searing Totem")], + [3904] = totemData[string_lower("Searing Totem")], + [7400] = totemData[string_lower("Searing Totem")], + [7402] = totemData[string_lower("Searing Totem")], + [15480] = totemData[string_lower("Searing Totem")], + [31162] = totemData[string_lower("Searing Totem")], + [31164] = totemData[string_lower("Searing Totem")], + [31165] = totemData[string_lower("Searing Totem")], + [21995] = totemData[string_lower("Searing Totem")], + [22209] = totemData[string_lower("Searing Totem")], + [22895] = totemData[string_lower("Searing Totem")], + [22896] = totemData[string_lower("Searing Totem")], + [34687] = totemData[string_lower("Searing Totem")], + [36532] = totemData[string_lower("Searing Totem")], + [43423] = totemData[string_lower("Searing Totem")], + [67380] = totemData[string_lower("Searing Totem")], + [73477] = totemData[string_lower("Searing Totem")], + [79238] = totemData[string_lower("Searing Totem")], + [22896] = totemData[string_lower("Searing Totem")], + [84519] = totemData[string_lower("Searing Totem")], + [110730] = totemData[string_lower("Searing Totem")], + [132178] = totemData[string_lower("Searing Totem")], + + [5950] = totemData[string_lower("Flametongue Totem")], + [6012] = totemData[string_lower("Flametongue Totem")], + [7423] = totemData[string_lower("Flametongue Totem")], + [10557] = totemData[string_lower("Flametongue Totem")], + [15485] = totemData[string_lower("Flametongue Totem")], + [31132] = totemData[string_lower("Flametongue Totem")], + [31133] = totemData[string_lower("Flametongue Totem")], + [31158] = totemData[string_lower("Flametongue Totem")], + [42605] = totemData[string_lower("Flametongue Totem")], + + [5929] = totemData[string_lower("Magma Totem")], + [7464] = totemData[string_lower("Magma Totem")], + [7465] = totemData[string_lower("Magma Totem")], + [7466] = totemData[string_lower("Magma Totem")], + [15484] = totemData[string_lower("Magma Totem")], + [31166] = totemData[string_lower("Magma Totem")], + [31167] = totemData[string_lower("Magma Totem")], + [32887] = totemData[string_lower("Magma Totem")], + [42211] = totemData[string_lower("Magma Totem")], + [71335] = totemData[string_lower("Magma Totem")], + [71925] = totemData[string_lower("Magma Totem")], + [73085] = totemData[string_lower("Magma Totem")], + [73093] = totemData[string_lower("Magma Totem")], + [73268] = totemData[string_lower("Magma Totem")], + [88971] = totemData[string_lower("Magma Totem")], + [97369] = totemData[string_lower("Magma Totem")], + [98676] = totemData[string_lower("Magma Totem")], + + [5879] = totemData[string_lower("Fire Nova Totem")], + [6110] = totemData[string_lower("Fire Nova Totem")], + [6111] = totemData[string_lower("Fire Nova Totem")], + [7844] = totemData[string_lower("Fire Nova Totem")], + [7845] = totemData[string_lower("Fire Nova Totem")], + [14662] = totemData[string_lower("Fire Nova Totem")], + [15482] = totemData[string_lower("Fire Nova Totem")], + [15483] = totemData[string_lower("Fire Nova Totem")], + [24320] = totemData[string_lower("Fire Nova Totem")], + [32775] = totemData[string_lower("Fire Nova Totem")], + [32776] = totemData[string_lower("Fire Nova Totem")], + + [17539] = totemData[string_lower("Totem of Wrath")], + [22970] = totemData[string_lower("Totem of Wrath")], + [22971] = totemData[string_lower("Totem of Wrath")], + [30652] = totemData[string_lower("Totem of Wrath")], + [30653] = totemData[string_lower("Totem of Wrath")], + [30654] = totemData[string_lower("Totem of Wrath")], + + [15439] = totemData[string_lower("Fire Elemental Totem")], + [40830] = totemData[string_lower("Fire Elemental Totem")], + [41337] = totemData[string_lower("Fire Elemental Totem")], + [41346] = totemData[string_lower("Fire Elemental Totem")], + [72301] = totemData[string_lower("Fire Elemental Totem")], + + [5926] = totemData[string_lower("Frost Resistance Totem")], + [7412] = totemData[string_lower("Frost Resistance Totem")], + [7413] = totemData[string_lower("Frost Resistance Totem")], + [15486] = totemData[string_lower("Frost Resistance Totem")], + [31171] = totemData[string_lower("Frost Resistance Totem")], + [31172] = totemData[string_lower("Frost Resistance Totem")], + + -- Water + [5927] = totemData[string_lower("Fire Resistance Totem")], + [7424] = totemData[string_lower("Fire Resistance Totem")], + [7425] = totemData[string_lower("Fire Resistance Totem")], + [15487] = totemData[string_lower("Fire Resistance Totem")], + [31169] = totemData[string_lower("Fire Resistance Totem")], + [31170] = totemData[string_lower("Fire Resistance Totem")], + + [5923] = totemData[string_lower("Poison Cleansing Totem")], + [22487] = totemData[string_lower("Poison Cleansing Totem")], + + [5924] = totemData[string_lower("Disease Cleansing Totem")], + + [3527] = totemData[string_lower("Healing Stream Totem")], + [3906] = totemData[string_lower("Healing Stream Totem")], + [3907] = totemData[string_lower("Healing Stream Totem")], + [3908] = totemData[string_lower("Healing Stream Totem")], + [3909] = totemData[string_lower("Healing Stream Totem")], + [14664] = totemData[string_lower("Healing Stream Totem")], + [15488] = totemData[string_lower("Healing Stream Totem")], + [18235] = totemData[string_lower("Healing Stream Totem")], + [31181] = totemData[string_lower("Healing Stream Totem")], + [31182] = totemData[string_lower("Healing Stream Totem")], + [31185] = totemData[string_lower("Healing Stream Totem")], + [34686] = totemData[string_lower("Healing Stream Totem")], + [36542] = totemData[string_lower("Healing Stream Totem")], + [37810] = totemData[string_lower("Healing Stream Totem")], + [38428] = totemData[string_lower("Healing Stream Totem")], + [47077] = totemData[string_lower("Healing Stream Totem")], + [72309] = totemData[string_lower("Healing Stream Totem")], + [72457] = totemData[string_lower("Healing Stream Totem")], + [73890] = totemData[string_lower("Healing Stream Totem")], + [74433] = totemData[string_lower("Healing Stream Totem")], + [97508] = totemData[string_lower("Healing Stream Totem")], + [112567] = totemData[string_lower("Healing Stream Totem")], + [120357] = totemData[string_lower("Healing Stream Totem")], + [128539] = totemData[string_lower("Healing Stream Totem")], + [132049] = totemData[string_lower("Healing Stream Totem")], + + [10467] = totemData[string_lower("Mana Tide Totem")], + [11100] = totemData[string_lower("Mana Tide Totem")], + [11101] = totemData[string_lower("Mana Tide Totem")], + [17061] = totemData[string_lower("Mana Tide Totem")], + + [3573] = totemData[string_lower("Mana Spring Totem")], + [7414] = totemData[string_lower("Mana Spring Totem")], + [7415] = totemData[string_lower("Mana Spring Totem")], + [7416] = totemData[string_lower("Mana Spring Totem")], + [15304] = totemData[string_lower("Mana Spring Totem")], + [15489] = totemData[string_lower("Mana Spring Totem")], + [31186] = totemData[string_lower("Mana Spring Totem")], + [31189] = totemData[string_lower("Mana Spring Totem")], + [31190] = totemData[string_lower("Mana Spring Totem")], + + -- Earth + [2630] = totemData[string_lower("Earthbind Totem")], + [22486] = totemData[string_lower("Earthbind Totem")], + [40233] = totemData[string_lower("Earthbind Totem")], + [74737] = totemData[string_lower("Earthbind Totem")], + [79155] = totemData[string_lower("Earthbind Totem")], + + [3579] = totemData[string_lower("Stoneclaw Totem")], + [3911] = totemData[string_lower("Stoneclaw Totem")], + [3912] = totemData[string_lower("Stoneclaw Totem")], + [3913] = totemData[string_lower("Stoneclaw Totem")], + [7398] = totemData[string_lower("Stoneclaw Totem")], + [7399] = totemData[string_lower("Stoneclaw Totem")], + [14870] = totemData[string_lower("Stoneclaw Totem")], + [15478] = totemData[string_lower("Stoneclaw Totem")], + [31120] = totemData[string_lower("Stoneclaw Totem")], + [31121] = totemData[string_lower("Stoneclaw Totem")], + [31122] = totemData[string_lower("Stoneclaw Totem")], + [40258] = totemData[string_lower("Stoneclaw Totem")], + [102402] = totemData[string_lower("Stoneclaw Totem")], + + [5873] = totemData[string_lower("Stoneskin Totem")], + [5919] = totemData[string_lower("Stoneskin Totem")], + [5920] = totemData[string_lower("Stoneskin Totem")], + [7366] = totemData[string_lower("Stoneskin Totem")], + [7367] = totemData[string_lower("Stoneskin Totem")], + [7368] = totemData[string_lower("Stoneskin Totem")], + [14663] = totemData[string_lower("Stoneskin Totem")], + [15470] = totemData[string_lower("Stoneskin Totem")], + [15474] = totemData[string_lower("Stoneskin Totem")], + [18177] = totemData[string_lower("Stoneskin Totem")], + [21994] = totemData[string_lower("Stoneskin Totem")], + [31175] = totemData[string_lower("Stoneskin Totem")], + [31176] = totemData[string_lower("Stoneskin Totem")], + [36550] = totemData[string_lower("Stoneskin Totem")], + [40267] = totemData[string_lower("Stoneskin Totem")], + [41967] = totemData[string_lower("Stoneskin Totem")], + + [5874] = totemData[string_lower("Strength of Earth Totem")], + [5921] = totemData[string_lower("Strength of Earth Totem")], + [5922] = totemData[string_lower("Strength of Earth Totem")], + [7403] = totemData[string_lower("Strength of Earth Totem")], + [15464] = totemData[string_lower("Strength of Earth Totem")], + [15479] = totemData[string_lower("Strength of Earth Totem")], + [21992] = totemData[string_lower("Strength of Earth Totem")], + [30647] = totemData[string_lower("Strength of Earth Totem")], + [31129] = totemData[string_lower("Strength of Earth Totem")], + [40266] = totemData[string_lower("Strength of Earth Totem")], + + [15430] = totemData[string_lower("Earth Elemental Totem")], + [24649] = totemData[string_lower("Earth Elemental Totem")], + [39387] = totemData[string_lower("Earth Elemental Totem")], + [40247] = totemData[string_lower("Earth Elemental Totem")], + [72307] = totemData[string_lower("Earth Elemental Totem")], + + [5913] = totemData[string_lower("Tremor Totem")], + [41938] = totemData[string_lower("Tremor Totem")], + [41939] = totemData[string_lower("Tremor Totem")], + + -- Air + [5925] = totemData[string_lower("Grounding Totem")], + [128537] = totemData[string_lower("Grounding Totem")], + [136251] = totemData[string_lower("Grounding Totem")], + + [7486] = totemData[string_lower("Grace of Air Totem")], + [7487] = totemData[string_lower("Grace of Air Totem")], + [15463] = totemData[string_lower("Grace of Air Totem")], + + [7467] = totemData[string_lower("Nature Resistance Totem")], + [7468] = totemData[string_lower("Nature Resistance Totem")], + [7469] = totemData[string_lower("Nature Resistance Totem")], + [15490] = totemData[string_lower("Nature Resistance Totem")], + [31173] = totemData[string_lower("Nature Resistance Totem")], + [31174] = totemData[string_lower("Nature Resistance Totem")], + + [6112] = totemData[string_lower("Windfury Totem")], + [7483] = totemData[string_lower("Windfury Totem")], + [7484] = totemData[string_lower("Windfury Totem")], + [14666] = totemData[string_lower("Windfury Totem")], + [15496] = totemData[string_lower("Windfury Totem")], + [15497] = totemData[string_lower("Windfury Totem")], + [22897] = totemData[string_lower("Windfury Totem")], + [41940] = totemData[string_lower("Windfury Totem")], + [41941] = totemData[string_lower("Windfury Totem")], + [80703] = totemData[string_lower("Windfury Totem")], + [105690] = totemData[string_lower("Windfury Totem")], + [133684] = totemData[string_lower("Windfury Totem")], + + [3968] = totemData[string_lower("Sentry Totem")], + [28938] = totemData[string_lower("Sentry Totem")], + [40187] = totemData[string_lower("Sentry Totem")], + [69505] = totemData[string_lower("Sentry Totem")], + [70413] = totemData[string_lower("Sentry Totem")], + [71145] = totemData[string_lower("Sentry Totem")], + [147410] = totemData[string_lower("Sentry Totem")], + + [9687] = totemData[string_lower("Windwall Totem")], + [9688] = totemData[string_lower("Windwall Totem")], + [9689] = totemData[string_lower("Windwall Totem")], + [15492] = totemData[string_lower("Windwall Totem")], + + [15447] = totemData[string_lower("Wrath of Air Totem")], + [36556] = totemData[string_lower("Wrath of Air Totem")], + + [15803] = totemData[string_lower("Tranquil Air Totem")], +} + +function Gladdy:GetTotemData() + return totemData, totemNpcIdsToTotemData, totemSpellIdToPulse +end + diff --git a/Modules/TotemPlates.lua b/Modules/TotemPlates.lua index 5570b97..8c1a0ee 100644 --- a/Modules/TotemPlates.lua +++ b/Modules/TotemPlates.lua @@ -1,103 +1,29 @@ -local select, pairs, string_lower, tremove, tinsert, format, string_gsub, ipairs = select, pairs, string.lower, tremove, tinsert, format, string.gsub, ipairs -local UnitExists, UnitIsUnit, UnitName, UnitIsEnemy = UnitExists, UnitIsUnit, UnitName, UnitIsEnemy +local select, pairs, tremove, tinsert, format, strsplit, tonumber, ipairs = select, pairs, tremove, tinsert, format, strsplit, tonumber, ipairs +local UnitExists, UnitIsUnit, UnitIsEnemy, UnitGUID = UnitExists, UnitIsUnit, UnitIsEnemy, UnitGUID local C_NamePlate = C_NamePlate local Gladdy = LibStub("Gladdy") local L = Gladdy.L local GetSpellInfo, CreateFrame = GetSpellInfo, CreateFrame +local totemData, npcIdToTotemData = Gladdy:GetTotemData() --------------------------------------------------- --- Constants +-- Option Helpers --------------------------------------------------- -local totemData = { - -- Fire - [string_lower("Searing Totem")] = {id = 3599,texture = select(3, GetSpellInfo(3599)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Searing Totem - [string_lower("Flametongue Totem")] = {id = 8227,texture = select(3, GetSpellInfo(8227)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Flametongue Totem - [string_lower("Magma Totem")] = {id = 8190,texture = select(3, GetSpellInfo(8190)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Magma Totem - [string_lower("Fire Nova Totem")] = {id = 1535,texture = select(3, GetSpellInfo(1535)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Fire Nova Totem - [string_lower("Totem of Wrath")] = {id = 30706,texture = select(3, GetSpellInfo(30706)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 1}, -- Totem of Wrath - [string_lower("Fire Elemental Totem")] = {id = 32982,texture = select(3, GetSpellInfo(32982)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Fire Elemental Totem - [string_lower("Frost Resistance Totem")] = {id = 8181,texture = select(3, GetSpellInfo(8181)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Frost Resistance Totem - -- Water - [string_lower("Fire Resistance Totem")] = {id = 8184,texture = select(3, GetSpellInfo(8184)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Fire Resistance Totem - [string_lower("Poison Cleansing Totem")] = {id = 8166,texture = select(3, GetSpellInfo(8166)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Poison Cleansing Totem - [string_lower("Disease Cleansing Totem")] = {id = 8170,texture = select(3, GetSpellInfo(8170)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Disease Cleansing Totem - [string_lower("Healing Stream Totem")] = {id = 5394,texture = select(3, GetSpellInfo(5394)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Healing Stream Totem - [string_lower("Mana Tide Totem")] = {id = 16190,texture = select(3, GetSpellInfo(16190)), color = {r = 0.078, g = 0.9, b = 0.16, a = 1}, enabled = true, priority = 3}, -- Mana Tide Totem - [string_lower("Mana Spring Totem")] = {id = 5675,texture = select(3, GetSpellInfo(5675)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 1}, -- Mana Spring Totem - -- Earth - [string_lower("Earthbind Totem")] = {id = 2484,texture = select(3, GetSpellInfo(2484)), color = {r = 0.5, g = 0.5, b = 0.5, a = 1}, enabled = true, priority = 1}, -- Earthbind Totem - [string_lower("Stoneclaw Totem")] = {id = 5730,texture = select(3, GetSpellInfo(5730)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Stoneclaw Totem - [string_lower("Stoneskin Totem")] = {id = 8071,texture = select(3, GetSpellInfo(8071)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Stoneskin Totem - [string_lower("Strength of Earth Totem")] = {id = 8075,texture = select(3, GetSpellInfo(8075)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Strength of Earth Totem - [string_lower("Earth Elemental Totem")] = {id = 33663,texture = select(3, GetSpellInfo(33663)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Earth Elemental Totem - [string_lower("Tremor Totem")] = {id = 8143,texture = select(3, GetSpellInfo(8143)), color = {r = 1, g = 0.9, b = 0.1, a = 1}, enabled = true, priority = 3}, -- Tremor Totem - -- Air - [string_lower("Grounding Totem")] = {id = 8177,texture = select(3, GetSpellInfo(8177)), color = {r = 0, g = 0.53, b = 0.92, a = 1}, enabled = true, priority = 3}, -- Grounding Totem - [string_lower("Grace of Air Totem")] = {id = 8835,texture = select(3, GetSpellInfo(8835)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Grace of Air Totem - [string_lower("Nature Resistance Totem")] = {id = 10595,texture = select(3, GetSpellInfo(10595)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Nature Resistance Totem - [string_lower("Windfury Totem")] = {id = 8512,texture = select(3, GetSpellInfo(8512)), color = {r = 0.96, g = 0, b = 0.07, a = 1}, enabled = true, priority = 2}, -- Windfury Totem - [string_lower("Sentry Totem")] = {id = 6495, texture = select(3, GetSpellInfo(6495)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Sentry Totem - [string_lower("Windwall Totem")] = {id = 15107,texture = select(3, GetSpellInfo(15107)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Windwall Totem - [string_lower("Wrath of Air Totem")] = {id = 3738,texture = select(3, GetSpellInfo(3738)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Wrath of Air Totem - [string_lower("Tranquil Air Totem")] = {id = 25908,texture = select(3, GetSpellInfo(25908)), color = {r = 0, g = 0, b = 0, a = 1}, enabled = true, priority = 0}, -- Tranquil Air Totem -} -local localizedTotemData = { - ["default"] = { - [string_lower(select(1, GetSpellInfo(3599)))] = totemData[string_lower("Searing Totem")], -- Searing Totem - [string_lower(select(1, GetSpellInfo(8227)))] = totemData[string_lower("Flametongue Totem")], -- Flametongue Totem - [string_lower(select(1, GetSpellInfo(8190)))] = totemData[string_lower("Magma Totem")], -- Magma Totem - [string_lower(select(1, GetSpellInfo(1535)))] = totemData[string_lower("Fire Nova Totem")], -- Fire Nova Totem - [string_lower(select(1, GetSpellInfo(30706)))] = totemData[string_lower("Totem of Wrath")], -- Totem of Wrath - [string_lower(select(1, GetSpellInfo(32982)))] = totemData[string_lower("Fire Elemental Totem")], -- Fire Elemental Totem - [string_lower(select(1, GetSpellInfo(8181)))] = totemData[string_lower("Frost Resistance Totem")], -- Frost Resistance Totem - -- Water - [string_lower(select(1, GetSpellInfo(8184)))] = totemData[string_lower("Fire Resistance Totem")], -- Fire Resistance Totem - [string_lower(select(1, GetSpellInfo(8166)))] = totemData[string_lower("Poison Cleansing Totem")], -- Poison Cleansing Totem - [string_lower(select(1, GetSpellInfo(8170)))] = totemData[string_lower("Disease Cleansing Totem")], -- Disease Cleansing Totem - [string_lower(select(1, GetSpellInfo(5394)))] = totemData[string_lower("Healing Stream Totem")], -- Healing Stream Totem - [string_lower(select(1, GetSpellInfo(16190)))] = totemData[string_lower("Mana Tide Totem")], -- Mana Tide Totem - [string_lower(select(1, GetSpellInfo(5675)))] = totemData[string_lower("Mana Spring Totem")], -- Mana Spring Totem - -- Earth - [string_lower(select(1, GetSpellInfo(2484)))] = totemData[string_lower("Earthbind Totem")], -- Earthbind Totem - [string_lower(select(1, GetSpellInfo(5730)))] = totemData[string_lower("Stoneclaw Totem")], -- Stoneclaw Totem - [string_lower(select(1, GetSpellInfo(8071)))] = totemData[string_lower("Stoneskin Totem")], -- Stoneskin Totem - [string_lower(select(1, GetSpellInfo(8075)))] = totemData[string_lower("Strength of Earth Totem")], -- Strength of Earth Totem - [string_lower(select(1, GetSpellInfo(33663)))] = totemData[string_lower("Earth Elemental Totem")], -- Earth Elemental Totem - [string_lower(select(1, GetSpellInfo(8143)))] = totemData[string_lower("Tremor Totem")], -- Tremor Totem - -- Air - [string_lower(select(1, GetSpellInfo(8177)))] = totemData[string_lower("Grounding Totem")], -- Grounding Totem - [string_lower(select(1, GetSpellInfo(8835)))] = totemData[string_lower("Grace of Air Totem")], -- Grace of Air Totem - [string_lower(select(1, GetSpellInfo(10595)))] = totemData[string_lower("Nature Resistance Totem")], -- Nature Resistance Totem - [string_lower(select(1, GetSpellInfo(8512)))] = totemData[string_lower("Windfury Totem")], -- Windfury Totem - [string_lower(select(1, GetSpellInfo(6495)))] = totemData[string_lower("Sentry Totem")], -- Sentry Totem - [string_lower(select(1, GetSpellInfo(15107)))] = totemData[string_lower("Windwall Totem")], -- Windwall Totem - [string_lower(select(1, GetSpellInfo(3738)))] = totemData[string_lower("Wrath of Air Totem")], -- Wrath of Air Totem - [string_lower(select(1, GetSpellInfo(25908)))] = totemData[string_lower("Tranquil Air Totem")], -- Tranquil Air Totem - }, - ["frFR"] = { - [string_lower("Totem d'\195\169lementaire de terre")] = totemData[string_lower("Earth Elemental Totem")], -- Earth Elemental Totem - [string_lower("Totem d'\195\169lementaire de feu")] = totemData[string_lower("Fire Elemental Totem")], -- Fire Elemental Totem - }, - ["ruRU"] = { - [string_lower("")] = totemData[string_lower("Sentry Totem")], -- Sentry Totem - } -} - local function GetTotemColorDefaultOptions() local defaultDB = {} local options = {} local indexedList = {} for k,v in pairs(totemData) do - tinsert(indexedList, {name = k, id = v.id, color = v.color, texture = v.texture, enabled = v.enabled}) + tinsert(indexedList, {name = k, id = v.id, color = v.color, texture = v.texture}) end table.sort(indexedList, function (a, b) return a.name < b.name end) for i=1,#indexedList do - defaultDB["totem" .. indexedList[i].id] = {color = indexedList[i].color, enabled = indexedList[i].enabled, alpha = 0.6, customText = ""} + defaultDB["totem" .. indexedList[i].id] = {color = indexedList[i].color, enabled = true, alpha = 0.6, customText = ""} options["npTotemsHideDisabledTotems"] = { order = 1, name = L["Hide Disabled Totem Plates"], @@ -186,17 +112,13 @@ local function GetTotemColorDefaultOptions() return defaultDB, options, indexedList end -function Gladdy:GetTotemColors() - return GetTotemColorDefaultOptions() -end - --------------------------------------------------- -- Core --------------------------------------------------- -local TotemPlates = Gladdy:NewModule("Totem Plates", nil, { +local TotemPlates = Gladdy:NewModule("Totem Plates", 2, { npTotems = true, npTotemsShowFriendly = true, npTotemsShowEnemy = true, @@ -214,9 +136,6 @@ local TotemPlates = Gladdy:NewModule("Totem Plates", nil, { npTotemsHideDisabledTotems = false, }) -LibStub("AceHook-3.0"):Embed(TotemPlates) -LibStub("AceTimer-3.0"):Embed(TotemPlates) - function TotemPlates.OnEvent(self, event, ...) TotemPlates[event](self, ...) end @@ -225,19 +144,18 @@ function TotemPlates:Initialize() self.numChildren = 0 self.activeTotemNameplates = {} self.totemPlateCache = {} - self:RegisterEvent("PLAYER_ENTERING_WORLD") - self:RegisterEvent("NAME_PLATE_UNIT_ADDED") - self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") - self:RegisterEvent("PLAYER_TARGET_CHANGED") - self:RegisterEvent("UNIT_NAME_UPDATE") - self:SetScript("OnEvent", TotemPlates.OnEvent) + if Gladdy.db.npTotems then + self:RegisterEvent("PLAYER_ENTERING_WORLD") + self:RegisterEvent("NAME_PLATE_UNIT_ADDED") + self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") + self:RegisterEvent("PLAYER_TARGET_CHANGED") + self:SetScript("OnEvent", TotemPlates.OnEvent) + end if Gladdy.db.npTotems and Gladdy.db.npTotemsShowEnemy then - --GetCVar("nameplateShowEnemyTotems") - --SetCVar("nameplateShowEnemyTotems", true); + SetCVar("nameplateShowEnemyTotems", true); end if Gladdy.db.npTotems and Gladdy.db.npTotemsShowFriendly then - --GetCVar("nameplateShowFriendlyTotems") - --SetCVar("nameplateShowFriendlyTotems", true); + SetCVar("nameplateShowFriendlyTotems", true); end self.addon = "Blizzard" if (IsAddOnLoaded("Plater")) then @@ -261,17 +179,67 @@ function TotemPlates:Initialize() end end +--------------------------------------------------- + +-- Events + +--------------------------------------------------- + function TotemPlates:PLAYER_ENTERING_WORLD() self.numChildren = 0 self.activeTotemNameplates = {} end -function TotemPlates:Reset() - --self:CancelAllTimers() - --self:UnhookAll() +function TotemPlates:PLAYER_TARGET_CHANGED() + for k,nameplate in pairs(self.activeTotemNameplates) do + TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, k) + end end +function TotemPlates:NAME_PLATE_UNIT_ADDED(unitID) + self:OnUnitEvent(unitID) +end + +function TotemPlates:NAME_PLATE_UNIT_REMOVED(unitID) + local nameplate = C_NamePlate.GetNamePlateForUnit(unitID) + self.activeTotemNameplates[unitID] = nil + --self:ToggleAddon(nameplate, true) + if nameplate.gladdyTotemFrame then + nameplate.gladdyTotemFrame:Hide() + nameplate.gladdyTotemFrame:SetParent(nil) + tinsert(self.totemPlateCache, nameplate.gladdyTotemFrame) + nameplate.gladdyTotemFrame = nil + end +end + +--------------------------------------------------- + +-- Gladdy Call + +--------------------------------------------------- + function TotemPlates:UpdateFrameOnce() + if Gladdy.db.npTotems then + self:RegisterEvent("PLAYER_ENTERING_WORLD") + self:RegisterEvent("NAME_PLATE_UNIT_ADDED") + self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") + self:RegisterEvent("PLAYER_TARGET_CHANGED") + self:SetScript("OnEvent", TotemPlates.OnEvent) + else + self:UnregisterEvent("PLAYER_ENTERING_WORLD") + self:UnregisterEvent("NAME_PLATE_UNIT_ADDED") + self:UnregisterEvent("NAME_PLATE_UNIT_REMOVED") + self:UnregisterEvent("PLAYER_TARGET_CHANGED") + self:SetScript("OnEvent", nil) + end + + if Gladdy.db.npTotems and Gladdy.db.npTotemsShowEnemy then + SetCVar("nameplateShowEnemyTotems", true); + end + if Gladdy.db.npTotems and Gladdy.db.npTotemsShowFriendly then + SetCVar("nameplateShowFriendlyTotems", true); + end + for k,nameplate in pairs(self.activeTotemNameplates) do local totemDataEntry = nameplate.gladdyTotemFrame.totemDataEntry nameplate.gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor) @@ -398,11 +366,7 @@ function TotemPlates:GetAddonFrame(nameplate) end end -function TotemPlates:PLAYER_TARGET_CHANGED() - for k,nameplate in pairs(self.activeTotemNameplates) do - TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, k) - end -end + function TotemPlates:ToggleAddon(nameplate, show) local addonFrames = { self:GetAddonFrame(nameplate) } @@ -448,12 +412,14 @@ function TotemPlates:OnUnitEvent(unitID) self:ToggleAddon(nameplate, true) return end - local nameplateName = UnitName(unitID) - local totemName = string_gsub(nameplateName, "^%s+", "") --trim - totemName = string_gsub(totemName, "%s+$", "") --trim - totemName = string_gsub(totemName, "%s+[I,V,X]+$", "") --trim rank - totemName = string_lower(totemName) - local totemDataEntry = localizedTotemData["default"][totemName] or localizedTotemData["frFR"][totemName] or localizedTotemData["ruRU"][totemName] + local npcType, _, _, _, _, npcId = strsplit("-", UnitGUID(unitID)) + if npcType ~= "Creature" then + return + end + local totemDataEntry = npcIdToTotemData[tonumber(npcId)] + if not totemDataEntry then + return + end if totemDataEntry and Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled then-- modify this nameplates if #self.totemPlateCache > 0 then nameplate.gladdyTotemFrame = tremove(self.totemPlateCache, #self.totemPlateCache) @@ -490,27 +456,6 @@ function TotemPlates:OnUnitEvent(unitID) end end -function TotemPlates:NAME_PLATE_UNIT_ADDED(...) - self:OnUnitEvent(...) -end - -function TotemPlates:UNIT_NAME_UPDATE(...) - self:OnUnitEvent(...) -end - -function TotemPlates:NAME_PLATE_UNIT_REMOVED(...) - local unitID = ... - local nameplate = C_NamePlate.GetNamePlateForUnit(unitID) - self.activeTotemNameplates[unitID] = nil - --self:ToggleAddon(nameplate, true) - if nameplate.gladdyTotemFrame then - nameplate.gladdyTotemFrame:Hide() - nameplate.gladdyTotemFrame:SetParent(nil) - tinsert(self.totemPlateCache, nameplate.gladdyTotemFrame) - nameplate.gladdyTotemFrame = nil - end -end - function TotemPlates:SetTotemAlpha(gladdyTotemFrame, unitID) local targetExists = UnitExists("target") local totemDataEntry = gladdyTotemFrame.totemDataEntry @@ -535,6 +480,64 @@ end --------------------------------------------------- +-- Test + +--------------------------------------------------- + +function TotemPlates:TestOnce() + if not self.testFrame then + self.testFrame = CreateFrame("Frame", nil, UIParent) + self.testFrame:SetWidth(1) + self.testFrame:SetHeight(32) + self.testFrame:SetPoint("CENTER", UIParent, "CENTER", 0, -140) + end + local totemDataEntry = npcIdToTotemData[5913] + self.testFrame:Show() + if not self.testFrame.gladdyTotemFrame then + if #self.totemPlateCache > 0 then + self.testFrame.gladdyTotemFrame = tremove(self.totemPlateCache, #self.totemPlateCache) + else + self:CreateTotemFrame(self.testFrame) + self.testFrame.gladdyTotemFrame:SetScript("OnHide", nil) + self.testFrame.gladdyTotemFrame:SetScript("OnUpdate", nil) + end + end + if Gladdy.db.npTotems then + self.testFrame.gladdyTotemFrame.unitID = "player" + self.testFrame.gladdyTotemFrame.totemDataEntry = totemDataEntry + self.testFrame.gladdyTotemFrame.parent = self.testFrame + self.testFrame.gladdyTotemFrame:SetParent(self.testFrame) + self.testFrame.gladdyTotemFrame:ClearAllPoints() + self.testFrame.gladdyTotemFrame:SetPoint("CENTER", self.testFrame, "CENTER", 0, 0) + self.testFrame.gladdyTotemFrame.totemIcon:SetTexture(totemDataEntry.texture) + self.testFrame.gladdyTotemFrame.totemBorder:SetVertexColor(Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.r, + Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.g, + Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.b, + Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].color.a) + self.testFrame.gladdyTotemFrame.totemName:SetText(Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].customText or "") + self.testFrame.gladdyTotemFrame.parent = self.testFrame + self.testFrame.gladdyTotemFrame:Show() + self.activeTotemNameplates["player"] = self.testFrame + else + self.testFrame.gladdyTotemFrame:Hide() + end +end + +function TotemPlates:Reset() + if self.testFrame then + if self.testFrame.gladdyTotemFrame then + self.testFrame.gladdyTotemFrame:Hide() + self.testFrame.gladdyTotemFrame:SetParent(nil) + tinsert(self.totemPlateCache, self.testFrame.gladdyTotemFrame) + self.testFrame.gladdyTotemFrame = nil + end + self.testFrame:Hide() + self.activeTotemNameplates["player"] = nil + end +end + +--------------------------------------------------- + -- Interface options --------------------------------------------------- @@ -549,21 +552,23 @@ function TotemPlates:GetOptions() npTotems = Gladdy:option({ type = "toggle", name = L["Enabled"], - desc = L["Turns totem icons instead of nameplates on or off. (Requires reload)"], + desc = L["Turns totem icons instead of nameplates on or off."], order = 3, width = 0.9, }), npTotemsShowFriendly = Gladdy:option({ type = "toggle", name = L["Show friendly"], - desc = L["Turns totem icons instead of nameplates on or off. (Requires reload)"], + desc = L["Turns totem icons instead of nameplates on or off."], + disabled = function() return not Gladdy.db.npTotems end, order = 4, width = 0.65, }), npTotemsShowEnemy = Gladdy:option({ type = "toggle", name = L["Show enemy"], - desc = L["Turns totem icons instead of nameplates on or off. (Requires reload)"], + desc = L["Turns totem icons instead of nameplates on or off."], + disabled = function() return not Gladdy.db.npTotems end, order = 5, width = 0.6, }), @@ -571,6 +576,7 @@ function TotemPlates:GetOptions() type = "group", childGroups = "tree", name = L["Frame"], + disabled = function() return not Gladdy.db.npTotems end, order = 4, args = { icon = { @@ -765,7 +771,8 @@ function TotemPlates:GetOptions() name = L["Customize Totems"], type = "group", childGroups = "tree", - args = select(2, Gladdy:GetTotemColors()) + disabled = function() return not Gladdy.db.npTotems end, + args = select(2, GetTotemColorDefaultOptions()) }, } end \ No newline at end of file -- 2.39.5 From 27573b75306c789239dc7e92503866dbc205fc66 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:37:42 +0100 Subject: [PATCH 098/227] cooldown refactor + positioning --- Constants.lua | 55 ++++++-- Images/downarrow.blp | Bin 0 -> 2564 bytes Images/uparrow.blp | Bin 0 -> 2564 bytes Modules/Cooldowns.lua | 307 ++++++++++++++++++++++++++++++------------ 4 files changed, 268 insertions(+), 94 deletions(-) create mode 100644 Images/downarrow.blp create mode 100644 Images/uparrow.blp diff --git a/Constants.lua b/Constants.lua index 8df815c..3f39ba3 100644 --- a/Constants.lua +++ b/Constants.lua @@ -13,6 +13,34 @@ tbl_sort(Gladdy.CLASSES) Gladdy.RACES = {"Scourge", "BloodElf", "Tauren", "Orc", "Troll", "NightElf", "Draenei", "Human", "Gnome", "Dwarf"} tbl_sort(Gladdy.RACES) +local RACE_ICON_TCOORDS = { + ["HUMAN_MALE"] = {0, 0.125, 0, 0.25}, + ["DWARF_MALE"] = {0.125, 0.25, 0, 0.25}, + ["GNOME_MALE"] = {0.25, 0.375, 0, 0.25}, + ["NIGHTELF_MALE"] = {0.375, 0.5, 0, 0.25}, + + ["TAUREN_MALE"] = {0, 0.125, 0.25, 0.5}, + ["SCOURGE_MALE"] = {0.125, 0.25, 0.25, 0.5}, + ["TROLL_MALE"] = {0.25, 0.375, 0.25, 0.5}, + ["ORC_MALE"] = {0.375, 0.5, 0.25, 0.5}, + + ["HUMAN_FEMALE"] = {0, 0.125, 0.5, 0.75}, + ["DWARF_FEMALE"] = {0.125, 0.25, 0.5, 0.75}, + ["GNOME_FEMALE"] = {0.25, 0.375, 0.5, 0.75}, + ["NIGHTELF_FEMALE"] = {0.375, 0.5, 0.5, 0.75}, + + ["TAUREN_FEMALE"] = {0, 0.125, 0.75, 1.0}, + ["SCOURGE_FEMALE"] = {0.125, 0.25, 0.75, 1.0}, + ["TROLL_FEMALE"] = {0.25, 0.375, 0.75, 1.0}, + ["ORC_FEMALE"] = {0.375, 0.5, 0.75, 1.0}, + + ["BLOODELF_MALE"] = {0.5, 0.625, 0.25, 0.5}, + ["BLOODELF_FEMALE"] = {0.5, 0.625, 0.75, 1.0}, + + ["DRAENEI_MALE"] = {0.5, 0.625, 0, 0.25}, + ["DRAENEI_FEMALE"] = {0.5, 0.625, 0.5, 0.75}, +} + local specBuffs = { -- DRUID [GetSpellInfo(45283)] = L["Restoration"], -- Natural Perfection @@ -958,23 +986,28 @@ local cooldownList = { [19503] = 30, -- Scatter Shot [14327] = 30, -- Scare Beast [19263] = 300, -- Deterrence; not on BM but can't do 2 specs - [14311] = { cd = 30, -- Freezing Trap - sharedCD = { - [13809] = true, -- Frost Trap - [34600] = true, -- Snake Trap - }, - }, + + [13809] = { cd = 30, -- Frost Trap sharedCD = { [14311] = true, -- Freezing Trap [34600] = true, -- Snake Trap }, + icon = select(3, GetSpellInfo(14311)), + }, + [14311] = { cd = 30, -- Freezing Trap + sharedCD = { + [13809] = true, -- Frost Trap + [34600] = true, -- Snake Trap + }, + icon = select(3, GetSpellInfo(14311)), }, [34600] = { cd = 30, -- Snake Trap sharedCD = { [14311] = true, -- Freezing Trap [13809] = true, -- Frost Trap }, + icon = select(3, GetSpellInfo(14311)), }, [34490] = { cd = 20, spec = L["Marksmanship"], }, -- Silencing Shot [19386] = { cd = 60, spec = L["Survival"], }, -- Wyvern Sting @@ -1024,19 +1057,19 @@ local cooldownList = { }, ["NightElf"] = { - [2651] = { cd = 180, spec = L["Discipline"], }, -- Elune's Grace - [10797] = { cd = 30, spec = L["Discipline"], }, -- Star Shards + [2651] = { cd = 180, spec = L["Discipline"], class = "PRIEST"}, -- Elune's Grace + [10797] = { cd = 30, spec = L["Discipline"], class = "PRIEST"}, -- Star Shards }, ["Draenei"] = { - [32548] = { cd = 300, spec = L["Discipline"], }, -- Hymn of Hope + [32548] = { cd = 300, spec = L["Discipline"], class = "PRIEST"}, -- Hymn of Hope }, ["Human"] = { - [13908] = { cd = 600, spec = L["Discipline"], }, -- Desperate Prayer + [13908] = { cd = 600, spec = L["Discipline"], class = "PRIEST"}, -- Desperate Prayer }, ["Gnome"] = { }, ["Dwarf"] = { - [13908] = { cd = 600, spec = L["Discipline"], }, -- Desperate Prayer + [13908] = { cd = 600, spec = L["Discipline"], class = "PRIEST"}, -- Desperate Prayer }, } function Gladdy:GetCooldownList() diff --git a/Images/downarrow.blp b/Images/downarrow.blp new file mode 100644 index 0000000000000000000000000000000000000000..464f90c425313603346b6165e22ea5d2adf9bdd7 GIT binary patch literal 2564 zcmbtVeM}Tb6n}SM1RKfGHfc;S?46#~s%b3RXqw7_B9eaab)(p50$8c?N84x{+8Tot zFnci-L}_npWR!Ddr%rMW*IX9CVdfb%%704^%j;)S6pZ=Ox>SvftO&t@tsdE5~bx?D!(xSheZpUL28a_R50j;E`b@9#F@6lSG z65LDn7S4!=tVw@>{+jFt!XDEemP$;%BxEn&7iD{GKS#hkmmY?H_JV$IeizmY}G}ruD^1StlQ-q74LR~Dj{4Bi!iiki@ z`6giWk$3M^QO}gSgQ8wmzE^X03w&W*=J~=GQ)4O;4Iy3{{*wMxX)CG2p#G}#t3UtD zP8;ILiD$+BZF64~?IFAO|B(LVOR^NFsORC=MSfOX<%1a_PI&tFB0r8ob+(`V*{r{; z`)vThd#XNH*n=4-&;7Q*Wl7RM8uvhwu!kjYjo-m|7LS$h10q6!Z=z6#4 z_x%fHA3Rtt{S`CsKPx{G_V@oD5O&Kwg<^HC+b8ySbV+{8ezC`OlXznJ!OSly#{T7U z>2ICSiQgbm53%7$dlaWVC4LSbjRy~71xlb=L0;tVD^`2-e4%gf8cuLOb^m`xEn(ust4zpgGvI^!EWJx1NHh& zrKg#<3^fOub`2md@FKq)ZCx(NMtM^H;&REao%410{63ZH!*A(2=MjF6cSJ@F1*Xkw zZ{$NfFw_+Axo;}48u^+uAD&E1dg`H^XJotRM=BthwlGgJDyo~tr?&or=5jDg9Xc9YD$PG)sa^=(ES(5It zd>CDEeCHXXeq*c=yT;`T1}_^M@!tW@!zDJxRz$H4=0U6N7pxCsYuD%X<$X(|YMBDH zSy@?{=2I^jzwtv|RSw1`615K1Z+yc8vj^=bl_LE{z{6ZAzo!56YUx7_19S_u7 zbiM=IJeZ+j z1Um^=EyH{fx7y~48#uI8#)ITzgJCT^R#IJ(z$P{_+RWaRGrLP1tn%ZJ!as%8 zVD;EF& literal 0 HcmV?d00001 diff --git a/Images/uparrow.blp b/Images/uparrow.blp new file mode 100644 index 0000000000000000000000000000000000000000..421372b7c810453a844e162cc1f536fff565be44 GIT binary patch literal 2564 zcmbtVe@xV67=P}-0GsTnwseE|-r13)t`)Y)nsA_qE{h-DE81*RC{+H)rfW2;@l*G` zRpKw|4w;xi^S)e`8!P2ZG{isbZnO?IOHYZAH63J2E4PEU=Xu}n7x0#4^Lh93-sgRO ze4gidpW|{@6+UMI0CT*_q~J;WKrHTf+z9~vxQB7y!W}ykmG>j)4;a*ehh^H1+~yqN zzYF>{dq_-Womf@`?;`XkqM`f{Y%#&o~%&;#l^U zhIykaV*0aRa7z6govGP7UXYpw5MBoje^wjxH?z%HHldoY(ihN4dO8=4Jh_R^ie&#@ zvNv!}EaXl31N1cH?<4Hc?P0OR}Lk%_2|x zN0)x#B7ceLlHwV0jJSrM<*KYBI-J2%Wf?nGy z>BkrDCq#dfZwE!cjC==Iz9;a-F`4J%AH+pBLD zi1*B%0$~q&oI?A{0+%OB|H-(A5`{fH|I*kkjA!r|`A!fK3S>z=%eG4BT! z$~lu>RUO`^u?=Dq8U-RF$#{1{!=e zV8FP@W$9N1=yOk8>u`K#7yzmgIL7hjlzSxg_e1T722Fm zXNTXV(u&VT1IC!YLseC`yX#yjfQDGp5Ub6TdhL?xrnP%Jz|*LYG>$h$aJBoakheTP zKL)vJP4*+2U$FC*!`l=4-8Qrz7#QHhO{=Zb2KgxW%fF#Q@@tWAk~=a`A-J{idVL?KwxZ)^YY5NQtU4dpv0Ax zrBV1u1&zm~zTCD$+Ve)fZnu58+2jM*xONRQC9d)$87go=y{R)@1j1U22Qk=Q{5rT(bVO`D?K#{%REIUD!QXq`>PaH~8hS3*Yx_ zrxKqq&KPeAe}>Rq7F6KPYR07ZX|v()7`3#66?;L$0kGuNadtXcO$j6 1) then + local current = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + local next + for k,v in pairs(Gladdy.db.cooldownCooldownsOrder[class]) do + if v == current - 1 then + next = k + end + end + Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] - 1 + Gladdy.db.cooldownCooldownsOrder[class][next] = Gladdy.db.cooldownCooldownsOrder[class][next] + 1 + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[tostring(spellId)].order = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[next].order = Gladdy.db.cooldownCooldownsOrder[class][next] + Gladdy:UpdateFrame() + end + end, + }, + downarrow = { + type = "execute", + name = "", + order = 3, + width = 0.1, + image = "Interface\\Addons\\Gladdy\\Images\\downarrow", + imageWidth = 20, + imageHeight = 20, + func = function() + if (Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] < tblLength) then + local current = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + local next + for k,v in pairs(Gladdy.db.cooldownCooldownsOrder[class]) do + if v == current + 1 then + next = k + end + end + Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + 1 + Gladdy.db.cooldownCooldownsOrder[class][next] = Gladdy.db.cooldownCooldownsOrder[class][next] - 1 + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[tostring(spellId)].order = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[next].order = Gladdy.db.cooldownCooldownsOrder[class][next] + Gladdy:UpdateFrame() + end + end, + } + } } - o = o + 1 end p = p + i end for i,race in ipairs(Gladdy.RACES) do - group[race] = { - type = "group", - name = L[race], - order = i + p, - icon = "Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races", - iconCoords = RACE_ICON_TCOORDS[upper(race) .. "_FEMALE"], - args = {} - } - local o = 1 for spellId,cooldown in pairs(Gladdy:GetCooldownList()[race]) do - group[race].args[tostring(spellId)] = { - type = "toggle", - name = select(1, GetSpellInfo(spellId)) .. (type(cooldown) == "table" and cooldown.spec and (" - " .. cooldown.spec) or ""), - order = o, - width = "full", - image = select(3, GetSpellInfo(spellId)), - get = function() - return Gladdy.db.cooldownCooldowns[tostring(spellId)] - end, - set = function(_, value) - Gladdy.db.cooldownCooldowns[tostring(spellId)] = value - Gladdy:UpdateFrame() - end + local tblLength = tableLength(Gladdy.db.cooldownCooldownsOrder[cooldown.class]) + local class = cooldown.class + group[class].args[tostring(spellId)] = { + name = "", + type = "group", + inline = true, + order = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)], + args = { + toggle = { + type = "toggle", + name = select(1, GetSpellInfo(spellId)) .. (type(cooldown) == "table" and cooldown.spec and (" - " .. cooldown.spec) or ""), + order = 1, + width = 1.1, + image = select(3, GetSpellInfo(spellId)), + get = function() + return Gladdy.db.cooldownCooldowns[tostring(spellId)] + end, + set = function(_, value) + Gladdy.db.cooldownCooldowns[tostring(spellId)] = value + Gladdy:UpdateFrame() + end + }, + uparrow = { + type = "execute", + name = "", + order = 2, + width = 0.1, + image = "Interface\\Addons\\Gladdy\\Images\\uparrow", + imageWidth = 20, + imageHeight = 20, + func = function() + if (Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] > 1) then + local current = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + local next + for k,v in pairs(Gladdy.db.cooldownCooldownsOrder[class]) do + if v == current - 1 then + next = k + end + end + Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] - 1 + Gladdy.db.cooldownCooldownsOrder[class][next] = Gladdy.db.cooldownCooldownsOrder[class][next] + 1 + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[tostring(spellId)].order = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[next].order = Gladdy.db.cooldownCooldownsOrder[class][next] + Gladdy:UpdateFrame() + end + end, + }, + downarrow = { + type = "execute", + name = "", + order = 3, + width = 0.1, + image = "Interface\\Addons\\Gladdy\\Images\\downarrow", + imageWidth = 20, + imageHeight = 20, + func = function() + if (Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] < tblLength) then + local current = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + local next + for k,v in pairs(Gladdy.db.cooldownCooldownsOrder[class]) do + if v == current + 1 then + next = k + end + end + Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + 1 + Gladdy.db.cooldownCooldownsOrder[class][next] = Gladdy.db.cooldownCooldownsOrder[class][next] - 1 + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[tostring(spellId)].order = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] + Gladdy.options.args["Cooldowns"].args.cooldowns.args[class].args[next].order = Gladdy.db.cooldownCooldownsOrder[class][next] + Gladdy:UpdateFrame() + end + end, + } + } } - o = o + 1 end end return group -- 2.39.5 From 907c64a864f33b97e0ff1648d2dec5da134f58ba Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:38:05 +0100 Subject: [PATCH 099/227] grouping first step --- Modules/Classicon.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Modules/Classicon.lua b/Modules/Classicon.lua index e20ce46..d9c476a 100644 --- a/Modules/Classicon.lua +++ b/Modules/Classicon.lua @@ -15,6 +15,8 @@ local Classicon = Gladdy:NewModule("Class Icon", 81, { classIconYOffset = 0, classIconFrameStrata = "MEDIUM", classIconFrameLevel = 5, + classIconGroup = false, + classIconGroupDirection = "RIGHT" }) local classIconPath = "Interface\\Addons\\Gladdy\\Images\\Classes\\" @@ -133,6 +135,14 @@ function Classicon:UpdateFrame(unit) Gladdy:SetPosition(classIcon, unit, "classIconXOffset", "classIconYOffset", Classicon:LegacySetPosition(classIcon, unit), Classicon) + if (Gladdy.db.classIconGroup) then + if (unit ~= "arena1") then + local previousUnit = "arena" .. string.gsub(unit, "arena", "") - 1 + self.frames[unit]:ClearAllPoints() + self.frames[unit]:SetPoint("LEFT", self.frames[previousUnit], "RIGHT", 0, 0) + end + end + if (unit == "arena1") then Gladdy:CreateMover(classIcon, "classIconXOffset", "classIconYOffset", L["Class Icon"], {"TOPLEFT", "TOPLEFT"}, -- 2.39.5 From b14406f75f2ac3d9674f63ac25c5f9437db18e7c Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:38:28 +0100 Subject: [PATCH 100/227] totempulse --- Modules/TotemPulse.lua | 641 +++++++++++++++++++++++++++++++---------- 1 file changed, 489 insertions(+), 152 deletions(-) diff --git a/Modules/TotemPulse.lua b/Modules/TotemPulse.lua index a2a49a9..6cc6c5e 100644 --- a/Modules/TotemPulse.lua +++ b/Modules/TotemPulse.lua @@ -1,57 +1,120 @@ +local select, pairs, tremove, tinsert, format, strsplit, tonumber = select, pairs, tremove, tinsert, format, strsplit, tonumber local C_NamePlate = C_NamePlate local Gladdy = LibStub("Gladdy") local L = Gladdy.L -local tremove, tinsert = tremove, tinsert local GetSpellInfo, CreateFrame = GetSpellInfo, CreateFrame -local GetTime, GetPlayerInfoByGUID, UnitIsEnemy, UnitGUID = GetTime, GetPlayerInfoByGUID, UnitIsEnemy, UnitGUID +local GetTime, UnitIsEnemy, UnitGUID = GetTime, UnitIsEnemy, UnitGUID local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo -local cooldowns = { - [2484] = 3, --Earthbind - [8143] = 4, -- Tremor - [8166] = 4, -- Poison Cleansing - [8170] = 4, -- Disease Cleansing - [1535] = { cd = 4, once = true }, -- Fire Nova 1 - [8498] = { cd = 4, once = true }, -- Fire Nova 2 - [8499] = { cd = 4, once = true }, -- Fire Nova 3 - [11314] = { cd = 4, once = true }, -- Fire Nova 4 - [11315] = { cd = 4, once = true }, -- Fire Nova 5 - [25546] = { cd = 4, once = true }, -- Fire Nova 6 - [25547] = { cd = 4, once = true }, -- Fire Nova 7 - [8190] = 2, -- Magma 1 - [10585] = 2, -- Magma 2 - [10586] = 2, -- Magma 3 - [10587] = 2, -- Magma 4 - [25552] = 2, -- Magma 5 - [5394] = 2, -- Healing Stream 1 - [6375] = 2, -- Healing Stream 2 - [6377] = 2, -- Healing Stream 3 - [10462] = 2, -- Healing Stream 4 - [10463] = 2, -- Healing Stream 5 - [25567] = 2, -- Healing Stream 6 - [5675] = 2, -- Mana Spring 1 - [10495] = 2, -- Mana Spring 2 - [10496] = 2, -- Mana Spring 3 - [10497] = 2, -- Mana Spring 4 - [25570] = 2, -- Mana Spring 5 -} +--------------------------------------------------- +-- Helper + +--------------------------------------------------- + +local totemData, npcIdToTotemData, cooldowns = Gladdy:GetTotemData() local ninetyDegreeInRad = 90 * math.pi / 180 +local function TotemOptions() + local defaultDB = {} + local options = {} + local indexedList = {} + for k,v in pairs(totemData) do + if v.pulse then + tinsert(indexedList, {name = k, id = v.id, color = v.color, texture = v.texture}) + end + end + table.sort(indexedList, function (a, b) + return a.name < b.name + end) + for i=1,#indexedList do + defaultDB["totem" .. indexedList[i].id] = {enabled = true, attachToGladdyTotemFrame = true, style = "COOLDOWN", reverse = false} + options["totem" .. indexedList[i].id] = { + order = i+1, + name = select(1, GetSpellInfo(indexedList[i].id)), + --inline = true, + width = "3.0", + type = "group", + icon = indexedList[i].texture, + args = { + headerTotemConfig = { + type = "header", + name = format("|T%s:20|t %s", indexedList[i].texture, select(1, GetSpellInfo(indexedList[i].id))), + order = 1, + }, + enabled = { + order = 2, + name = L["Enabled"], + desc = "Enable " .. format("|T%s:20|t %s", indexedList[i].texture, select(1, GetSpellInfo(indexedList[i].id))), + type = "toggle", + width = "full", + get = function() return Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].enabled end, + set = function(_, value) + Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].enabled = value + Gladdy:UpdateFrame() + end + }, + attachToGladdyTotemFrame = { + order = 3, + disabled = function() return not Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].enabled end, + name = L["Attach To TotemPlate"], + desc = "Attach " .. format("|T%s:20|t %s", indexedList[i].texture, select(1, GetSpellInfo(indexedList[i].id))) .. " To TotemPlate", + type = "toggle", + width = "full", + get = function() return Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].attachToGladdyTotemFrame end, + set = function(_, value) + Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].attachToGladdyTotemFrame = value + Gladdy:UpdateFrame() + end + }, + style = { + type = "select", + name = L["Style"], + order = 4, + values = { + COOLDOWN = L["Cooldown"], + Vertical = L["Bar vertical"], + Horizontal = L["Bar horizontal"] + }, + get = function() return Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].style end, + set = function(_, value) + Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].style = value + Gladdy:UpdateFrame() + end + }, + reverse = { + order = 5, + disabled = function() return not Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].enabled end, + name = L["Reverse"], + type = "toggle", + width = "full", + get = function() return Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].reverse end, + set = function(_, value) + Gladdy.dbi.profile.totemPulseTotems["totem" .. indexedList[i].id].reverse = value + Gladdy:UpdateFrame() + end + }, + } + } + end + return options,defaultDB +end + --------------------------------------------------- -- Core --------------------------------------------------- - -local TotemPulse = Gladdy:NewModule("Totem Pulse", nil, { +local TotemPulse = Gladdy:NewModule("Totem Pulse", 1, { totemPulseEnabled = true, totemPulseEnabledShowFriendly = true, totemPulseEnabledShowEnemy = true, - totemPulseAttachToTotemPlate = true, totemPulseStyle = "", -- "COOLDOWN", "COOLDOWNREVERSE", "BARVERTICAL", "BARHORIZONTAL" - totemPulseTextColor = { r = 1, g = 1, b = 1, a = 0 }, + --text + totemPulseTextColor = { r = 1, g = 1, b = 1, a = 1 }, + totemPulseTextSize = 14, + totemPulseTextFont = "DorisPP", --bar totemPulseBarWidth = 40, totemPulseBarHeight = 20, @@ -60,9 +123,15 @@ local TotemPulse = Gladdy:NewModule("Totem Pulse", nil, { totemPulseBarBorderColor = { r = 0, g = 0, b = 0, a = 1 }, totemPulseBarBorderSize = 5, totemPulseBarBorderStyle = "Gladdy Tooltip squared", - totemPulseBarTexture = "Smooth", + totemPulseBarTexture = "Flat", + totemPulseBarReverse = false, --cooldown + totemPulseCooldownWidth = 40, + totemPulseCooldownHeight = 20, totemPulseCooldownAlpha = 1, + totemPulseCooldownReverse = true, + --totems + totemPulseTotems = select(2, TotemOptions()) }) function TotemPulse.OnEvent(self, event, ...) @@ -70,16 +139,18 @@ function TotemPulse.OnEvent(self, event, ...) end function TotemPulse:Initialize() - self.cooldowns = cooldowns self.timeStamps = {} self.cooldownCache = {} self.barCache = {} self.activeFrames = { bars = {}, cooldowns = {} } - self:SetScript("OnEvent", self.OnEvent) - self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") - self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") - self:RegisterEvent("NAME_PLATE_UNIT_ADDED") - self:RegisterEvent("UNIT_NAME_UPDATE") + if Gladdy.db.totemPulseEnabled then + self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") + self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") + self:RegisterEvent("NAME_PLATE_UNIT_ADDED") + self:RegisterEvent("UNIT_NAME_UPDATE") + self:SetScript("OnEvent", self.OnEvent) + end + self:RegisterEvent("PLAYER_ENTERING_WORLD") end --------------------------------------------------- @@ -88,23 +159,46 @@ end --------------------------------------------------- +function TotemPulse:PLAYER_ENTERING_WORLD() + self.timeStamps = {} +end + function TotemPulse:COMBAT_LOG_EVENT_UNFILTERED() - local _,eventType,_,sourceGUID,_,_,_,destGUID,_,_,_,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool = CombatLogGetCurrentEventInfo() - print(eventType, spellName, spellID, destGUID) - if eventType == "SPELL_SUMMON" then - if cooldowns[spellID] then - print(eventType, spellName, spellID, GetPlayerInfoByGUID(sourceGUID)) - self.timeStamps[destGUID] = { timeStamp = GetTime(), spellID = spellID } - end - elseif eventType == "UNIT_DESTROYED" then + local _,eventType,_,sourceGUID,_,_,_,destGUID,_,_,_,spellID,spellName = CombatLogGetCurrentEventInfo() + local pulse = cooldowns[spellID] or cooldowns[spellName] + local npcId = tonumber(select(6, strsplit("-", destGUID)), 10) + if eventType == "UNIT_DESTROYED" and self.timeStamps[destGUID] then self.timeStamps[destGUID] = nil end + if (eventType == "SWING_DAMAGE" or eventType == "SPELL_DAMAGE") and self.timeStamps[destGUID] and npcIdToTotemData[npcId] then + self.timeStamps[destGUID] = nil + end + if not pulse then + return + end + if eventType == "SPELL_CAST_SUCCESS" then + self.timeStamps[sourceGUID] = { timeStamp = GetTime(), pulse = pulse } + end + if eventType == "SPELL_SUMMON" then + if not npcIdToTotemData[npcId] then + return + end + if not Gladdy.dbi.profile.totemPulseTotems["totem" .. npcIdToTotemData[npcId].id].enabled then + return + end + if self.timeStamps[sourceGUID] then + self.timeStamps[destGUID] = self.timeStamps[sourceGUID] + self.timeStamps[destGUID].id = npcIdToTotemData[npcId].id + self.timeStamps[sourceGUID] = nil + else + self.timeStamps[destGUID] = { timeStamp = GetTime(), pulse = pulse, id = npcIdToTotemData[npcId].id } + end + end end function TotemPulse:NAME_PLATE_UNIT_REMOVED(unitId) local nameplate = C_NamePlate.GetNamePlateForUnit(unitId) if nameplate.totemTick then - print("NAME_PLATE_UNIT_REMOVED", nameplate.totemTick) nameplate.totemTick:SetScript("OnUpdate", nil) nameplate.totemTick:Hide() nameplate.totemTick:SetParent(nil) @@ -123,16 +217,18 @@ function TotemPulse:UNIT_NAME_UPDATE(unitId) self:OnUnitAdded(unitId, "UNIT_NAME_UPDATE") end -function TotemPulse:OnUnitAdded(unitId, event) +function TotemPulse:OnUnitAdded(unitId) local isEnemy = UnitIsEnemy("player", unitId) local guid = UnitGUID(unitId) + if strsplit("-", guid) ~= "Creature" then + return + end local nameplate = C_NamePlate.GetNamePlateForUnit(unitId) - if nameplate then - print(event, self.timeStamps[guid], nameplate.totemTick) - if self.timeStamps[guid] then - self:AddTimerFrame(nameplate, self.timeStamps[guid], Gladdy.db.totemPulseAttachToTotemPlate and nameplate.gladdyTotemFrame) + if nameplate and (isEnemy and Gladdy.db.totemPulseEnabledShowEnemy or not isEnemy and Gladdy.db.totemPulseEnabledShowFriendly) then + if self.timeStamps[guid] and strsplit("-", guid) then + self:AddTimerFrame(nameplate, self.timeStamps[guid]) else if nameplate.totemTick then nameplate.totemTick:SetScript("OnUpdate", nil) @@ -153,35 +249,41 @@ end --------------------------------------------------- -function TotemPulse:CreateCooldownFrame(gladdyTotemFrame) +function TotemPulse:CreateCooldownFrame(style) local totemTick - if gladdyTotemFrame then + if style == "COOLDOWN" then if #self.cooldownCache > 0 then totemTick = tremove(self.cooldownCache, #self.cooldownCache) else - Gladdy:Print("TotemPulse:CreateCooldownFrame()", "CreateCooldown") - totemTick = CreateFrame("Cooldown", nil, nil, "CooldownFrameTemplate") - totemTick.noCooldownCount = true + totemTick = CreateFrame("Frame") + totemTick:SetWidth(Gladdy.db.totemPulseCooldownWidth) + totemTick:SetHeight(Gladdy.db.totemPulseCooldownHeight) + totemTick.cd = CreateFrame("Cooldown", nil, totemTick, "CooldownFrameTemplate") + totemTick.cd:SetAllPoints(totemTick) + totemTick.cd.noCooldownCount = true totemTick:SetFrameStrata("MEDIUM") totemTick:SetFrameLevel(4) - totemTick:SetReverse(true) - totemTick:SetHideCountdownNumbers(true) - totemTick:SetAlpha(Gladdy.db.totemPulseCooldownAlpha) + totemTick.cd:SetReverse(Gladdy.db.totemPulseCooldownReverse) + totemTick.cd:SetHideCountdownNumbers(true) + totemTick.cd:SetAlpha(Gladdy.db.totemPulseCooldownAlpha) - totemTick.text = totemTick:CreateFontString(nil, "OVERLAY") - totemTick.text:SetPoint("LEFT", totemTick, "LEFT", 4, 0) - totemTick.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") - totemTick.text:SetJustifyH("LEFT") + totemTick.textFrame = CreateFrame("Frame", nil, totemTick) + totemTick.textFrame:SetAllPoints(totemTick) + totemTick.text = totemTick.textFrame:CreateFontString(nil, "OVERLAY") + totemTick.text:SetPoint("CENTER", totemTick.textFrame, "CENTER") + totemTick.text:SetFont(Gladdy:SMFetch("font", "totemPulseTextFont"), Gladdy.db.totemPulseTextSize, "OUTLINE") + totemTick.text:SetJustifyH("CENTER") totemTick.text:SetShadowOffset(1, -1) totemTick.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) end else if #self.barCache > 0 then - Gladdy:Print("TotemPulse:CreateCooldownFrame()", #self.barCache) totemTick = tremove(self.barCache, #self.barCache) + totemTick.bar:SetOrientation(style) + totemTick.spark:SetRotation(style == "Vertical" and ninetyDegreeInRad or 0) + totemTick.spark:SetHeight(style == "Vertical" and Gladdy.db.totemPulseBarWidth or Gladdy.db.totemPulseBarHeight) else - Gladdy:Print("TotemPulse:CreateCooldownFrame()", "CreateBar") totemTick = CreateFrame("Frame", nil) totemTick:SetWidth(Gladdy.db.totemPulseBarWidth) @@ -193,24 +295,21 @@ function TotemPulse:CreateCooldownFrame(gladdyTotemFrame) edgeSize = Gladdy.db.totemPulseBarBorderSize }) totemTick.backdrop:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBorderColor)) totemTick.backdrop:SetFrameLevel(1) - --totemTick.backdrop:SetFrameStrata(Gladdy.db.castBarFrameStrata) - --totemTick.backdrop:SetFrameLevel(Gladdy.db.castBarFrameLevel - 1) totemTick.bar = CreateFrame("StatusBar", nil, totemTick) totemTick.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) totemTick.bar:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.totemPulseBarColor)) - totemTick.bar:SetOrientation("Vertical") + totemTick.bar:SetOrientation(style) totemTick.bar:SetFrameLevel(0) - totemTick.bar:SetPoint("TOPLEFT", totemTick, "TOPLEFT", (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) - totemTick.bar:SetPoint("BOTTOMRIGHT", totemTick, "BOTTOMRIGHT", -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) + totemTick.bar:SetAllPoints(totemTick) totemTick.spark = totemTick.bar:CreateTexture(nil, "OVERLAY") totemTick.spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark") totemTick.spark:SetBlendMode("ADD") totemTick.spark:SetWidth(8) - totemTick.spark:SetHeight(40) + totemTick.spark:SetHeight(style == "Vertical" and Gladdy.db.totemPulseBarWidth or Gladdy.db.totemPulseBarHeight) totemTick.spark.position = 0 - totemTick.spark:SetRotation(ninetyDegreeInRad) + totemTick.spark:SetRotation(style == "Vertical" and ninetyDegreeInRad or 0) totemTick.bg = totemTick.bar:CreateTexture(nil, "BACKGROUND") totemTick.bg:SetTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) @@ -218,9 +317,9 @@ function TotemPulse:CreateCooldownFrame(gladdyTotemFrame) totemTick.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBgColor)) totemTick.text = totemTick.bar:CreateFontString(nil, "OVERLAY") - totemTick.text:SetPoint("LEFT", totemTick, "LEFT", 4, 0) - totemTick.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") - totemTick.text:SetJustifyH("LEFT") + totemTick.text:SetPoint("CENTER", totemTick, "CENTER", 0, 0) + totemTick.text:SetFont(Gladdy:SMFetch("font", "totemPulseTextFont"), Gladdy.db.totemPulseTextSize, "OUTLINE") + totemTick.text:SetJustifyH("CENTER") totemTick.text:SetShadowOffset(1, -1) totemTick.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) end @@ -228,64 +327,52 @@ function TotemPulse:CreateCooldownFrame(gladdyTotemFrame) return totemTick end -function TotemPulse:AddTimerFrame(nameplate, timestamp, gladdyTotemFrame) - if nameplate:IsShown() and cooldowns[timestamp.spellID] then +function TotemPulse:AddTimerFrame(nameplate, timestamp, test) + if (nameplate:IsShown() or test) and timestamp then + local gladdyTotemFrame = Gladdy.db.totemPulseTotems["totem" .. timestamp.id].attachToGladdyTotemFrame and nameplate.gladdyTotemFrame if not nameplate.totemTick then - nameplate.totemTick = TotemPulse:CreateCooldownFrame(gladdyTotemFrame) + nameplate.totemTick = TotemPulse:CreateCooldownFrame(Gladdy.db.totemPulseTotems["totem" .. timestamp.id].style) end - nameplate.totemTick:SetParent(nameplate) - nameplate.totemTick:ClearAllPoints() - if gladdyTotemFrame then + nameplate.totemTick:SetParent(nameplate.gladdyTotemFrame or nameplate) + --nameplate.totemTick:ClearAllPoints() + --[[if gladdyTotemFrame then nameplate.totemTick:SetPoint("TOPLEFT", gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) nameplate.totemTick:SetPoint("BOTTOMRIGHT", gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) + if nameplate.totemTick.bar then + nameplate.totemTick.spark:SetHeight(Gladdy.db.totemPulseTotems["totem" .. timestamp.id].style == "Vertical" and gladdyTotemFrame:GetWidth() or gladdyTotemFrame:GetHeight()) + end else - nameplate.totemTick:SetPoint("TOP", nameplate, "BOTTOM") - end + nameplate.totemTick:SetPoint("TOP", nameplate.gladdyTotemFrame, "BOTTOM", 0, -5) + if nameplate.totemTick.bar then + nameplate.totemTick.spark:SetHeight(Gladdy.db.totemPulseTotems["totem" .. timestamp.id].style == "Vertical" and Gladdy.db.totemPulseBarWidth or Gladdy.db.totemPulseBarHeight) + end + end--]] - local cd = type(cooldowns[timestamp.spellID]) == "table" and cooldowns[timestamp.spellID].cd or cooldowns[timestamp.spellID] - local once = type(cooldowns[timestamp.spellID]) == "table" + local cd = type(timestamp.pulse) == "table" and timestamp.pulse.cd or timestamp.pulse + local once = type(timestamp.pulse) == "table" local cooldown = (timestamp.timeStamp - GetTime()) % cd - if not gladdyTotemFrame then - nameplate.totemTick.bar:SetMinMaxValues(0, cd) - nameplate.totemTick.bar:SetValue(cooldown) - self.activeFrames.bars[nameplate.totemTick] = nameplate.totemTick - else - self.activeFrames.cooldowns[nameplate.totemTick] = nameplate.totemTick - end - nameplate.totemTick.timestamp = timestamp.timeStamp nameplate.totemTick.maxValue = cd nameplate.totemTick.value = cooldown nameplate.totemTick.once = once + nameplate.totemTick.id = timestamp.id + + if nameplate.totemTick.bar then + self:UpdateBarPartial(nameplate.totemTick) + nameplate.totemTick.bar:SetMinMaxValues(0, cd) + nameplate.totemTick.bar:SetValue(cooldown) + self.activeFrames.bars[nameplate.totemTick] = nameplate.totemTick + else + self:UpdateCooldown(nameplate.totemTick) + self.activeFrames.cooldowns[nameplate.totemTick] = nameplate.totemTick + end - print("once", once, " - totemTick.once", nameplate.totemTick.once, " - cd off", math.abs(timestamp.timeStamp - GetTime()) > cd) if once and GetTime() - timestamp.timeStamp > cd then nameplate.totemTick:SetScript("OnUpdate", nil) nameplate.totemTick:Hide() - print("nameplate.totemTick:Hide()") else - nameplate.totemTick:SetScript("OnUpdate", function(totemTick, elapsed) - totemTick.now = GetTime() - totemTick.value = (totemTick.timestamp - totemTick.now) % totemTick.maxValue - if totemTick.once and totemTick.now - totemTick.timestamp >= totemTick.maxValue then - totemTick:SetScript("OnUpdate", nil) - print("OnUpdate totemTick:Hide()") - totemTick:Hide() - end - if not totemTick.bar and not (totemTick.once and totemTick.now - totemTick.timestamp >= totemTick.maxValue) then - totemTick:SetCooldown(totemTick.now - totemTick.value, totemTick.maxValue) - elseif totemTick.bar then - totemTick.spark.position = (totemTick.value / totemTick.maxValue) * totemTick.bar:GetHeight() - if ( totemTick.spark.position < 0 ) then - totemTick.spark.position = 0 - end - totemTick.spark:SetPoint("CENTER", totemTick.bar, "BOTTOM", 0, totemTick.spark.position) - totemTick.bar:SetValue(totemTick.value) - end - totemTick.text:SetFormattedText("%.1f", totemTick.value) - end) - print("nameplate.totemTick:Show()") + nameplate.totemTick:SetScript("OnUpdate", TotemPulse.TotemPulseOnUpdate) nameplate.totemTick:Show() end else @@ -301,39 +388,175 @@ function TotemPulse:AddTimerFrame(nameplate, timestamp, gladdyTotemFrame) end end -function TotemPulse:UpdateBar(bar) +function TotemPulse:SetSparkPosition(totemTick, referenceSize, vertical) + if not Gladdy.db.totemPulseTotems["totem" .. totemTick.id].reverse then + totemTick.bar:SetValue(totemTick.maxValue - totemTick.value) + totemTick.spark.position = referenceSize / 2 - (totemTick.value / totemTick.maxValue) * referenceSize + if ( totemTick.spark.position < -referenceSize / 2 ) then + totemTick.spark.position = -referenceSize / 2 + end + else + totemTick.bar:SetValue(totemTick.value) + totemTick.spark.position = referenceSize / 2 - ((totemTick.maxValue - totemTick.value) / totemTick.maxValue) * referenceSize + if ( totemTick.spark.position > referenceSize / 2 ) then + totemTick.spark.position = referenceSize / 2 + end + end + totemTick.spark:SetPoint("CENTER", totemTick.bar, "CENTER", vertical and 0 or totemTick.spark.position, vertical and totemTick.spark.position or 0) +end + +function TotemPulse.TotemPulseOnUpdate(totemTick) + totemTick.now = GetTime() + totemTick.value = (totemTick.timestamp - totemTick.now) % totemTick.maxValue + if totemTick.once and totemTick.now - totemTick.timestamp >= totemTick.maxValue then + totemTick:SetScript("OnUpdate", nil) + totemTick:Hide() + end + if not totemTick.bar and not (totemTick.once and totemTick.now - totemTick.timestamp >= totemTick.maxValue) then + if Gladdy.db.totemPulseTotems["totem" .. totemTick.id].reverse then + totemTick.cd:SetCooldown(totemTick.now - totemTick.value, totemTick.maxValue) + else + totemTick.cd:SetCooldown(totemTick.now - (totemTick.maxValue - totemTick.value), totemTick.maxValue) + end + elseif totemTick.bar then + if Gladdy.db.totemPulseTotems["totem" .. totemTick.id].style == "Vertical" then + TotemPulse:SetSparkPosition(totemTick, totemTick.bar:GetHeight(), true) + else + TotemPulse:SetSparkPosition(totemTick, totemTick.bar:GetWidth(), false) + end + end + totemTick.text:SetFormattedText("%.1f", totemTick.value) +end + +--------------------------------------------------- + +-- Update Styles + +--------------------------------------------------- + +function TotemPulse:UpdateBarPartial(bar) + local style = bar.id and Gladdy.db.totemPulseTotems["totem" .. bar.id].style + bar:SetWidth(Gladdy.db.totemPulseBarWidth) bar:SetHeight(Gladdy.db.totemPulseBarHeight) + bar.spark:SetWidth(8) + bar.spark:SetHeight(style == "Vertical" and Gladdy.db.totemPulseBarWidth or Gladdy.db.totemPulseBarHeight) + bar.spark:SetRotation(style == "Vertical" and ninetyDegreeInRad or 0) + + if (bar:GetParent()) then + if bar:GetParent().gladdyTotemFrame then + bar:SetParent(bar:GetParent().gladdyTotemFrame) + else + bar:SetParent(bar:GetParent()) + end + --[[if bar.id and Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame then + if not bar:GetParent().totemIcon and bar:GetParent().gladdyTotemFrame then + bar:SetParent(bar:GetParent().gladdyTotemFrame) + end + elseif bar.id and not Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame then + if bar:GetParent().totemIcon then + bar:SetParent(bar:GetParent():GetParent()) + end + end--]] + bar:ClearAllPoints() + if (bar.id and bar:GetParent().totemIcon and Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame) then + bar:SetPoint("TOPLEFT", bar:GetParent(), "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) + bar:SetPoint("BOTTOMRIGHT", bar:GetParent(), "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) + if style then + bar.spark:SetHeight(style == "Vertical" and bar:GetParent():GetWidth() or bar:GetParent():GetHeight()) + end + else + bar:SetPoint("TOP", bar:GetParent(), "BOTTOM", 0, 0) + end + end + bar.bar:SetOrientation(style ~= "COOLDOWN" and style or bar.bar:GetOrientation()) +end + +function TotemPulse:UpdateBar(bar) + self:UpdateBarPartial(bar) + bar.backdrop:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "totemPulseBarBorderStyle"), edgeSize = Gladdy.db.totemPulseBarBorderSize }) bar.backdrop:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBorderColor)) bar.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) bar.bar:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.totemPulseBarColor)) - bar.bar:SetOrientation("Vertical") - bar.bar:SetPoint("TOPLEFT", bar, "TOPLEFT", (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) - bar.bar:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", -(Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.totemPulseBarBorderSize/Gladdy.db.statusbarBorderOffset)) - - bar.spark:SetWidth(8) - bar.spark:SetHeight(40) - bar.spark:SetRotation(ninetyDegreeInRad) + bar.bar:SetAllPoints(bar) bar.bg:SetTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) bar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBgColor)) - bar.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") + bar.text:SetFont(Gladdy:SMFetch("font", "totemPulseTextFont"), Gladdy.db.totemPulseTextSize, "OUTLINE") bar.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) end function TotemPulse:UpdateCooldown(cooldown) - cooldown:SetReverse(true) - cooldown:SetAlpha(Gladdy.db.totemPulseCooldownAlpha) - cooldown.text:SetFont("Fonts\\FRIZQT__.TTF", 16, "OUTLINE") + cooldown:SetWidth(Gladdy.db.totemPulseCooldownWidth) + cooldown:SetHeight(Gladdy.db.totemPulseCooldownHeight) + + if cooldown:GetParent() then + --[[if cooldown.id and Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame then + if not cooldown:GetParent().totemIcon and cooldown:GetParent().gladdyTotemFrame then + cooldown:SetParent(cooldown:GetParent().gladdyTotemFrame) + end + elseif cooldown.id and not Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame then + if cooldown:GetParent().totemIcon then + cooldown:SetParent(cooldown:GetParent():GetParent()) + end + end--]] + if cooldown:GetParent().gladdyTotemFrame then + cooldown:SetParent(cooldown:GetParent().gladdyTotemFrame) + else + cooldown:SetParent(cooldown:GetParent()) + end + cooldown:ClearAllPoints() + if cooldown.id and Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame and cooldown:GetParent().totemIcon then + cooldown:SetPoint("TOPLEFT", cooldown:GetParent(), "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) + cooldown:SetPoint("BOTTOMRIGHT", cooldown:GetParent(), "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) + else + cooldown:SetPoint("TOP", cooldown:GetParent(), "BOTTOM", 0, -0.5) + end + end + + cooldown.cd:SetCooldown(0,0) + cooldown.cd:SetReverse(Gladdy.db.totemPulseCooldownReverse) + cooldown.cd:SetAlpha(Gladdy.db.totemPulseCooldownAlpha) + cooldown.text:SetFont(Gladdy:SMFetch("font", "totemPulseTextFont"), Gladdy.db.totemPulseTextSize, "OUTLINE") cooldown.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) end function TotemPulse:UpdateFrameOnce() + if Gladdy.frame.testing then + TotemPulse:TestOnce() + end + if Gladdy.db.totemPulseEnabled then + self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") + self:RegisterEvent("NAME_PLATE_UNIT_REMOVED") + self:RegisterEvent("NAME_PLATE_UNIT_ADDED") + self:RegisterEvent("UNIT_NAME_UPDATE") + self:SetScript("OnEvent", self.OnEvent) + else + for _,bar in pairs(self.activeFrames.bars) do + bar:SetScript("OnUpdate", nil) + bar:Hide() + bar:SetParent(nil) + tinsert(self.barCache, bar) + self.activeFrames.bars[bar] = nil + end + for _,cooldown in pairs(self.activeFrames.cooldowns) do + cooldown:SetScript("OnUpdate", nil) + cooldown:Hide() + cooldown:SetParent(nil) + tinsert(self.cooldownCache, cooldown) + self.activeFrames.cooldowns[cooldown] = nil + end + self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED") + self:UnregisterEvent("NAME_PLATE_UNIT_REMOVED") + self:UnregisterEvent("NAME_PLATE_UNIT_ADDED") + self:UnregisterEvent("UNIT_NAME_UPDATE") + self:SetScript("OnEvent", nil) + end for _,bar in pairs(self.activeFrames.bars) do self:UpdateBar(bar) end @@ -354,6 +577,40 @@ end --------------------------------------------------- +function TotemPulse:TestOnce() + local totemPlatesTestFrame = Gladdy.modules["Totem Plates"].testFrame + if totemPlatesTestFrame then + if totemPlatesTestFrame.totemTick + and (Gladdy.db.totemPulseTotems["totem" .. npcIdToTotemData[5913].id].style == "COOLDOWN" and totemPlatesTestFrame.totemTick.bar + or Gladdy.db.totemPulseTotems["totem" .. npcIdToTotemData[5913].id].style ~= "COOLDOWN" and not totemPlatesTestFrame.totemTick.bar) then + totemPlatesTestFrame.totemTick:SetScript("OnUpdate", nil) + totemPlatesTestFrame.totemTick:Hide() + totemPlatesTestFrame.totemTick:SetParent(nil) + totemPlatesTestFrame.totemTick.id = nil + tinsert(totemPlatesTestFrame.totemTick.bar and self.barCache or self.cooldownCache, totemPlatesTestFrame.totemTick) + self.activeFrames.bars[totemPlatesTestFrame.totemTick] = nil + self.activeFrames.cooldowns[totemPlatesTestFrame.totemTick] = nil + totemPlatesTestFrame.totemTick = nil + end + + local timestamp = { timeStamp = GetTime(), pulse = npcIdToTotemData[5913].pulse, id = npcIdToTotemData[5913].id } + TotemPulse:AddTimerFrame(totemPlatesTestFrame, timestamp, true) + self.testFrame = totemPlatesTestFrame.totemTick + end +end + +function TotemPulse:Reset() + if self.testFrame then + self.testFrame:SetScript("OnUpdate", nil) + self.testFrame:Hide() + self.testFrame:SetParent(nil) + tinsert(self.testFrame.bar and self.barCache or self.cooldownCache, self.testFrame) + self.activeFrames.bars[self.testFrame] = nil + self.activeFrames.cooldowns[self.testFrame] = nil + self.testFrame = nil + Gladdy.modules["Totem Plates"].testFrame.totemTick = nil + end +end --------------------------------------------------- @@ -373,32 +630,28 @@ function TotemPulse:GetOptions() name = L["Totem Pulse Enabled"], order = 3, }), - totemPulseAttachToTotemPlate = Gladdy:option({ - type = "toggle", - name = L["Attach to Totem Plates"], - order = 4, - }), group = { type = "group", childGroups = "tree", name = L["Frame"], order = 4, + disabled = function() return not Gladdy.db.totemPulseEnabled end, args = { barFrame = { type = "group", name = L["Bar"], - order = 1, + order = 2, args = { headerSize = { type = "header", - name = L["Bar Size"], - order = 1, + name = L["Size"], + order = 10, }, totemPulseBarHeight = Gladdy:option({ type = "range", name = L["Bar height"], desc = L["Height of the bar"], - order = 3, + order = 11, min = 0.1, max = 200, step = .1, @@ -407,8 +660,8 @@ function TotemPulse:GetOptions() totemPulseBarWidth = Gladdy:option({ type = "range", name = L["Bar width"], - desc = L["Width of the bars"], - order = 4, + desc = L["Width of the bar"], + order = 12, min = 0.1, max = 600, step = .1, @@ -417,13 +670,13 @@ function TotemPulse:GetOptions() headerTexture = { type = "header", name = L["Texture"], - order = 5, + order = 20, }, totemPulseBarTexture = Gladdy:option({ type = "select", name = L["Bar texture"], desc = L["Texture of the bar"], - order = 9, + order = 21, dialogControl = "LSM30_Statusbar", values = AceGUIWidgetLSMlists.statusbar, }), @@ -431,25 +684,25 @@ function TotemPulse:GetOptions() type = "color", name = L["Bar color"], desc = L["Color of the cast bar"], - order = 10, + order = 22, hasAlpha = true, }), totemPulseBarBgColor = Gladdy:colorOption({ type = "color", name = L["Background color"], desc = L["Color of the cast bar background"], - order = 11, + order = 23, hasAlpha = true, }), headerBorder = { type = "header", name = L["Border"], - order = 12, + order = 30, }, totemPulseBarBorderSize = Gladdy:option({ type = "range", name = L["Border size"], - order = 13, + order = 31, min = 0.5, max = Gladdy.db.castBarHeight/2, step = 0.5, @@ -458,19 +711,103 @@ function TotemPulse:GetOptions() totemPulseBarBorderStyle = Gladdy:option({ type = "select", name = L["Status Bar border"], - order = 51, + order = 32, dialogControl = "LSM30_Border", values = AceGUIWidgetLSMlists.border, }), totemPulseBarBorderColor = Gladdy:colorOption({ type = "color", name = L["Status Bar border color"], - order = 52, + order = 33, + hasAlpha = true, + }), + }, + }, + cooldownFrame = { + type = "group", + name = L["Cooldown"], + order = 3, + args = { + headerSize = { + type = "header", + name = L["Frame"], + order = 10, + }, + totemPulseCooldownHeight = Gladdy:option({ + type = "range", + name = L["Height"], + order = 11, + min = 0.1, + max = 200, + step = .1, + width = "full", + }), + totemPulseCooldownWidth = Gladdy:option({ + type = "range", + name = L["Width"], + order = 12, + min = 0.1, + max = 600, + step = .1, + width = "full", + }), + totemPulseCooldownAlpha = Gladdy:option({ + type = "range", + name = L["Alpha"], + order = 21, + min = 0.1, + max = 1, + step = .1, + width = "full", + }), + + }, + }, + text = { + type = "group", + name = L["Text"], + order = 4, + args = { + headerSize = { + type = "header", + name = L["Text"], + order = 10, + }, + totemPulseTextSize = Gladdy:option({ + type = "range", + name = L["Size"], + order = 11, + min = 0.5, + max = 30, + step = 0.5, + width = "full", + }), + totemPulseTextFont = Gladdy:option({ + type = "select", + name = L["Font"], + desc = L["Font of the bar"], + order = 12, + dialogControl = "LSM30_Font", + values = AceGUIWidgetLSMlists.font, + }), + totemPulseTextColor = Gladdy:colorOption({ + type = "color", + name = L["Font color"], + desc = L["Color of the text"], + order = 13, hasAlpha = true, }), }, }, }, }, + customizeTotems = { + order = 50, + name = L["Customize Totems"], + type = "group", + childGroups = "tree", + disabled = function() return not Gladdy.db.totemPulseEnabled end, + args = select(1, TotemOptions()) + }, } end \ No newline at end of file -- 2.39.5 From ad4ba087f52c900b1d4da1e3102e8a070d630164 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:38:50 +0100 Subject: [PATCH 101/227] config frame totemplate ignore parent scale --- Modules/TotemPlates.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/TotemPlates.lua b/Modules/TotemPlates.lua index 8c1a0ee..690c2d5 100644 --- a/Modules/TotemPlates.lua +++ b/Modules/TotemPlates.lua @@ -490,6 +490,7 @@ function TotemPlates:TestOnce() self.testFrame:SetWidth(1) self.testFrame:SetHeight(32) self.testFrame:SetPoint("CENTER", UIParent, "CENTER", 0, -140) + self.testFrame:SetIgnoreParentScale(true) end local totemDataEntry = npcIdToTotemData[5913] self.testFrame:Show() -- 2.39.5 From 34b0a18d9a4842e81e531cd212320503a3a54b6d Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:39:03 +0100 Subject: [PATCH 102/227] Util --- Gladdy.toc | 1 + Util.lua | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 Util.lua diff --git a/Gladdy.toc b/Gladdy.toc index 5dfaf9b..9fe7adc 100644 --- a/Gladdy.toc +++ b/Gladdy.toc @@ -15,6 +15,7 @@ Frame.lua Options.lua Constants.lua ImportStrings.lua +Util.lua Modules\Announcements.lua Modules\Healthbar.lua diff --git a/Util.lua b/Util.lua new file mode 100644 index 0000000..204e9d0 --- /dev/null +++ b/Util.lua @@ -0,0 +1,143 @@ +local pairs, ipairs = pairs, ipairs +local floor = math.floor +local str_find, str_gsub, str_sub, tinsert = string.find, string.gsub, string.sub, table.insert +local Gladdy = LibStub("Gladdy") +local L = Gladdy.L + +--------------------------- + +-- TAGS + +--------------------------- + +local tags = { + ["current"] = true, + ["max"] = true, + ["percent"] = true, + ["race"] = "race", + ["class"] = "class", + ["arena"] = true, + ["name"] = "name", + ["status"] = true, + ["spec"] = "spec", +} + +local function str_extract(s, pattern) + local t = {} -- table to store the indices + local i, j = 0,0 + while true do + i, j = str_find(s, pattern, i+1) -- find 'next' occurrence + if i == nil then break end + tinsert(t, str_sub(s, i, j)) + end + return t +end + +--TODO optimize this function as it's being called often! +local function getTagText(unit, tag, current, max, status) + local button = Gladdy.buttons[unit] + if not button then + return + end + + if str_find(tag, "percent") then + return current and max and floor(current * 100 / max) .. "%%" or "" + elseif str_find(tag, "current") then + return current or "" + elseif str_find(tag, "max") then + return max or "" + elseif str_find(tag, "status") then + if str_find(tag, "%|") and status == nil then + return nil + else + return status or "" + end + elseif str_find(tag, "name") then + return button.name or "" + elseif str_find(tag, "class") then + return button.classLoc or "" + elseif str_find(tag, "race") then + return button.raceLoc or "" + elseif str_find(tag, "arena") then + return str_gsub(unit, "arena", "") + elseif str_find(tag, "spec") then + if str_find(tag, "%|") and button.spec == nil then + return nil + else + return button.spec or "" + end + end +end + +function Gladdy:SetTag(unit, tagOption, current, max, status) + local button = self.buttons[unit] + if not button then + return + end + + local returnStr = tagOption + + local t = str_extract(returnStr, "%[[^%[].-%]") + for _, tag in ipairs(t) do + local replace + if str_find(tag, "|") then -- or operator + local indicators = str_extract(tag, "[%[|%|]%a+[%||%]]") + local replaces = {} + for _, indicator in ipairs(indicators) do + tinsert(replaces, getTagText(unit, indicator, current, max, status)) + end + replace = replaces[#replaces] + else + replace = getTagText(unit, tag, current, max, status) + end + + if replace then + local find = str_gsub(tag, "%[", "%%[") + find = str_gsub(find, "%]", "%%]") + find = str_gsub(find, "%|", "%%|") + returnStr = str_gsub(returnStr, find, replace) + end + end + return returnStr +end + +function Gladdy:GetTagOption(name, order, enabledOption, func, toggle) + if toggle then + return func({ + type = "toggle", + name = name, + order = order, + width = "full", + desc = L["Custom Tags:\n".. + "\n|cff1ac742[current]|r - Shows current\n" .. + "\n|cff1ac742[max]|r - Shows max\n" .. + "\n|cff1ac742[percent]|r - Shows percent\n" .. + "\n|cff1ac742[name]|r - Shows name\n" .. + "\n|cff1ac742[arena]|r - Shows arena number\n" .. + "\n|cff1ac742[status]|r - Shows status (eg DEATH)\n" .. + "\n|cff1ac742[race]|r - Shows race\n" .. + "\n|cff1ac742[class]|r - Shows class\n" .. + "\n|cff1ac742[spec]|r - Shows spec\n\n" .. + "Can be combined with OR operator like |cff1ac742[percent|status]|r. The last valid option will be used.\n"], + }) + else + return func({ + type = "input", + name = name, + order = order, + width = "full", + disabled = function() return not Gladdy.db[enabledOption] end, + desc = L["Custom Tags:\n".. + "\n|cff1ac742[current]|r - Shows current\n" .. + "\n|cff1ac742[max]|r - Shows max\n" .. + "\n|cff1ac742[percent]|r - Shows percent\n" .. + "\n|cff1ac742[name]|r - Shows name\n" .. + "\n|cff1ac742[arena]|r - Shows arena number\n" .. + "\n|cff1ac742[status]|r - Shows status (eg DEATH)\n" .. + "\n|cff1ac742[race]|r - Shows race\n" .. + "\n|cff1ac742[class]|r - Shows class\n" .. + "\n|cff1ac742[spec]|r - Shows spec\n\n" .. + "Can be combined with OR operator like |cff1ac742[percent|status]|r. The last valid option will be used.\n"], + }) + end +end \ No newline at end of file -- 2.39.5 From d23d749f1ec4e65cd1c4dc2461d786866603b98f Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:39:20 +0100 Subject: [PATCH 103/227] add disarm riposte to dr data --- Libs/DRData-1.0/DRData-1.0.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Libs/DRData-1.0/DRData-1.0.lua b/Libs/DRData-1.0/DRData-1.0.lua index a3a3c8d..4bfc95c 100644 --- a/Libs/DRData-1.0/DRData-1.0.lua +++ b/Libs/DRData-1.0/DRData-1.0.lua @@ -254,6 +254,7 @@ Data.spells = { -- Disarm [676] = "disarm", + [14251] = "disarm", } -- DR Category names -- 2.39.5 From 3c82edc441f63ad6cd3fdedbc5abf657a9aab6e5 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:40:00 +0100 Subject: [PATCH 104/227] detect certain racials and spells when used in stealth --- EventListener.lua | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 75cbba1..e98ae44 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -15,7 +15,7 @@ local L = Gladdy.L local Cooldowns = Gladdy.modules["Cooldowns"] local Diminishings = Gladdy.modules["Diminishings"] -local EventListener = Gladdy:NewModule("EventListener", 10, { +local EventListener = Gladdy:NewModule("EventListener", 101, { test = true, }) @@ -76,13 +76,13 @@ function Gladdy:SpotEnemy(unit, auraScan) if Gladdy.cooldownBuffs[spellName] and unitCaster then -- Check for auras that detect used CDs (like Fear Ward) for arenaUnit,v in pairs(self.buttons) do if (UnitIsUnit(arenaUnit, unitCaster)) then - Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, expirationTime - GetTime()) + Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, Gladdy.cooldownBuffs[spellName].cd(expirationTime - GetTime())) -- /run LibStub("Gladdy").modules["Cooldowns"]:CooldownUsed("arena5", "PRIEST", 6346, 10) end end end - if Gladdy.cooldownBuffs.racials[spellName] then - Gladdy:SendMessage("RACIAL_USED", unit, expirationTime, spellName) + if Gladdy.cooldownBuffs.racials[spellName] and Gladdy.cooldownBuffs.racials[spellName] then + Gladdy:SendMessage("RACIAL_USED", unit, spellName, Gladdy.cooldownBuffs.racials[spellName].cd(expirationTime - GetTime()), spellName) end if Gladdy.specBuffs[spellName] and unitCaster then -- Check for auras that detect a spec local unitPet = string_gsub(unit, "%d$", "pet%1") @@ -213,10 +213,22 @@ Gladdy.exceptionNames = { -- TODO MOVE ME TO CLASSBUFFS LIB } Gladdy.cooldownBuffs = { - [GetSpellInfo(6346)] = { cd = 180, spellId = 6346 }, -- Fear Ward - -- TODO sprint, shadowstep + [GetSpellInfo(6346)] = { cd = function(expTime) -- 180s uptime == cd + return expTime + end, spellId = 6346 }, -- Fear Ward + [GetSpellInfo(11305)] = { cd = function(expTime) -- 15s uptime + return 180 - (15 - expTime) + end, spellId = 11305 }, -- Sprint + [GetSpellInfo(36554)] = { cd = function(expTime) -- 3s uptime + return 30 - (3 - expTime) + end, spellId = 36554 }, -- Shadowstep + [GetSpellInfo(26889)] = { cd = function(expTime) -- 3s uptime + return 180 - (10 - expTime) + end, spellId = 26889 }, -- Vanish racials = { - [GetSpellInfo(20600)] = { cd = 180, spellId = 20600 }, -- Perception + [GetSpellInfo(20600)] = { cd = function(expTime) -- 20s uptime + return GetTime() - (20 - expTime) + end, spellId = 20600 }, -- Perception } } @@ -241,12 +253,12 @@ function EventListener:UNIT_AURA(unit) if Gladdy.cooldownBuffs[spellName] and unitCaster then -- Check for auras that hint used CDs (like Fear Ward) for arenaUnit,v in pairs(Gladdy.buttons) do if (UnitIsUnit(arenaUnit, unitCaster)) then - Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, expirationTime - GetTime()) + Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, Gladdy.cooldownBuffs[spellName].cd(expirationTime - GetTime())) end end end - if Gladdy.cooldownBuffs.racials[spellName] then - Gladdy:SendMessage("RACIAL_USED", unit, spellName, expirationTime, spellName) + if Gladdy.cooldownBuffs.racials[spellName] and Gladdy.cooldownBuffs.racials[spellName] then + Gladdy:SendMessage("RACIAL_USED", unit, spellName, Gladdy.cooldownBuffs.racials[spellName].cd(expirationTime - GetTime()), spellName) end if not button.spec and Gladdy.specBuffs[spellName] and unitCaster then local unitPet = string_gsub(unit, "%d$", "pet%1") -- 2.39.5 From 8fa481affe46f3674d6c599fc08da97fa05dea80 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:40:23 +0100 Subject: [PATCH 105/227] racial cleanup --- Modules/Racial.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/Racial.lua b/Modules/Racial.lua index e9dff61..ac8bc50 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -169,7 +169,6 @@ function Racial:UpdateFrame(unit) end function Racial:JOINED_ARENA() - self:RegisterEvent("ARENA_COOLDOWNS_UPDATE") self:SetScript("OnEvent", function(self, event, ...) if self[event] then self[event](self, ...) @@ -186,7 +185,7 @@ function Racial:RACIAL_USED(unit, expirationTime, spellName) if expirationTime and Gladdy:Racials()[button.race].spellName ~= spellName then return end - local startTime = (expirationTime and expirationTime - Gladdy:Racials()[button.race].duration) or GetTime() + local startTime = expirationTime or GetTime() Racial:Used(unit, startTime, Gladdy:Racials()[button.race].duration) end -- 2.39.5 From 26241d73d626fb3be2862271535136daf2f16960 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:40:47 +0100 Subject: [PATCH 106/227] add test once and adjust testdata --- Gladdy.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Gladdy.lua b/Gladdy.lua index 63c5d17..808b2c3 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -289,11 +289,11 @@ function Gladdy:OnInitialize() L = self.L self.testData = { - ["arena1"] = { name = "Swift", raceLoc = L["NightElf"], classLoc = L["Warrior"], class = "WARRIOR", health = 9635, healthMax = 14207, power = 76, powerMax = 100, powerType = 1, testSpec = L["Arms"], race = "NightElf" }, - ["arena2"] = { name = "Vilden", raceLoc = L["Undead"], classLoc = L["Mage"], class = "MAGE", health = 10969, healthMax = 11023, power = 7833, powerMax = 10460, powerType = 0, testSpec = L["Frost"], race = "Scourge" }, - ["arena3"] = { name = "Krymu", raceLoc = L["Human"], classLoc = L["Rogue"], class = "ROGUE", health = 1592, healthMax = 11740, power = 45, powerMax = 110, powerType = 3, testSpec = L["Subtlety"], race = "Human" }, - ["arena4"] = { name = "Talmon", raceLoc = L["Human"], classLoc = L["Warlock"], class = "WARLOCK", health = 10221, healthMax = 14960, power = 9855, powerMax = 9855, powerType = 0, testSpec = L["Demonology"], race = "Human" }, - ["arena5"] = { name = "Hydra", raceLoc = L["Undead"], classLoc = L["Priest"], class = "PRIEST", health = 11960, healthMax = 11960, power = 2515, powerMax = 10240, powerType = 0, testSpec = L["Discipline"], race = "Human" }, + ["arena1"] = { name = "Swift", raceLoc = L["NightElf"], classLoc = L["Hunter"], class = "HUNTER", health = 67, healthMax = 100, power = 76, powerMax = 100, powerType = 1, testSpec = L["Marksmanship"], race = "NightElf" }, + ["arena2"] = { name = "Vilden", raceLoc = L["Undead"], classLoc = L["Mage"], class = "MAGE", health = 99, healthMax = 100, power = 7833, powerMax = 10460, powerType = 0, testSpec = L["Frost"], race = "Scourge" }, + ["arena3"] = { name = "Krymu", raceLoc = L["Human"], classLoc = L["Rogue"], class = "ROGUE", health = 13, healthMax = 100, power = 45, powerMax = 110, powerType = 3, testSpec = L["Subtlety"], race = "Human" }, + ["arena4"] = { name = "Talmon", raceLoc = L["Human"], classLoc = L["Warlock"], class = "WARLOCK", health = 68, healthMax = 100, power = 9855, powerMax = 9855, powerType = 0, testSpec = L["Demonology"], race = "Human" }, + ["arena5"] = { name = "Hydra", raceLoc = L["Undead"], classLoc = L["Priest"], class = "PRIEST", health = 100, healthMax = 100, power = 2515, powerMax = 10240, powerType = 0, testSpec = L["Discipline"], race = "Human" }, } self.cooldownSpellIds = {} @@ -407,6 +407,9 @@ function Gladdy:Test() button:SetAlpha(1) end + for _, module in self:IterModules() do + self:Call(module, "TestOnce") + end end end -- 2.39.5 From d6351dbe883a80289340a202bc9c47250ac4eb07 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:41:25 +0100 Subject: [PATCH 107/227] add riposte, disarm, will of the forsaken to auras --- Constants.lua | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Constants.lua b/Constants.lua index 3f39ba3..eecf7f6 100644 --- a/Constants.lua +++ b/Constants.lua @@ -579,7 +579,13 @@ local importantAuras = { priority = 10, spellID = 26669, }, - + -- Riposte + [GetSpellInfo(14251)] = { + track = AURA_TYPE_DEBUFF, + duration = 6, + priority = 20, + spellID = 14251, + }, -- Fear [GetSpellInfo(5782)] = { @@ -708,6 +714,13 @@ local importantAuras = { spellSchool = "magic", spellID = 12292, }, + --Disarm + [GetSpellInfo(676)] = { + track = AURA_TYPE_DEBUFF, + duration = 10, + priority = 20, + spellID = 676, + }, -- Grounding Totem Effect [GetSpellInfo(8178)] = { @@ -805,6 +818,13 @@ local importantAuras = { spellID = 5024, altName = select(1, GetSpellInfo(5024)) .. " - " .. (select(1, GetItemInfo(4984)) or "Skull of Impending Doom"), }, + -- Will of the Forsaken + [GetSpellInfo(7744)] = { + track = AURA_TYPE_BUFF, + duration = 5, + priority = 15, + spellID = 7744, + }, } function Gladdy:GetImportantAuras() return importantAuras -- 2.39.5 From 24bb84663fef9ac0e0198a80b2d903592164fec7 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:41:54 +0100 Subject: [PATCH 108/227] configurable health bar text by tags --- Modules/Healthbar.lua | 218 +++++++++++++++++++++++++++++------------- 1 file changed, 154 insertions(+), 64 deletions(-) diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index 4d88014..1bc2e5a 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -1,5 +1,6 @@ -local pairs = pairs +local pairs, ipairs = pairs, ipairs local floor = math.floor +local str_find, str_gsub, str_sub, tinsert = string.find, string.gsub, string.sub, table.insert local UnitHealth, UnitHealthMax, UnitName, UnitExists, UnitIsDeadOrGhost = UnitHealth, UnitHealthMax, UnitName, UnitExists, UnitIsDeadOrGhost local CreateFrame = CreateFrame @@ -26,12 +27,23 @@ local Healthbar = Gladdy:NewModule("Health Bar", 100, { healthPercentage = true, healthFrameStrata = "MEDIUM", healthFrameLevel = 1, + healthCustomTagsEnabled = false, + healthTextRight = "[percent|status]", + healthTextLeft = "[name]", + healthTextRight = "[percent|status]", + healthTextLeftOutline = false, + healthTextRightOutline = false, + healthTextLeftVOffset = 0, + healthTextLeftHOffset = 5, + healthTextRightVOffset = 0, + healthTextRightHOffset = -5, }) function Healthbar:Initialize() self.frames = {} self:RegisterMessage("JOINED_ARENA") self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("UNIT_SPEC") self:RegisterMessage("UNIT_DESTROYED") self:RegisterMessage("UNIT_DEATH") end @@ -65,28 +77,28 @@ function Healthbar:CreateFrame(unit) healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarNameFont"), 1) healthBar.nameText:Hide() else - healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarNameFontSize) + healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarNameFontSize, Gladdy.db.healthTextLeftOutline and "OUTLINE") healthBar.nameText:Show() end healthBar.nameText:SetTextColor(Gladdy:SetColor(Gladdy.db.healthBarFontColor)) healthBar.nameText:SetShadowOffset(1, -1) healthBar.nameText:SetShadowColor(0, 0, 0, 1) healthBar.nameText:SetJustifyH("CENTER") - healthBar.nameText:SetPoint("LEFT", 5, 0) + healthBar.nameText:SetPoint("LEFT", Gladdy.db.healthTextLeftHOffset, Gladdy.db.healthTextLeftVOffset) healthBar.healthText = healthBar:CreateFontString(nil, "LOW") if (Gladdy.db.healthBarHealthFontSize < 1) then healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), 1) healthBar.healthText:Hide() else - healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarHealthFontSize) + healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarHealthFontSize, Gladdy.db.healthTextRightOutline and "OUTLINE") healthBar.healthText:Hide() end healthBar.healthText:SetTextColor(Gladdy:SetColor(Gladdy.db.healthBarFontColor)) healthBar.healthText:SetShadowOffset(1, -1) healthBar.healthText:SetShadowColor(0, 0, 0, 1) healthBar.healthText:SetJustifyH("CENTER") - healthBar.healthText:SetPoint("RIGHT", -5, 0) + healthBar.healthText:SetPoint("RIGHT", Gladdy.db.healthTextRightHOffset, Gladdy.db.healthTextRightVOffset) healthBar.unit = unit self.frames[unit] = healthBar @@ -100,17 +112,7 @@ end function Healthbar.OnEvent(self, event, unit) local isDead = UnitExists(unit) and UnitIsDeadOrGhost(unit) - if event == "UNIT_HEALTH" then - if isDead then - Gladdy:SendMessage("UNIT_DEATH", unit) - return - end - local health = UnitHealth(unit) - local healthMax = UnitHealthMax(unit) - self.hp:SetMinMaxValues(0, healthMax) - self.hp:SetValue(UnitHealth(unit)) - Healthbar:SetHealthText(self, health, healthMax) - elseif event == "UNIT_MAXHEALTH" then + if event == "UNIT_HEALTH" or event == "UNIT_MAXHEALTH" then if isDead then Gladdy:SendMessage("UNIT_DEATH", unit) return @@ -119,13 +121,13 @@ function Healthbar.OnEvent(self, event, unit) local healthMax = UnitHealthMax(unit) self.hp:SetMinMaxValues(0, healthMax) self.hp:SetValue(health) - Healthbar:SetHealthText(self, health, healthMax) + self.hp.current = health + Healthbar:SetText(unit, health, healthMax) + --Healthbar:SetHealthText(self, health, healthMax) elseif event == "UNIT_NAME_UPDATE" then local name = UnitName(unit) Gladdy.buttons[unit].name = name - if Gladdy.db.healthName and not Gladdy.db.healthNameToArenaId then - self.nameText:SetText(name) - end + Healthbar:SetText(unit, self.hp.current, 100) end if not Gladdy.buttons[unit].class then Gladdy:SpotEnemy(unit, true) @@ -134,20 +136,42 @@ end function Healthbar:SetHealthText(healthBar, health, healthMax) local healthText = "" - local healthPercentage = floor(health * 100 / healthMax) + local healthPercentage = health and healthMax and floor(health * 100 / healthMax) if health == 0 and UnitExists(healthBar.unit) and UnitIsDeadOrGhost(healthBar.unit) then self:UNIT_DEATH(healthBar.unit) return end - - if (Gladdy.db.healthPercentage) then + if (Gladdy.db.healthPercentage and healthPercentage) then healthText = ("%d%%"):format(healthPercentage) end - healthBar.healthText:SetText(healthText) end +function Healthbar:SetText(unit, health, healthMax, status) + local button = Gladdy.buttons[unit] + if not Gladdy.buttons[unit] then + return + end + if Gladdy.db.healthCustomTagsEnabled then + button.healthBar.nameText:SetText(Gladdy:SetTag(unit, Gladdy.db.healthTextLeft, health, healthMax, status)) + button.healthBar.healthText:SetText(Gladdy:SetTag(unit, Gladdy.db.healthTextRight, health, healthMax, status)) + else + if Gladdy.db.healthName then + if Gladdy.db.healthNameToArenaId then + button.healthBar.nameText:SetText(str_gsub(unit, "arena", "")) + else + button.healthBar.nameText:SetText(Gladdy.buttons[unit].name) + end + end + if status then + button.healthBar.healthText:SetText(status) + else + Healthbar:SetHealthText(button.healthBar, health, healthMax) + end + end +end + function Healthbar:UpdateFrame(unit) local healthBar = self.frames[unit] if (not healthBar) then @@ -178,14 +202,14 @@ function Healthbar:UpdateFrame(unit) healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), 1) healthBar.healthText:Hide() else - healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarHealthFontSize) + healthBar.healthText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarHealthFontSize, Gladdy.db.healthTextRightOutline and "OUTLINE") healthBar.healthText:Show() end if (Gladdy.db.healthBarNameFontSize < 1) then healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarNameFont"), 1) healthBar.nameText:Hide() else - healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarNameFontSize) + healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarNameFontSize, Gladdy.db.healthTextLeftOutline and "OUTLINE") if Gladdy.db.healthName then healthBar.nameText:Show() else @@ -194,6 +218,8 @@ function Healthbar:UpdateFrame(unit) end healthBar.nameText:SetTextColor(Gladdy:SetColor(Gladdy.db.healthBarFontColor)) healthBar.healthText:SetTextColor(Gladdy:SetColor(Gladdy.db.healthBarFontColor)) + healthBar.nameText:SetPoint("LEFT", Gladdy.db.healthTextLeftHOffset, Gladdy.db.healthTextLeftVOffset) + healthBar.healthText:SetPoint("RIGHT", Gladdy.db.healthTextRightHOffset, Gladdy.db.healthTextRightVOffset) end function Healthbar:ResetUnit(unit) @@ -206,6 +232,7 @@ function Healthbar:ResetUnit(unit) healthBar.nameText:SetText("") healthBar.healthText:SetText("") healthBar.hp:SetValue(0) + healthBar.hp.current = 0 end function Healthbar:Test(unit) @@ -215,17 +242,30 @@ function Healthbar:Test(unit) return end - self:JOINED_ARENA() + --self:JOINED_ARENA() + Gladdy:SendMessage("UNIT_HEALTH", unit, button.health, button.healthMax) + healthBar.hp.current = button.health self:ENEMY_SPOTTED(unit) - self:UNIT_HEALTH(unit, button.health, button.healthMax) + self:SetText(unit, button.health, button.healthMax) + healthBar.hp:SetValue(button.health) + if unit == "arena1" then + self:UNIT_DEATH(unit) + --self:SetText(unit, button.health, button.healthMax, L["DEAD"]) + end +end + +function Healthbar:UNIT_SPEC(unit) + local button = Gladdy.buttons[unit] + if not button then + return + end + self:SetText(unit, button.healthBar.hp.current, 100) + --button.healthBar.nameText:SetText(Gladdy:SetTag(unit, Gladdy.db.healthTextLeft, button.health, button.healthMax)) end function Healthbar:JOINED_ARENA() - if Gladdy.db.healthNameToArenaId and Gladdy.db.healthName then - for i=1,Gladdy.curBracket do - local healthBar = self.frames["arena" .. i] - healthBar.nameText:SetText(i) - end + for i=1,Gladdy.curBracket do + self:SetText("arena" .. i, nil, nil) end end @@ -241,10 +281,9 @@ function Healthbar:ENEMY_SPOTTED(unit) local healthMax = UnitHealthMax(unit) healthBar.hp:SetMinMaxValues(0, healthMax) healthBar.hp:SetValue(health) - Healthbar:SetHealthText(healthBar, health, healthMax) - end - if button.name and Gladdy.db.healthName and not Gladdy.db.healthNameToArenaId then - healthBar.nameText:SetText(button.name) + healthBar.hp.current = health + Healthbar:SetText(unit, health, healthMax) + --Healthbar:SetHealthText(healthBar, health, healthMax) end if button.class then @@ -252,27 +291,6 @@ function Healthbar:ENEMY_SPOTTED(unit) end end -function Healthbar:UNIT_HEALTH(unit, health, healthMax) - local healthBar = self.frames[unit] - if (not healthBar) then - return - end - if not Gladdy.buttons[unit].class then - Gladdy:SpotEnemy(unit, true) - end - Gladdy:SendMessage("UNIT_HEALTH", unit, health, healthMax) - - local healthPercentage = floor(health * 100 / healthMax) - local healthText = "" - - if (Gladdy.db.healthPercentage) then - healthText = ("%d%%"):format(healthPercentage) - end - - healthBar.healthText:SetText(healthText) - healthBar.hp:SetValue(healthPercentage) -end - function Healthbar:UNIT_DEATH(unit) local healthBar = self.frames[unit] if (not healthBar) then @@ -280,7 +298,8 @@ function Healthbar:UNIT_DEATH(unit) end healthBar.hp:SetValue(0) - healthBar.healthText:SetText(L["DEAD"]) + healthBar.hp.current = 0 + Healthbar:SetText(unit, 0, 100, L["DEAD"]) end function Healthbar:UNIT_DESTROYED(unit) @@ -290,6 +309,7 @@ function Healthbar:UNIT_DESTROYED(unit) end healthBar.hp:SetValue(0) + healthBar.hp.current = 0 healthBar.healthText:SetText(L["LEAVE"]) healthBar.nameText:SetText("") end @@ -307,8 +327,10 @@ local function option(params) if Gladdy.db.healthBarBorderSize > Gladdy.db.healthBarHeight/2 then Gladdy.db.healthBarBorderSize = Gladdy.db.healthBarHeight/2 end - for i=1,Gladdy.curBracket do - Healthbar:Test("arena" .. i) + if Gladdy.frame.testing then + for i=1,Gladdy.curBracket do + Healthbar:Test("arena" .. i) + end end Gladdy:UpdateFrame() end, @@ -396,11 +418,28 @@ function Healthbar:GetOptions() order = 12, hasAlpha = true, }), + healthTextLeftOutline = option({ + type = "toggle", + name = L["Left Font Outline"], + order = 13, + width = "full", + }), + healthTextRightOutline = option({ + type = "toggle", + name = L["Right Font Outline"], + order = 14, + width = "full", + }), + headerSize = { + type = "header", + name = L["Size"], + order = 20, + }, healthBarNameFontSize = option({ type = "range", name = L["Name font size"], desc = L["Size of the name text"], - order = 13, + order = 21, step = 0.1, min = 0, max = 20, @@ -410,12 +449,53 @@ function Healthbar:GetOptions() type = "range", name = L["Health font size"], desc = L["Size of the health text"], - order = 14, + order = 22, step = 0.1, min = 0, max = 20, width = "full", }), + headerLeftText = { + type = "header", + name = L["Offsets"], + order = 30, + }, + healthTextLeftVOffset = option({ + type = "range", + name = L["Left Text Vertical Offset"], + order = 31, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), + healthTextLeftHOffset = option({ + type = "range", + name = L["Left Text Horizontal Offset"], + order = 32, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), + healthTextRightVOffset = option({ + type = "range", + name = L["Right Text Vertical Offset"], + order = 33, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), + healthTextRightHOffset = option({ + type = "range", + name = L["Right Text Horizontal Offset"], + order = 34, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), }, }, border = { @@ -499,6 +579,7 @@ function Healthbar:GetOptions() desc = L["Show the units name"], order = 2, width = "full", + disabled = function() return Gladdy.db.healthCustomTagsEnabled end, }), healthNameToArenaId = option({ type = "toggle", @@ -506,7 +587,7 @@ function Healthbar:GetOptions() desc = L["Show 1-5 as name instead"], order = 3, width = "full", - disabled = function() return not Gladdy.db.healthName end + disabled = function() return not Gladdy.db.healthName or Gladdy.db.healthCustomTagsEnabled end, }), healthPercentage = option({ type = "toggle", @@ -514,7 +595,16 @@ function Healthbar:GetOptions() desc = L["Show health percentage on the health bar"], order = 6, width = "full", + disabled = function() return Gladdy.db.healthCustomTagsEnabled end, }), + header = { + type = "header", + name = L["Custom Tags"], + order = 10, + }, + healthCustomTagsEnabled = Gladdy:GetTagOption(L["Custom Tags Enabled"], 11, nil, option, true), + healthTextLeft = Gladdy:GetTagOption(L["Left Text"], 12, "healthCustomTagsEnabled", option), + healthTextRight = Gladdy:GetTagOption(L["Right Text"], 13, "healthCustomTagsEnabled", option), }, }, }, -- 2.39.5 From 2f20d305b677b5514a2401e60f1afafcc1711721 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 3 Mar 2022 23:42:35 +0100 Subject: [PATCH 109/227] unified lang commented out --- Lang.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Lang.lua b/Lang.lua index 3ae287d..caf2d58 100644 --- a/Lang.lua +++ b/Lang.lua @@ -28,6 +28,34 @@ L["Troll"] = C_CreatureInfo.GetRaceInfo(8).raceName L["Blood Elf"] = C_CreatureInfo.GetRaceInfo(10).raceName L["Draenei"] = C_CreatureInfo.GetRaceInfo(11).raceName +--Specs +--[[ +L["Balance"] = BALANCE +L["Combat"] = COMBAT_LABEL +L["Fire"] = STRING_SCHOOL_FIRE +L["Arcane"] = STRING_SCHOOL_ARCANE +L["Shadow"] = STRING_SCHOOL_SHADOW +L["Holy"] = STRING_SCHOOL_HOLY +L["Elemental"] = STRING_SCHOOL_ELEMENTAL + + +--Modules +--L["Announcements"] = CHAT_ANNOUNCE +L["Auras"] = COMBAT_TEXT_SHOW_AURAS_TEXT +L["Cast Bar"] = SHOW_ENEMY_CAST +L["Buffs and Debuffs"] = BUFFOPTIONS_LABEL +--L["Class Icon"] = CLASS .. " " .. EMBLEM_SYMBOL +--L["Clicks"] = +L["Cooldowns"] = CAPACITANCE_SHIPMENT_COOLDOWN:gsub(": %%s", "") +--L["Export Import"] = +--L["Healthbar"] +L["Highlight"] = HIGHLIGHTING:gsub(":", "") +L["Pet"] = PET_TYPE_PET +--L["Racial"] = RACE .. " " .. ABILITIES +--L["Range Check"] = +L["Trinket"] = TRINKET0SLOT +--]] + if (GetLocale() == "ruRU") then -- Specs L["Balance"] = "Баланс" -- 2.39.5 From d348b87ddf4b56b783c952f7c8b144af101573ef Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Thu, 24 Mar 2022 20:23:50 +0100 Subject: [PATCH 110/227] switch UNIT_HEALTH to UNIT_HEALTH_FREQUENT --- Modules/Healthbar.lua | 2 +- Modules/Pets.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index 1bc2e5a..4523a87 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -104,7 +104,7 @@ function Healthbar:CreateFrame(unit) self.frames[unit] = healthBar button.healthBar = healthBar self:ResetUnit(unit) - healthBar:RegisterUnitEvent("UNIT_HEALTH", unit) + healthBar:RegisterUnitEvent("UNIT_HEALTH_FREQUENT", unit) healthBar:RegisterUnitEvent("UNIT_MAXHEALTH", unit) healthBar:RegisterUnitEvent("UNIT_NAME_UPDATE", unit) healthBar:SetScript("OnEvent", Healthbar.OnEvent) diff --git a/Modules/Pets.lua b/Modules/Pets.lua index 5a7eca1..d54ceab 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -233,7 +233,7 @@ function Pets:CreateFrame(unitId) healthBar.unit = unit button.healthBar = healthBar - healthBar:RegisterUnitEvent("UNIT_HEALTH", unit) + healthBar:RegisterUnitEvent("UNIT_HEALTH_FREQUENT", unit) healthBar:RegisterUnitEvent("UNIT_MAXHEALTH", unit) healthBar:RegisterUnitEvent("UNIT_PORTRAIT_UPDATE", unit) healthBar:RegisterUnitEvent("UNIT_NAME_UPDATE", unit) -- 2.39.5 From 1a8cd81f7a81888b63ffcb477b7a9374793834df Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 00:00:44 +0100 Subject: [PATCH 111/227] fix totemtick set parent and SetPoint --- Modules/TotemPlates.lua | 1 + Modules/TotemPulse.lua | 94 ++++++++++++++--------------------------- 2 files changed, 33 insertions(+), 62 deletions(-) diff --git a/Modules/TotemPlates.lua b/Modules/TotemPlates.lua index 690c2d5..942115d 100644 --- a/Modules/TotemPlates.lua +++ b/Modules/TotemPlates.lua @@ -306,6 +306,7 @@ end function TotemPlates:CreateTotemFrame(nameplate) nameplate.gladdyTotemFrame = CreateFrame("Frame") + nameplate.gladdyTotemFrame:SetFrameLevel(1) nameplate.gladdyTotemFrame:SetIgnoreParentAlpha(true) nameplate.gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor) nameplate.gladdyTotemFrame:SetHeight(Gladdy.db.npTotemPlatesSize) diff --git a/Modules/TotemPulse.lua b/Modules/TotemPulse.lua index 6cc6c5e..cd2fd2d 100644 --- a/Modules/TotemPulse.lua +++ b/Modules/TotemPulse.lua @@ -1,10 +1,12 @@ local select, pairs, tremove, tinsert, format, strsplit, tonumber = select, pairs, tremove, tinsert, format, strsplit, tonumber +local type = type local C_NamePlate = C_NamePlate local Gladdy = LibStub("Gladdy") local L = Gladdy.L local GetSpellInfo, CreateFrame = GetSpellInfo, CreateFrame local GetTime, UnitIsEnemy, UnitGUID = GetTime, UnitIsEnemy, UnitGUID local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo +local UIParent = UIParent --------------------------------------------------- @@ -118,10 +120,10 @@ local TotemPulse = Gladdy:NewModule("Totem Pulse", 1, { --bar totemPulseBarWidth = 40, totemPulseBarHeight = 20, - totemPulseBarColor = { r = 1, g = 0, b = 0, a = 1 }, - totemPulseBarBgColor = { r = 0, g = 1, b = 0, a = 1 }, + totemPulseBarColor = { r = 1, g = 0, b = 0, a = .5 }, + totemPulseBarBgColor = { r = 0, g = 1, b = 0, a = .5 }, totemPulseBarBorderColor = { r = 0, g = 0, b = 0, a = 1 }, - totemPulseBarBorderSize = 5, + totemPulseBarBorderSize = 4, totemPulseBarBorderStyle = "Gladdy Tooltip squared", totemPulseBarTexture = "Flat", totemPulseBarReverse = false, @@ -329,24 +331,10 @@ end function TotemPulse:AddTimerFrame(nameplate, timestamp, test) if (nameplate:IsShown() or test) and timestamp then - local gladdyTotemFrame = Gladdy.db.totemPulseTotems["totem" .. timestamp.id].attachToGladdyTotemFrame and nameplate.gladdyTotemFrame if not nameplate.totemTick then nameplate.totemTick = TotemPulse:CreateCooldownFrame(Gladdy.db.totemPulseTotems["totem" .. timestamp.id].style) end - nameplate.totemTick:SetParent(nameplate.gladdyTotemFrame or nameplate) - --nameplate.totemTick:ClearAllPoints() - --[[if gladdyTotemFrame then - nameplate.totemTick:SetPoint("TOPLEFT", gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) - nameplate.totemTick:SetPoint("BOTTOMRIGHT", gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) - if nameplate.totemTick.bar then - nameplate.totemTick.spark:SetHeight(Gladdy.db.totemPulseTotems["totem" .. timestamp.id].style == "Vertical" and gladdyTotemFrame:GetWidth() or gladdyTotemFrame:GetHeight()) - end - else - nameplate.totemTick:SetPoint("TOP", nameplate.gladdyTotemFrame, "BOTTOM", 0, -5) - if nameplate.totemTick.bar then - nameplate.totemTick.spark:SetHeight(Gladdy.db.totemPulseTotems["totem" .. timestamp.id].style == "Vertical" and Gladdy.db.totemPulseBarWidth or Gladdy.db.totemPulseBarHeight) - end - end--]] + nameplate.totemTick:SetParent(nameplate) local cd = type(timestamp.pulse) == "table" and timestamp.pulse.cd or timestamp.pulse local once = type(timestamp.pulse) == "table" @@ -444,30 +432,21 @@ function TotemPulse:UpdateBarPartial(bar) bar.spark:SetHeight(style == "Vertical" and Gladdy.db.totemPulseBarWidth or Gladdy.db.totemPulseBarHeight) bar.spark:SetRotation(style == "Vertical" and ninetyDegreeInRad or 0) - if (bar:GetParent()) then - if bar:GetParent().gladdyTotemFrame then - bar:SetParent(bar:GetParent().gladdyTotemFrame) - else - bar:SetParent(bar:GetParent()) - end - --[[if bar.id and Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame then - if not bar:GetParent().totemIcon and bar:GetParent().gladdyTotemFrame then - bar:SetParent(bar:GetParent().gladdyTotemFrame) - end - elseif bar.id and not Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame then - if bar:GetParent().totemIcon then - bar:SetParent(bar:GetParent():GetParent()) - end - end--]] + + if bar:GetParent() and bar:GetParent() ~= UIParent then + local gladdyTotemFrame = bar:GetParent().gladdyTotemFrame and bar:GetParent().gladdyTotemFrame + local nameplate = bar:GetParent() bar:ClearAllPoints() - if (bar.id and bar:GetParent().totemIcon and Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame) then - bar:SetPoint("TOPLEFT", bar:GetParent(), "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) - bar:SetPoint("BOTTOMRIGHT", bar:GetParent(), "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) + if bar.id and gladdyTotemFrame and gladdyTotemFrame:IsShown() and Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame then + bar:SetPoint("TOPLEFT", gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) + bar:SetPoint("BOTTOMRIGHT", gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) if style then - bar.spark:SetHeight(style == "Vertical" and bar:GetParent():GetWidth() or bar:GetParent():GetHeight()) + bar.spark:SetHeight(style == "Vertical" and gladdyTotemFrame:GetWidth() or gladdyTotemFrame:GetHeight()) end + elseif bar.id and gladdyTotemFrame and gladdyTotemFrame:IsShown() and not Gladdy.db.totemPulseTotems["totem" .. bar.id].attachToGladdyTotemFrame then + bar:SetPoint("TOP", gladdyTotemFrame, "BOTTOM", 0, -0.5) else - bar:SetPoint("TOP", bar:GetParent(), "BOTTOM", 0, 0) + bar:SetPoint("TOP", nameplate, "BOTTOM", 0, -0.5) end end bar.bar:SetOrientation(style ~= "COOLDOWN" and style or bar.bar:GetOrientation()) @@ -495,35 +474,26 @@ function TotemPulse:UpdateCooldown(cooldown) cooldown:SetWidth(Gladdy.db.totemPulseCooldownWidth) cooldown:SetHeight(Gladdy.db.totemPulseCooldownHeight) - if cooldown:GetParent() then - --[[if cooldown.id and Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame then - if not cooldown:GetParent().totemIcon and cooldown:GetParent().gladdyTotemFrame then - cooldown:SetParent(cooldown:GetParent().gladdyTotemFrame) - end - elseif cooldown.id and not Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame then - if cooldown:GetParent().totemIcon then - cooldown:SetParent(cooldown:GetParent():GetParent()) - end - end--]] - if cooldown:GetParent().gladdyTotemFrame then - cooldown:SetParent(cooldown:GetParent().gladdyTotemFrame) - else - cooldown:SetParent(cooldown:GetParent()) - end - cooldown:ClearAllPoints() - if cooldown.id and Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame and cooldown:GetParent().totemIcon then - cooldown:SetPoint("TOPLEFT", cooldown:GetParent(), "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) - cooldown:SetPoint("BOTTOMRIGHT", cooldown:GetParent(), "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) - else - cooldown:SetPoint("TOP", cooldown:GetParent(), "BOTTOM", 0, -0.5) - end - end - cooldown.cd:SetCooldown(0,0) cooldown.cd:SetReverse(Gladdy.db.totemPulseCooldownReverse) cooldown.cd:SetAlpha(Gladdy.db.totemPulseCooldownAlpha) + cooldown.text:SetFont(Gladdy:SMFetch("font", "totemPulseTextFont"), Gladdy.db.totemPulseTextSize, "OUTLINE") cooldown.text:SetTextColor(Gladdy:SetColor(Gladdy.db.totemPulseTextColor)) + + if cooldown:GetParent() and cooldown:GetParent() ~= UIParent then + local gladdyTotemFrame = cooldown:GetParent().gladdyTotemFrame and cooldown:GetParent().gladdyTotemFrame + local nameplate = cooldown:GetParent() + cooldown:ClearAllPoints() + if cooldown.id and gladdyTotemFrame and gladdyTotemFrame:IsShown() and Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame then + cooldown:SetPoint("TOPLEFT", gladdyTotemFrame, "TOPLEFT", Gladdy.db.npTotemPlatesSize/16, -Gladdy.db.npTotemPlatesSize/16) + cooldown:SetPoint("BOTTOMRIGHT", gladdyTotemFrame, "BOTTOMRIGHT", -Gladdy.db.npTotemPlatesSize/16, Gladdy.db.npTotemPlatesSize/16) + elseif cooldown.id and gladdyTotemFrame and gladdyTotemFrame:IsShown() and not Gladdy.db.totemPulseTotems["totem" .. cooldown.id].attachToGladdyTotemFrame then + cooldown:SetPoint("TOP", gladdyTotemFrame, "BOTTOM", 0, -0.5) + else + cooldown:SetPoint("TOP", nameplate, "BOTTOM", 0, -0.5) + end + end end function TotemPulse:UpdateFrameOnce() -- 2.39.5 From c6c3d230742f634377cb5035e14d8c571f4444ba Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 00:01:18 +0100 Subject: [PATCH 112/227] add custom tags to PowerBar --- Modules/ExportImport.lua | 1 + Modules/Healthbar.lua | 13 +- Modules/Powerbar.lua | 331 ++++++++++++++++++++++++--------------- Util.lua | 11 +- 4 files changed, 217 insertions(+), 139 deletions(-) diff --git a/Modules/ExportImport.lua b/Modules/ExportImport.lua index 3cc5676..d049d48 100644 --- a/Modules/ExportImport.lua +++ b/Modules/ExportImport.lua @@ -111,6 +111,7 @@ local deletedOptions = { -- backwards compatibility trinketPos = true, padding = true, growUp = true, + powerBarFontSize = true, } local function checkIsDeletedOption(k, str, msg, errorFound, errorMsg) diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index 4523a87..2e91cba 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -28,7 +28,6 @@ local Healthbar = Gladdy:NewModule("Health Bar", 100, { healthFrameStrata = "MEDIUM", healthFrameLevel = 1, healthCustomTagsEnabled = false, - healthTextRight = "[percent|status]", healthTextLeft = "[name]", healthTextRight = "[percent|status]", healthTextLeftOutline = false, @@ -122,12 +121,13 @@ function Healthbar.OnEvent(self, event, unit) self.hp:SetMinMaxValues(0, healthMax) self.hp:SetValue(health) self.hp.current = health + self.hp.max = healthMax Healthbar:SetText(unit, health, healthMax) --Healthbar:SetHealthText(self, health, healthMax) elseif event == "UNIT_NAME_UPDATE" then local name = UnitName(unit) Gladdy.buttons[unit].name = name - Healthbar:SetText(unit, self.hp.current, 100) + Healthbar:SetText(unit, self.hp.current, self.hp.max) end if not Gladdy.buttons[unit].class then Gladdy:SpotEnemy(unit, true) @@ -245,6 +245,7 @@ function Healthbar:Test(unit) --self:JOINED_ARENA() Gladdy:SendMessage("UNIT_HEALTH", unit, button.health, button.healthMax) healthBar.hp.current = button.health + healthBar.hp.max = button.healthMax self:ENEMY_SPOTTED(unit) self:SetText(unit, button.health, button.healthMax) healthBar.hp:SetValue(button.health) @@ -259,7 +260,7 @@ function Healthbar:UNIT_SPEC(unit) if not button then return end - self:SetText(unit, button.healthBar.hp.current, 100) + self:SetText(unit, button.healthBar.hp.current, button.healthBar.hp.max) --button.healthBar.nameText:SetText(Gladdy:SetTag(unit, Gladdy.db.healthTextLeft, button.health, button.healthMax)) end @@ -282,6 +283,7 @@ function Healthbar:ENEMY_SPOTTED(unit) healthBar.hp:SetMinMaxValues(0, healthMax) healthBar.hp:SetValue(health) healthBar.hp.current = health + healthBar.hp.max = healthMax Healthbar:SetText(unit, health, healthMax) --Healthbar:SetHealthText(healthBar, health, healthMax) end @@ -310,8 +312,7 @@ function Healthbar:UNIT_DESTROYED(unit) healthBar.hp:SetValue(0) healthBar.hp.current = 0 - healthBar.healthText:SetText(L["LEAVE"]) - healthBar.nameText:SetText("") + Healthbar:SetText(unit, 0, 100, L["LEAVE"]) end local function option(params) @@ -455,7 +456,7 @@ function Healthbar:GetOptions() max = 20, width = "full", }), - headerLeftText = { + headerOffsets = { type = "header", name = L["Offsets"], order = 30, diff --git a/Modules/Powerbar.lua b/Modules/Powerbar.lua index 5f48021..786ca59 100644 --- a/Modules/Powerbar.lua +++ b/Modules/Powerbar.lua @@ -16,7 +16,8 @@ local Powerbar = Gladdy:NewModule("Power Bar", 90, { powerBarBorderColor = { r = 0, g = 0, b = 0, a = 1 }, powerBarFontColor = { r = 1, g = 1, b = 1, a = 1 }, powerBarBgColor = { r = 0.3, g = 0.3, b = 0.3, a = 0.7 }, - powerBarFontSize = 10, + powerBarRaceFontSize = 10, + powerBarPowerFontSize = 10, powerShowSpec = true, powerShowRace = true, powerActual = true, @@ -24,6 +25,15 @@ local Powerbar = Gladdy:NewModule("Power Bar", 90, { powerPercentage = false, powerFrameStrata = "MEDIUM", powerFrameLevel = 1, + powerCustomTagsEnabled = false, + powerTextLeft = "[spec] [race]", + powerTextRight = "[current]/[max]", + powerTextLeftOutline = false, + powerTextRightOutline = false, + powerTextLeftVOffset = 1, + powerTextLeftHOffset = 5, + powerTextRightVOffset = 1, + powerTextRightHOffset = -5, }) function Powerbar:Initialize() @@ -72,85 +82,31 @@ function Powerbar:CreateFrame(unit) powerBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.powerBarBgColor)) powerBar.raceText = powerBar:CreateFontString(nil, "LOW") - powerBar.raceText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize) + powerBar.raceText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarRaceFontSize, Gladdy.db.powerTextLeftOutline and "OUTLINE") powerBar.raceText:SetTextColor(Gladdy:SetColor(Gladdy.db.powerBarFontColor)) powerBar.raceText:SetShadowOffset(1, -1) powerBar.raceText:SetShadowColor(0, 0, 0, 1) powerBar.raceText:SetJustifyH("CENTER") - powerBar.raceText:SetPoint("LEFT", 5, 1) + powerBar.raceText:SetPoint("LEFT", Gladdy.db.powerTextLeftHOffset, Gladdy.db.powerTextLeftVOffset) powerBar.powerText = powerBar:CreateFontString(nil, "LOW") - powerBar.powerText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize) + powerBar.powerText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarPowerFontSize, Gladdy.db.powerTextRightOutline and "OUTLINE") powerBar.powerText:SetTextColor(Gladdy:SetColor(Gladdy.db.powerBarFontColor)) powerBar.powerText:SetShadowOffset(1, -1) powerBar.powerText:SetShadowColor(0, 0, 0, 1) powerBar.powerText:SetJustifyH("CENTER") - powerBar.powerText:SetPoint("RIGHT", -5, 1) + powerBar.powerText:SetPoint("RIGHT", Gladdy.db.powerTextRightHOffset, Gladdy.db.powerTextRightVOffset) button.powerBar = powerBar self.frames[unit] = powerBar self:ResetUnit(unit) + powerBar.unit = unit powerBar:RegisterUnitEvent("UNIT_POWER_UPDATE", unit) powerBar:RegisterUnitEvent("UNIT_MAXPOWER", unit) powerBar:RegisterUnitEvent("UNIT_DISPLAYPOWER", unit) powerBar:SetScript("OnEvent", Powerbar.OnEvent) end -function Powerbar.OnEvent(powerBar, event, unit) - if event == "UNIT_POWER_UPDATE" then - Powerbar:SetPower(powerBar, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) - elseif event == "UNIT_MAXPOWER" then - Powerbar:SetPower(powerBar, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) - elseif event == "UNIT_DISPLAYPOWER" then - Powerbar:SetPower(powerBar, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) - end -end - -function Powerbar:SetPower(powerBar, power, powerMax, powerType) - local powerPercentage = floor(power * 100 / powerMax) - local powerText - - if (Gladdy.db.powerActual) then - powerText = powerMax > 999 and ("%.1fk"):format(power / 1000) or power - end - - if (Gladdy.db.powerMax) then - local text = powerMax > 999 and ("%.1fk"):format(powerMax / 1000) or powerMax - if (powerText) then - powerText = ("%s/%s"):format(powerText, text) - else - powerText = text - end - end - - if (Gladdy.db.powerPercentage) then - if (powerText) then - powerText = ("%s (%d%%)"):format(powerText, powerPercentage) - else - powerText = ("%d%%"):format(powerPercentage) - end - end - - if (powerType == 1 and powerBar.powerType ~= powerType) then - powerBar.energy:SetStatusBarColor(1, 0, 0, 1) - powerBar.powerColor = {r = 1, g = 0, b = 0} - powerBar.powerType = powerType - elseif (powerType == 3 and powerBar.powerType ~= powerType) then - powerBar.energy:SetStatusBarColor(1, 1, 0, 1) - powerBar.powerColor = {r = 1, g = 1, b = 0} - powerBar.powerType = powerType - elseif powerBar.powerType ~= powerType then - powerBar.energy:SetStatusBarColor(.18, .44, .75, 1) - powerBar.powerColor = {r = .18, g = .44, b = .75} - powerBar.powerType = powerType - end - - powerBar.powerText:SetText(powerText) - powerBar.energy:SetMinMaxValues(0, powerMax) - powerBar.energy:SetValue(power) - -end - function Powerbar:UpdateFrame(unit) local powerBar = self.frames[unit] if (not powerBar) then @@ -182,7 +138,7 @@ function Powerbar:UpdateFrame(unit) powerBar:SetPoint("TOPLEFT", healthBar, "BOTTOMLEFT", 0, -1) powerBar:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "powerBarBorderStyle"), - edgeSize = Gladdy.db.powerBarBorderSize }) + edgeSize = Gladdy.db.powerBarBorderSize }) powerBar:SetBackdropBorderColor(Gladdy:SetColor(Gladdy.db.powerBarBorderColor)) powerBar.energy:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "powerBarTexture")) @@ -190,10 +146,13 @@ function Powerbar:UpdateFrame(unit) powerBar.energy:SetPoint("TOPLEFT", powerBar, "TOPLEFT", (Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset)) powerBar.energy:SetPoint("BOTTOMRIGHT", powerBar, "BOTTOMRIGHT", -(Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.powerBarBorderSize/Gladdy.db.statusbarBorderOffset)) - powerBar.raceText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize) + powerBar.raceText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarRaceFontSize, Gladdy.db.powerTextLeftOutline and "OUTLINE") powerBar.raceText:SetTextColor(Gladdy:SetColor(Gladdy.db.powerBarFontColor)) - powerBar.powerText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarFontSize) + powerBar.raceText:SetPoint("LEFT", Gladdy.db.powerTextLeftHOffset, Gladdy.db.powerTextLeftVOffset) + + powerBar.powerText:SetFont(Gladdy:SMFetch("font", "powerBarFont"), Gladdy.db.powerBarPowerFontSize, Gladdy.db.powerTextRightOutline and "OUTLINE") powerBar.powerText:SetTextColor(Gladdy:SetColor(Gladdy.db.powerBarFontColor)) + powerBar.powerText:SetPoint("RIGHT", Gladdy.db.powerTextRightHOffset, Gladdy.db.powerTextRightVOffset) powerBar:SetFrameStrata(Gladdy.db.powerFrameStrata) powerBar:SetFrameLevel(Gladdy.db.powerFrameLevel) @@ -201,6 +160,83 @@ function Powerbar:UpdateFrame(unit) powerBar.energy:SetFrameLevel(Gladdy.db.powerFrameLevel - 1) end +function Powerbar.OnEvent(powerBar, event, unit) + if event == "UNIT_POWER_UPDATE" then + Powerbar:SetPower(powerBar, unit, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) + elseif event == "UNIT_MAXPOWER" then + Powerbar:SetPower(powerBar, unit, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) + elseif event == "UNIT_DISPLAYPOWER" then + Powerbar:SetPower(powerBar, unit, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) + end +end + +function Powerbar:SetText(unit, power, powerMax, status) + local button = Gladdy.buttons[unit] + if not Gladdy.buttons[unit] then + return + end + local powerBar = button.powerBar + if Gladdy.db.powerCustomTagsEnabled then + powerBar.powerText:SetText(Gladdy:SetTag(unit, Gladdy.db.powerTextRight, power, powerMax, status)) + powerBar.raceText:SetText(Gladdy:SetTag(unit, Gladdy.db.powerTextLeft, power, powerMax, status)) + else + if power then + local powerPercentage = floor(power * 100 / powerMax) + local powerText + if (Gladdy.db.powerActual) then + powerText = powerMax > 999 and ("%.1fk"):format(power / 1000) or power + end + if (Gladdy.db.powerMax) then + local text = powerMax > 999 and ("%.1fk"):format(powerMax / 1000) or powerMax + if (powerText) then + powerText = ("%s/%s"):format(powerText, text) + else + powerText = text + end + end + if (Gladdy.db.powerPercentage) then + if (powerText) then + powerText = ("%s (%d%%)"):format(powerText, powerPercentage) + else + powerText = ("%d%%"):format(powerPercentage) + end + end + powerBar.powerText:SetText(powerText) + end + + local raceText = Gladdy.db.powerShowRace and button.raceLoc or "" + if (button.spec and Gladdy.db.powerShowSpec) then + raceText = button.spec .. " " .. raceText + end + powerBar.raceText:SetText(raceText) + end +end + +function Powerbar:SetPower(powerBar, unit, power, powerMax, powerType, status) + Powerbar:SetText(unit, power, powerMax, status) + powerBar.energy.current = power + powerBar.energy.max = powerMax + powerBar.energy.powerType = powerType + + if (powerType == 1 and powerBar.powerType ~= powerType) then + powerBar.energy:SetStatusBarColor(1, 0, 0, 1) + powerBar.powerColor = {r = 1, g = 0, b = 0} + powerBar.powerType = powerType + elseif (powerType == 3 and powerBar.powerType ~= powerType) then + powerBar.energy:SetStatusBarColor(1, 1, 0, 1) + powerBar.powerColor = {r = 1, g = 1, b = 0} + powerBar.powerType = powerType + elseif powerBar.powerType ~= powerType then + powerBar.energy:SetStatusBarColor(.18, .44, .75, 1) + powerBar.powerColor = {r = .18, g = .44, b = .75} + powerBar.powerType = powerType + end + + powerBar.energy:SetMinMaxValues(0, powerMax) + powerBar.energy:SetValue(power) + +end + function Powerbar:ResetUnit(unit) local powerBar = self.frames[unit] if (not powerBar) then @@ -222,8 +258,14 @@ function Powerbar:Test(unit) return end + powerBar.energy.current = button.power + powerBar.energy.max = button.powerMax + powerBar.energy.powerType = button.powerType self:ENEMY_SPOTTED(unit) self:UNIT_POWER(unit, button.power, button.powerMax, button.powerType) + if unit == "arena1" then + self:UNIT_DEATH(unit) + end end function Powerbar:ENEMY_SPOTTED(unit) @@ -233,13 +275,6 @@ function Powerbar:ENEMY_SPOTTED(unit) return end - local raceText = Gladdy.db.powerShowRace and button.raceLoc or "" - - if (button.spec and Gladdy.db.powerShowSpec) then - raceText = button.spec .. " " .. raceText - end - - powerBar.raceText:SetText(raceText) if UnitExists(unit) then Powerbar:SetPower(powerBar, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) end @@ -251,13 +286,10 @@ function Powerbar:UNIT_SPEC(unit, spec) if (not powerBar or not button) then return end - local raceText = Gladdy.db.powerShowRace and button.raceLoc or "" - if (button.spec and Gladdy.db.powerShowSpec) then - raceText = spec .. " " .. raceText + if UnitExists(unit) then + Powerbar:SetPower(powerBar, unit, powerBar.energy.current, powerBar.energy.max, powerBar.energy.powerType) end - - powerBar.raceText:SetText(raceText) end function Powerbar:UNIT_POWER(unit, power, powerMax, powerType) @@ -269,44 +301,7 @@ function Powerbar:UNIT_POWER(unit, power, powerMax, powerType) if not Gladdy.buttons[unit].class then Gladdy:SpotEnemy(unit, true) end - - local powerPercentage = floor(power * 100 / powerMax) - local powerText - - if (Gladdy.db.powerActual) then - powerText = powerMax > 999 and ("%.1fk"):format(power / 1000) or power - end - - if (Gladdy.db.powerMax) then - local text = powerMax > 999 and ("%.1fk"):format(powerMax / 1000) or powerMax - if (powerText) then - powerText = ("%s/%s"):format(powerText, text) - else - powerText = text - end - end - - if (Gladdy.db.powerPercentage) then - if (powerText) then - powerText = ("%s (%d%%)"):format(powerText, powerPercentage) - else - powerText = ("%d%%"):format(powerPercentage) - end - end - - if (powerType == 1) then - powerBar.energy:SetStatusBarColor(1, 0, 0, 1) - powerBar.powerColor = {r = 1, g = 0, b = 0} - elseif (powerType == 3) then - powerBar.energy:SetStatusBarColor(1, 1, 0, 1) - powerBar.powerColor = {r = 1, g = 1, b = 0} - else - powerBar.energy:SetStatusBarColor(.18, .44, .75, 1) - powerBar.powerColor = {r = .18, g = .44, b = .75} - end - - powerBar.powerText:SetText(powerText) - powerBar.energy:SetValue(powerPercentage) + Powerbar:SetPower(powerBar, unit, power, powerMax, powerType) end function Powerbar:UNIT_DEATH(unit) @@ -314,9 +309,7 @@ function Powerbar:UNIT_DEATH(unit) if (not powerBar) then return end - - powerBar.energy:SetValue(0) - powerBar.powerText:SetText("0%") + Powerbar:SetPower(powerBar, unit, 0, powerBar.energy.max, powerBar.energy.powerType, L["DEAD"]) end function Powerbar:UNIT_DESTROYED(unit) @@ -324,8 +317,7 @@ function Powerbar:UNIT_DESTROYED(unit) if (not powerBar) then return end - powerBar.energy:SetValue(0) - powerBar.powerText:SetText("0%") + Powerbar:SetPower(powerBar, unit, 0, powerBar.energy.max, powerBar.energy.powerType, L["LEAVE"]) end local function option(params) @@ -341,8 +333,10 @@ local function option(params) if Gladdy.db.powerBarBorderSize > Gladdy.db.powerBarHeight/2 then Gladdy.db.powerBarBorderSize = Gladdy.db.powerBarHeight/2 end - for i=1,Gladdy.curBracket do - Powerbar:Test("arena" .. i) + if Gladdy.frame.testing then + for i=1,Gladdy.curBracket do + Powerbar:Test("arena" .. i) + end end Gladdy:UpdateFrame() end, @@ -436,16 +430,84 @@ function Powerbar:GetOptions() order = 12, hasAlpha = true, }), - powerBarFontSize = option({ - type = "range", - name = L["Font size"], - desc = L["Size of the text"], + powerTextLeftOutline = option({ + type = "toggle", + name = L["Left Font Outline"], order = 13, + width = "full", + }), + powerTextRightOutline = option({ + type = "toggle", + name = L["Right Font Outline"], + order = 14, + width = "full", + }), + headerSize = { + type = "header", + name = L["Size"], + order = 20, + }, + powerBarRaceFontSize = option({ + type = "range", + name = L["Race font size"], + desc = L["Size of the race text"], + order = 21, step = 0.1, - min = 1, + min = 0, max = 20, width = "full", }), + powerBarPowerFontSize = option({ + type = "range", + name = L["Power font size"], + desc = L["Size of the power text"], + order = 22, + step = 0.1, + min = 0, + max = 20, + width = "full", + }), + headerOffsets = { + type = "header", + name = L["Offsets"], + order = 30, + }, + powerTextLeftVOffset = option({ + type = "range", + name = L["Left Text Vertical Offset"], + order = 31, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), + powerTextLeftHOffset = option({ + type = "range", + name = L["Left Text Horizontal Offset"], + order = 32, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), + powerTextRightVOffset = option({ + type = "range", + name = L["Right Text Vertical Offset"], + order = 33, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), + powerTextRightHOffset = option({ + type = "range", + name = L["Right Text Horizontal Offset"], + order = 34, + step = 0.1, + min = -200, + max = 200, + width = "full", + }), }, }, border = { @@ -528,31 +590,44 @@ function Powerbar:GetOptions() name = L["Show race"], desc = L["Show race"], order = 2, + disabled = function() return Gladdy.db.powerCustomTagsEnabled end, }), powerShowSpec= option({ type = "toggle", name = L["Show spec"], desc = L["Show spec"], order = 3, + disabled = function() return Gladdy.db.powerCustomTagsEnabled end, }), powerActual = option({ type = "toggle", name = L["Show the actual power"], desc = L["Show the actual power on the power bar"], - order = 31, + order = 4, + disabled = function() return Gladdy.db.powerCustomTagsEnabled end, }), powerMax = option({ type = "toggle", name = L["Show max power"], desc = L["Show max power on the power bar"], - order = 32, + order = 5, + disabled = function() return Gladdy.db.powerCustomTagsEnabled end, }), powerPercentage = option({ type = "toggle", name = L["Show power percentage"], desc = L["Show power percentage on the power bar"], - order = 33, + order = 6, + disabled = function() return Gladdy.db.powerCustomTagsEnabled end, }), + header = { + type = "header", + name = L["Custom Tags"], + order = 10, + }, + powerCustomTagsEnabled = Gladdy:GetTagOption(L["Custom Tags Enabled"], 11, nil, option, true), + powerTextLeft = Gladdy:GetTagOption(L["Left Text"], 12, "powerCustomTagsEnabled", option), + powerTextRight = Gladdy:GetTagOption(L["Right Text"], 13, "powerCustomTagsEnabled", option), }, }, }, diff --git a/Util.lua b/Util.lua index 204e9d0..947a877 100644 --- a/Util.lua +++ b/Util.lua @@ -43,9 +43,9 @@ local function getTagText(unit, tag, current, max, status) if str_find(tag, "percent") then return current and max and floor(current * 100 / max) .. "%%" or "" elseif str_find(tag, "current") then - return current or "" + return current and max > 999 and ("%.1fk"):format(current / 1000) or current or "" elseif str_find(tag, "max") then - return max or "" + return max and max > 999 and ("%.1fk"):format(max / 1000) or max or "" elseif str_find(tag, "status") then if str_find(tag, "%|") and status == nil then return nil @@ -55,11 +55,12 @@ local function getTagText(unit, tag, current, max, status) elseif str_find(tag, "name") then return button.name or "" elseif str_find(tag, "class") then - return button.classLoc or "" + return button.classLoc or "" elseif str_find(tag, "race") then - return button.raceLoc or "" + return button.raceLoc or "" elseif str_find(tag, "arena") then - return str_gsub(unit, "arena", "") + local str,found = str_gsub(unit, "arena", "") + return found == 1 and str or "" elseif str_find(tag, "spec") then if str_find(tag, "%|") and button.spec == nil then return nil -- 2.39.5 From 10caa05e314cf3d7ac18deaa933ab1369e36c213 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 00:02:25 +0100 Subject: [PATCH 113/227] cooldowns test only active icons --- Modules/Cooldowns.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 3b8bf5a..5bcee89 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -311,13 +311,17 @@ end function Cooldowns:UpdateTestCooldowns(unit) local button = Gladdy.buttons[unit] self:UpdateCooldowns(button) - -- use class spells - for spellId,_ in pairs(Gladdy:GetCooldownList()[button.class]) do - self:CooldownUsed(unit, button.class, spellId) + + local orderedIcons = {} + for _,icon in pairs(button.spellCooldownFrame.icons) do + tinsert(orderedIcons, icon) end - -- use race spells - for spellId,_ in pairs(Gladdy:GetCooldownList()[button.race]) do - self:CooldownUsed(unit, button.race, spellId) + tbl_sort(orderedIcons, function(a, b) + return Gladdy.db.cooldownCooldownsOrder[button.class][tostring(a.spellId)] < Gladdy.db.cooldownCooldownsOrder[button.class][tostring(b.spellId)] + end) + + for _,icon in ipairs(orderedIcons) do + self:CooldownUsed(unit, button.class, icon.spellId) end end -- 2.39.5 From 5b32b8c79311edd403a0e125afb83fdc6d95c1fc Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 15:59:43 +0100 Subject: [PATCH 114/227] grouping auras, interrupts, classicon, racial, trinket --- Modules/Auras.lua | 97 +++++++++++++++++++++++++++++++++++++++++-- Modules/Classicon.lua | 38 ++++++++++++++--- Modules/Cooldowns.lua | 15 +++++-- Modules/Pets.lua | 10 ++--- Modules/Racial.lua | 42 ++++++++++++++++++- Modules/Trinket.lua | 40 +++++++++++++++++- 6 files changed, 222 insertions(+), 20 deletions(-) diff --git a/Modules/Auras.lua b/Modules/Auras.lua index 5d33667..bbe428a 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -1,5 +1,5 @@ local pairs, ipairs, select, tinsert, tbl_sort, tostring, tonumber, rand = pairs, ipairs, select, tinsert, table.sort, tostring, tonumber, math.random - +local str_gsub = string.gsub local GetSpellInfo = GetSpellInfo local GetSpellDescription = GetSpellDescription local CreateFrame, GetTime = CreateFrame, GetTime @@ -56,6 +56,10 @@ local Auras = Gladdy:NewModule("Auras", nil, { auraFrameLevel = 5, auraInterruptFrameStrata = "MEDIUM", auraInterruptFrameLevel = 5, + auraGroup = false, + auraGroupDirection = "DOWN", + auraInterruptGroup = false, + auraInterruptGroupDirection = "DOWN", }) function Auras:Initialize() @@ -239,6 +243,23 @@ function Auras:UpdateFrame(unit) auraFrame:ClearAllPoints() Gladdy:SetPosition(auraFrame, unit, "auraXOffset", "auraYOffset", true, Auras) + + if (Gladdy.db.auraGroup) then + if (unit ~= "arena1") then + local previousUnit = "arena" .. str_gsub(unit, "arena", "") - 1 + self.frames[unit]:ClearAllPoints() + if Gladdy.db.auraGroupDirection == "RIGHT" then + self.frames[unit]:SetPoint("LEFT", self.frames[previousUnit], "RIGHT", 0, 0) + elseif Gladdy.db.auraGroupDirection == "LEFT" then + self.frames[unit]:SetPoint("RIGHT", self.frames[previousUnit], "LEFT", 0, 0) + elseif Gladdy.db.auraGroupDirection == "UP" then + self.frames[unit]:SetPoint("BOTTOM", self.frames[previousUnit], "TOP", 0, 0) + elseif Gladdy.db.auraGroupDirection == "DOWN" then + self.frames[unit]:SetPoint("TOP", self.frames[previousUnit], "BOTTOM", 0, 0) + end + end + end + if (unit == "arena1") then Gladdy:CreateMover(auraFrame, "auraXOffset", "auraYOffset", L["Auras"], {"TOPLEFT", "TOPLEFT"}, @@ -321,6 +342,23 @@ function Auras:UpdateInterruptFrame(unit) interruptFrame:ClearAllPoints() Gladdy:SetPosition(interruptFrame, unit, "auraInterruptXOffset", "auraInterruptYOffset", true, Auras) + + if (Gladdy.db.auraInterruptGroup) then + if (unit ~= "arena1") then + local previousUnit = "arena" .. str_gsub(unit, "arena", "") - 1 + self.frames[unit].interruptFrame:ClearAllPoints() + if Gladdy.db.auraInterruptGroupDirection == "RIGHT" then + self.frames[unit].interruptFrame:SetPoint("LEFT", self.frames[previousUnit].interruptFrame, "RIGHT", 0, 0) + elseif Gladdy.db.auraInterruptGroupDirection == "LEFT" then + self.frames[unit].interruptFrame:SetPoint("RIGHT", self.frames[previousUnit].interruptFrame, "LEFT", 0, 0) + elseif Gladdy.db.auraInterruptGroupDirection == "UP" then + self.frames[unit].interruptFrame:SetPoint("BOTTOM", self.frames[previousUnit].interruptFrame, "TOP", 0, 0) + elseif Gladdy.db.auraInterruptGroupDirection == "DOWN" then + self.frames[unit].interruptFrame:SetPoint("TOP", self.frames[previousUnit].interruptFrame, "BOTTOM", 0, 0) + end + end + end + if (unit == "arena1") then Gladdy:CreateMover(interruptFrame, "auraInterruptXOffset", "auraInterruptYOffset", L["Interrupts"], {"TOPLEFT", "TOPLEFT"}, @@ -682,10 +720,63 @@ function Auras:GetOptions() name = L["Frame"], order = 3, args = { + groupOptions = { + type = "group", + name = L["Group"], + order = 4, + args = { + headerAuras = { + type = "header", + name = L["Auras"], + order = 1, + }, + auraGroup = Gladdy:option({ + type = "toggle", + name = L["Group"] .. " " .. L["Auras"], + order = 2, + disabled = function() return not Gladdy.db.auraDetached end, + }), + auraGroupDirection = Gladdy:option({ + type = "select", + name = L["Group direction"], + order = 3, + values = { + ["RIGHT"] = L["Right"], + ["LEFT"] = L["Left"], + ["UP"] = L["Up"], + ["DOWN"] = L["Down"], + }, + disabled = function() return not Gladdy.db.auraGroup or not Gladdy.db.auraDetached end, + }), + headerInterrupts = { + type = "header", + name = L["Interrupts"], + order = 4, + }, + auraInterruptGroup = Gladdy:option({ + type = "toggle", + name = L["Group"] .. " " .. L["Interrupts"], + order = 5, + disabled = function() return not Gladdy.db.auraInterruptDetached end, + }), + auraInterruptGroupDirection = Gladdy:option({ + type = "select", + name = L["Group direction"], + order = 6, + values = { + ["RIGHT"] = L["Right"], + ["LEFT"] = L["Left"], + ["UP"] = L["Up"], + ["DOWN"] = L["Down"], + }, + disabled = function() return not Gladdy.db.auraInterruptGroup or not Gladdy.db.auraInterruptDetached end, + }), + } + }, detachedAuraMode = { type = "group", name = L["Detached Aura"], - order = 4, + order = 5, args = { headerDetachedMode = { type = "header", @@ -789,7 +880,7 @@ function Auras:GetOptions() detachedInterruptMode = { type = "group", name = L["Detached Interrupt"], - order = 5, + order = 6, args = { headerDetachedMode = { type = "header", diff --git a/Modules/Classicon.lua b/Modules/Classicon.lua index d9c476a..abaa060 100644 --- a/Modules/Classicon.lua +++ b/Modules/Classicon.lua @@ -1,4 +1,4 @@ -local select = select +local select, str_gsub = select, string.gsub local Gladdy = LibStub("Gladdy") local CreateFrame = CreateFrame @@ -16,7 +16,7 @@ local Classicon = Gladdy:NewModule("Class Icon", 81, { classIconFrameStrata = "MEDIUM", classIconFrameLevel = 5, classIconGroup = false, - classIconGroupDirection = "RIGHT" + classIconGroupDirection = "DOWN" }) local classIconPath = "Interface\\Addons\\Gladdy\\Images\\Classes\\" @@ -137,9 +137,17 @@ function Classicon:UpdateFrame(unit) if (Gladdy.db.classIconGroup) then if (unit ~= "arena1") then - local previousUnit = "arena" .. string.gsub(unit, "arena", "") - 1 + local previousUnit = "arena" .. str_gsub(unit, "arena", "") - 1 self.frames[unit]:ClearAllPoints() - self.frames[unit]:SetPoint("LEFT", self.frames[previousUnit], "RIGHT", 0, 0) + if Gladdy.db.classIconGroupDirection == "RIGHT" then + self.frames[unit]:SetPoint("LEFT", self.frames[previousUnit], "RIGHT", 0, 0) + elseif Gladdy.db.classIconGroupDirection == "LEFT" then + self.frames[unit]:SetPoint("RIGHT", self.frames[previousUnit], "LEFT", 0, 0) + elseif Gladdy.db.classIconGroupDirection == "UP" then + self.frames[unit]:SetPoint("BOTTOM", self.frames[previousUnit], "TOP", 0, 0) + elseif Gladdy.db.classIconGroupDirection == "DOWN" then + self.frames[unit]:SetPoint("TOP", self.frames[previousUnit], "BOTTOM", 0, 0) + end end end @@ -228,11 +236,31 @@ function Classicon:GetOptions() end end }, + classIconGroup = Gladdy:option({ + type = "toggle", + name = L["Group"] .. " " .. L["Class Icon"], + order = 5, + disabled = function() return not Gladdy.db.classIconEnabled end, + }), + classIconGroupDirection = Gladdy:option({ + type = "select", + name = L["Group direction"], + order = 6, + values = { + ["RIGHT"] = L["Right"], + ["LEFT"] = L["Left"], + ["UP"] = L["Up"], + ["DOWN"] = L["Down"], + }, + disabled = function() + return not Gladdy.db.classIconGroup or not Gladdy.db.classIconEnabled + end, + }), group = { type = "group", childGroups = "tree", name = L["Frame"], - order = 4, + order = 7, disabled = function() return not Gladdy.db.classIconEnabled end, args = { size = { diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index 5bcee89..e915321 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -236,6 +236,7 @@ function Cooldowns:UpdateFrame(unit) end if (Gladdy.db.cooldownGroup) then + --TODO fix overlapping if (unit ~= "arena1") then local previousUnit = "arena" .. string.gsub(unit, "arena", "") - 1 self.frames[unit]:ClearAllPoints() @@ -552,6 +553,12 @@ function Cooldowns:GetOptions() desc = L["Enabled cooldown module"], order = 2, }), + cooldownGroup = Gladdy:option({ + type = "toggle", + name = L["Group"] .. " " .. L["Cooldown"], + order = 3, + disabled = function() return not Gladdy.db.cooldown end, + }), group = { type = "group", childGroups = "tree", @@ -858,8 +865,8 @@ function Cooldowns:GetCooldownOptions() order = 2, width = 0.1, image = "Interface\\Addons\\Gladdy\\Images\\uparrow", - imageWidth = 20, - imageHeight = 20, + imageWidth = 15, + imageHeight = 15, func = function() if (Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] > 1) then local current = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] @@ -883,8 +890,8 @@ function Cooldowns:GetCooldownOptions() order = 3, width = 0.1, image = "Interface\\Addons\\Gladdy\\Images\\downarrow", - imageWidth = 20, - imageHeight = 20, + imageWidth = 15, + imageHeight = 15, func = function() if (Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] < tblLength) then local current = Gladdy.db.cooldownCooldownsOrder[class][tostring(spellId)] diff --git a/Modules/Pets.lua b/Modules/Pets.lua index d54ceab..4e9d648 100644 --- a/Modules/Pets.lua +++ b/Modules/Pets.lua @@ -389,6 +389,11 @@ function Pets:GetOptions() desc = L["Enables Pets module"], order = 3, }), + petGroup = option({ + type = "toggle", + name = L["Group Pets"], + order = 4, + }), group = { type = "group", childGroups = "tree", @@ -426,11 +431,6 @@ function Pets:GetOptions() step = 1, width = "full", }), - petGroup = option({ - type = "toggle", - name = L["Group Pets"], - order = 5, - }), petMargin = option({ type = "range", name = L["Margin"], diff --git a/Modules/Racial.lua b/Modules/Racial.lua index ac8bc50..335b3fe 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -1,4 +1,4 @@ -local ceil = ceil +local ceil, str_gsub = ceil, string.gsub local CreateFrame = CreateFrame local GetTime = GetTime @@ -20,6 +20,8 @@ local Racial = Gladdy:NewModule("Racial", 79, { racialCooldownNumberAlpha = 1, racialFrameStrata = "MEDIUM", racialFrameLevel = 5, + racialGroup = false, + racialGroupDirection = "DOWN", }) @@ -153,6 +155,22 @@ function Racial:UpdateFrame(unit) Gladdy:SetPosition(racial, unit, "racialXOffset", "racialYOffset", Racial:LegacySetPosition(racial, unit), Racial) + if (Gladdy.db.racialGroup) then + if (unit ~= "arena1") then + local previousUnit = "arena" .. str_gsub(unit, "arena", "") - 1 + self.frames[unit]:ClearAllPoints() + if Gladdy.db.racialGroupDirection == "RIGHT" then + self.frames[unit]:SetPoint("LEFT", self.frames[previousUnit], "RIGHT", 0, 0) + elseif Gladdy.db.racialGroupDirection == "LEFT" then + self.frames[unit]:SetPoint("RIGHT", self.frames[previousUnit], "LEFT", 0, 0) + elseif Gladdy.db.racialGroupDirection == "UP" then + self.frames[unit]:SetPoint("BOTTOM", self.frames[previousUnit], "TOP", 0, 0) + elseif Gladdy.db.racialGroupDirection == "DOWN" then + self.frames[unit]:SetPoint("TOP", self.frames[previousUnit], "BOTTOM", 0, 0) + end + end + end + if (unit == "arena1") then Gladdy:CreateMover(racial,"racialXOffset", "racialYOffset", L["Racial"], {"TOPLEFT", "TOPLEFT"}, @@ -241,11 +259,31 @@ function Racial:GetOptions() desc = L["Enable racial icon"], order = 3, }), + racialGroup = Gladdy:option({ + type = "toggle", + name = L["Group"] .. " " .. L["Racial"], + order = 4, + disabled = function() return not Gladdy.db.racialEnabled end, + }), + racialGroupDirection = Gladdy:option({ + type = "select", + name = L["Group direction"], + order = 5, + values = { + ["RIGHT"] = L["Right"], + ["LEFT"] = L["Left"], + ["UP"] = L["Up"], + ["DOWN"] = L["Down"], + }, + disabled = function() + return not Gladdy.db.racialGroup or not Gladdy.db.racialEnabled + end, + }), group = { type = "group", childGroups = "tree", name = L["Frame"], - order = 4, + order = 6, disabled = function() return not Gladdy.db.racialEnabled end, args = { general = { diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index 13f7f49..fd14d10 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -1,4 +1,4 @@ -local ceil = ceil +local ceil, str_gsub = ceil, string.gsub local C_PvP = C_PvP local CreateFrame = CreateFrame @@ -25,6 +25,8 @@ local Trinket = Gladdy:NewModule("Trinket", 80, { trinketColored = false, trinketColoredCd = { r = 1, g = 0, b = 0, a = 1 }, trinketColoredNoCd = { r = 0, g = 1, b = 0, a = 1 }, + trinketGroup = false, + trinketGroupDirection = "DOWN", }) function Trinket:Initialize() @@ -175,6 +177,22 @@ function Trinket:UpdateFrame(unit) Gladdy:SetPosition(trinket, unit, "trinketXOffset", "trinketYOffset", Trinket:LegacySetPosition(trinket, unit), Trinket) + if (Gladdy.db.trinketGroup) then + if (unit ~= "arena1") then + local previousUnit = "arena" .. str_gsub(unit, "arena", "") - 1 + self.frames[unit]:ClearAllPoints() + if Gladdy.db.trinketGroupDirection == "RIGHT" then + self.frames[unit]:SetPoint("LEFT", self.frames[previousUnit], "RIGHT", 0, 0) + elseif Gladdy.db.trinketGroupDirection == "LEFT" then + self.frames[unit]:SetPoint("RIGHT", self.frames[previousUnit], "LEFT", 0, 0) + elseif Gladdy.db.trinketGroupDirection == "UP" then + self.frames[unit]:SetPoint("BOTTOM", self.frames[previousUnit], "TOP", 0, 0) + elseif Gladdy.db.trinketGroupDirection == "DOWN" then + self.frames[unit]:SetPoint("TOP", self.frames[previousUnit], "BOTTOM", 0, 0) + end + end + end + if (unit == "arena1") then Gladdy:CreateMover(trinket,"trinketXOffset", "trinketYOffset", L["Trinket"], {"TOPLEFT", "TOPLEFT"}, @@ -299,6 +317,26 @@ function Trinket:GetOptions() hasAlpha = true, disabled = function() return not Gladdy.db.trinketEnabled end, }), + trinketGroup = Gladdy:option({ + type = "toggle", + name = L["Group Class Icons"], + order = 7, + disabled = function() return not Gladdy.db.trinketEnabled end, + }), + trinketGroupDirection = Gladdy:option({ + type = "select", + name = L["Group direction"], + order = 8, + values = { + ["RIGHT"] = L["Right"], + ["LEFT"] = L["Left"], + ["UP"] = L["Up"], + ["DOWN"] = L["Down"], + }, + disabled = function() + return not Gladdy.db.trinketGroup or not Gladdy.db.trinketEnabled + end, + }), group = { type = "group", childGroups = "tree", -- 2.39.5 From eddd7588f426e1bac71bf4e4fc47dc2812336786 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 16:36:27 +0100 Subject: [PATCH 115/227] #31 frames expand a centric point option added --- Frame.lua | 9 +++++++-- Options.lua | 9 ++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Frame.lua b/Frame.lua index 2713510..e236d2e 100644 --- a/Frame.lua +++ b/Frame.lua @@ -134,6 +134,8 @@ function Gladdy:UpdateFrame() local height = (self.db.healthBarHeight + powerBarHeight) * teamSize + (self.db.highlightInset and 0 or self.db.highlightBorderSize * 2 * teamSize) + self.db.bottomMargin * (teamSize - 1) + local singleFrameHeight = self.db.healthBarHeight + powerBarHeight + + (self.db.highlightInset and 0 or self.db.highlightBorderSize * 2) + self.db.bottomMargin -- Highlight margin = margin + highlightBorderSize @@ -155,10 +157,13 @@ function Gladdy:UpdateFrame() self.frame:SetPoint("CENTER") else local scale = self.frame:GetEffectiveScale() + local growMiddle = self.db.growMiddle and teamSize > 0 and teamSize / 2 >= 1 and (teamSize - 1) * (singleFrameHeight / 2) or 0 if (self.db.growDirection == "TOP") then - self.frame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, self.db.y / scale) + self.frame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, (self.db.y / scale) - growMiddle) + elseif self.db.growDirection == "BOTTOM" then + self.frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, (self.db.y / scale) + growMiddle) else - self.frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, self.db.y / scale) + self.frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, (self.db.y / scale)) end end diff --git a/Options.lua b/Options.lua index ea4c3a3..78f78e1 100644 --- a/Options.lua +++ b/Options.lua @@ -48,6 +48,7 @@ Gladdy.defaults = { x = 0, y = 0, growDirection = "BOTTOM", + growMiddle = false, frameScale = 1, pixelPerfect = false, barWidth = 180, @@ -311,7 +312,7 @@ function Gladdy:SetupOptions() group = { type = "group", name = L["General"], - order = 5, + order = 6, childGroups = "tree", args = { frameGeneral = { @@ -322,6 +323,12 @@ function Gladdy:SetupOptions() headerFrame = { type = "header", name = L["Frame General"], + order = 2, + }, + growMiddle = { + type = "toggle", + name = L["Grow Middle"], + desc = L["Frames expand along a centric anchor"], order = 3, }, pixelPerfect = { -- 2.39.5 From 15fb697258d93e454120de4bc8d74aef7588866a Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 17:02:37 +0100 Subject: [PATCH 116/227] readme + version --- Gladdy.lua | 2 +- Gladdy.toc | 6 +++--- README.md | 34 ++++++++++++++++++++++++++++++++-- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/Gladdy.lua b/Gladdy.lua index 808b2c3..0270772 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -31,7 +31,7 @@ local MAJOR, MINOR = "Gladdy", 5 local Gladdy = LibStub:NewLibrary(MAJOR, MINOR) local L Gladdy.version_major_num = 2 -Gladdy.version_minor_num = 0.00 +Gladdy.version_minor_num = 0.10 Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num Gladdy.version_releaseType = RELEASE_TYPES.release Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType diff --git a/Gladdy.toc b/Gladdy.toc index 9fe7adc..098d2c1 100644 --- a/Gladdy.toc +++ b/Gladdy.toc @@ -1,7 +1,7 @@ -## Interface: 20503 +## Interface: 20504 ## Title: Gladdy - TBC -## Version: 2.00-Release -## Notes: The most powerful arena AddOn for WoW 2.5.3 +## Version: 2.10-Release +## Notes: The most powerful arena AddOn for WoW 2.5.4 ## Author: XiconQoo, DnB_Junkee, Knall ## X-Email: contact me on discord Knall#1751 ## SavedVariables: GladdyXZ diff --git a/README.md b/README.md index 2c4d356..9fc6876 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Gladdy - TBC -### The most powerful arena addon for WoW TBC 2.5.1 +### The most powerful arena addon for WoW TBC 2.5.4 --- -## [v2.00-Release Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v2.00-Release/Gladdy_TBC-Classic_v2.00-Release.zip) +## [v2.10-Release Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v2.10-Release/Gladdy_TBC-Classic_v2.10-Release.zip) ###### Please consider donating if you like my work @@ -78,6 +78,36 @@ Thank you! ### Changes +### v2.10-Release + +- **Totems**: + - added new module **TotemPulse** (sorry Shamans) + - displays pulse ticks on all totems that have a pulse mechanic (e.g. tremor totem) + - either cooldown or bar style + - attaches to TotemPlates if enabled (con be configured individually by totem) + - completely hide totem nameplate option added + - added a dummy totemplate in config mode + - totem detection is completely localization independent now +- **Cooldowns**: + - completely refactored to fix general bugs + - can now be ordered individually + - some cooldown tracking improved for units coming out of stealth (e.g. perception, sprint, shadowstep) +- **Custom Text Tags** + - PowerBar and HealthBar can now have custom tags. Check it out + - also the texts can be moved to achieve a Blizzlike style with names above HealthBar +- general improvements to spec detection + - no more restoration warlocks :D + - tree of life spec detection should work now +- fix Announcements +- added grouping option for Auras (+ Interrupts) in detached mode, ClassIcon, Cooldowns, Trinket, Racial +- added a "Grow Middle" option, which aligns the gladdy frames on a centric point +- added frFR localization by Macumba +- added Flat statusbar texture +- added some auras (e.g. disarm) +- added disarm DRs +- improved some class icons +- fixed health bug since 2.5.4 + ### v2.00-Release This is a packed release with new features and bugfixes. Most importantly, positioning of all elements has been redone with movable frames. -- 2.39.5 From f283ea994a6586fe845f002591cb2cf158c861c3 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 17:16:17 +0100 Subject: [PATCH 117/227] updated Mir Profile --- ImportStrings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ImportStrings.lua b/ImportStrings.lua index effd467..fef1286 100644 --- a/ImportStrings.lua +++ b/ImportStrings.lua @@ -25,7 +25,7 @@ function Gladdy:GetRukkProfile() end function Gladdy:GetMirProfile() - return "4XzT80SCBJZKpm75XfXpee4O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U8MBUetLzttHhmjb4m6fGbvRcG4K4xCTMRjos7o90(WPSrC82Zm4Yf)2kCGg2v95)ZF7X0)8ZTCGVCGFNPDAZEKYeegH9BjqLezA9(u1qo4pUayntXiO88IT)GD39fxwYhZRfcWVRpgJNsRt8Xxb5if)wjNmuVwocYF9W)CZyVu3nWc3HWYHB4oYu1VbC32FedoS1W2J3WGddHtU28mV2ypx2D3II5mldhrc8U8W6kgzFNUEYzqiB9GBhkgS2T2duSWFoM(CFb9qkvVutwnMrUM0(q(JBvIAmNxR57(opxTC5)pOQQLw" end function Gladdy:GetMirEditedProfile() -- 2.39.5 From a8a6002f47cba046f4bcb30ec945e3a13f39a888 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 17:56:53 +0100 Subject: [PATCH 118/227] fixed UNIT_HEALTH_FREQUENT --- Modules/Healthbar.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index 2e91cba..4b05cc9 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -111,7 +111,7 @@ end function Healthbar.OnEvent(self, event, unit) local isDead = UnitExists(unit) and UnitIsDeadOrGhost(unit) - if event == "UNIT_HEALTH" or event == "UNIT_MAXHEALTH" then + if event == "UNIT_HEALTH_FREQUENT" or event == "UNIT_MAXHEALTH" then if isDead then Gladdy:SendMessage("UNIT_DEATH", unit) return -- 2.39.5 From d43d8e9284b840215441c3c046262b3804d7ce3b Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 17:57:04 +0100 Subject: [PATCH 119/227] updated Mir Profile --- ImportStrings.lua | 4 ++-- README.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ImportStrings.lua b/ImportStrings.lua index fef1286..fc1d475 100644 --- a/ImportStrings.lua +++ b/ImportStrings.lua @@ -25,9 +25,9 @@ function Gladdy:GetRukkProfile() end function Gladdy:GetMirProfile() - return "4X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08aJjD5N43WSNGd1H49uXWDjgn)ksfp8pdnC9mWZPvfNdp9bqPP6Fy2YYIn7lpSTL98(DflZDV5rRX)cr5fNAORxl2UQDxUBOUynCcdpMXLQX3AmmyeaLmt2Nwp04VYc8qSVCndw(3QpXwlnkFC)P0AiGuUus(YYn72EsdGrLq3FUFj4zMxCAdJI)1QgM64YZ2YtPtgSsJlfylZlO9bF8u6Oom0ilMf72vEAlMr0RGr72pSvoISBRwEkT2OIit2HStP1XPSb((8SItP94VEb82963i257odVm9kMY52)c9uNP266C1BCwr9R2V3vN9MlBN05A2H2NKS(Fq68nbZyTeGtq3KS33LGSV3HRg3F5xz6ziL5KtFDEMprVw5jb06GFcF8dI18cQxMz0d48UkRtSI)wwk1PyqFlNIqzJ48PhqqPv6Lhe3C6hmLsVaT5VMcYU0pGErtWSdiFi4CAWrGyyFQQDnb34nr3b3tR3Ds)FxNgdDwnl(1fZ(9LyffST8p)p)9NY(8F2lLJKNqABA37ToC8GSW7TBUbDuTQiHA)mEYi1xBBM6p(1HEUO9avwdCBcAwKj9gcTmAl8)fkOX2R2f5l)6awFXV0V2nZRidobmF8HuJMoE)kC16D(UnYunzugwLXcb7p9G9XNlXM)QV9pFtCd4W8qNSfesCWkxghfefQsJJ12OO4u3BjzR3Wt)F9ckxS4))kE61Zb" end \ No newline at end of file diff --git a/README.md b/README.md index 9fc6876..4c269b9 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ Thank you! - added disarm DRs - improved some class icons - fixed health bug since 2.5.4 +- updated Mir Profile ### v2.00-Release -- 2.39.5 From 3d4479cc06fb74bd00abdd260a2787abf7a2c052 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 22:25:54 +0100 Subject: [PATCH 120/227] castbar font outline option added --- Modules/Castbar.lua | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Modules/Castbar.lua b/Modules/Castbar.lua index 24fc6a7..05ec33b 100644 --- a/Modules/Castbar.lua +++ b/Modules/Castbar.lua @@ -25,6 +25,7 @@ local Castbar = Gladdy:NewModule("Cast Bar", 70, { castBarIconSize = 22, castBarBorderSize = 8, castBarFontSize = 12, + castBarFontOutline = false, castBarTexture = "Smooth", castBarIconStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp", castBarBorderStyle = "Gladdy Tooltip round", @@ -115,7 +116,7 @@ function Castbar:CreateFrame(unit) end castBar.spellText = castBar:CreateFontString(nil, "LOW") - castBar.spellText:SetFont(Gladdy:SMFetch("font", "auraFont"), Gladdy.db.castBarFontSize) + castBar.spellText:SetFont(Gladdy:SMFetch("font", "auraFont"), Gladdy.db.castBarFontSize, Gladdy.db.castBarFontOutline and "OUTLINE") castBar.spellText:SetTextColor(Gladdy:SetColor(Gladdy.db.castBarFontColor)) castBar.spellText:SetShadowOffset(1, -1) castBar.spellText:SetShadowColor(0, 0, 0, 1) @@ -123,7 +124,7 @@ function Castbar:CreateFrame(unit) castBar.spellText:SetPoint("LEFT", 7, 0) -- Text of the spell castBar.timeText = castBar:CreateFontString(nil, "LOW") - castBar.timeText:SetFont(Gladdy:SMFetch("font", "auraFont"), Gladdy.db.castBarFontSize) + castBar.timeText:SetFont(Gladdy:SMFetch("font", "auraFont"), Gladdy.db.castBarFontSize, Gladdy.db.castBarFontOutline and "OUTLINE") castBar.timeText:SetTextColor(Gladdy:SetColor(Gladdy.db.castBarFontColor)) castBar.timeText:SetShadowOffset(1, -1) castBar.timeText:SetShadowColor(0, 0, 0, 1) @@ -203,10 +204,10 @@ function Castbar:UpdateFrame(unit) Gladdy:SetPosition(castBar, unit, "castBarXOffset", "castBarYOffset", Castbar:LegacySetPosition(castBar, unit, leftMargin, rightMargin), Castbar) - castBar.spellText:SetFont(Gladdy:SMFetch("font", "castBarFont"), Gladdy.db.castBarFontSize) + castBar.spellText:SetFont(Gladdy:SMFetch("font", "castBarFont"), Gladdy.db.castBarFontSize, Gladdy.db.castBarFontOutline and "OUTLINE") castBar.spellText:SetTextColor(Gladdy:SetColor(Gladdy.db.castBarFontColor)) - castBar.timeText:SetFont(Gladdy:SMFetch("font", "castBarFont"), Gladdy.db.castBarFontSize) + castBar.timeText:SetFont(Gladdy:SMFetch("font", "castBarFont"), Gladdy.db.castBarFontSize, Gladdy.db.castBarFontOutline and "OUTLINE") castBar.timeText:SetTextColor(Gladdy:SetColor(Gladdy.db.castBarFontColor)) castBar.icon.texture.overlay:SetTexture(Gladdy.db.castBarIconStyle) @@ -785,6 +786,12 @@ function Castbar:GetOptions() max = 20, width = "full", }), + castBarFontOutline = option({ + type = "toggle", + name = L["Outline"], + order = 5, + width = "full", + }), headerFormat = { type = "header", name = L["Format"], -- 2.39.5 From 7d77054a7b355f6c55b39694bde79db89b6a8434 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 22:33:27 +0100 Subject: [PATCH 121/227] update readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4c269b9..b2fa01b 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ The goal is to make Gladdy highly configurable in it's appearance. Everything ca - **Range Check** (checks the range to a unit by a configurable spell) - **Shadowsight Timer** (shows a little movable frame with time left until Shadow Eyes spawn) - **TotemPlates** (show totem icons instead of normal nameplates, compatible with **Plater, NeatPlates, KUI, ThreatPlates, ElvUI, TukUI**) +- **TotemPulse** (shows pulse on TotemPlate icon or beneath nameplate) - **Trinket** (tracks trinket usage) - **VersionCheck** (checks if you use an older version that your teammate) - **XiconProfiles** (predefined profiles to start your configuration from) @@ -106,6 +107,7 @@ Thank you! - added some auras (e.g. disarm) - added disarm DRs - improved some class icons +- added font OUTLINE option for Health-/Power-/CastBar texts - fixed health bug since 2.5.4 - updated Mir Profile -- 2.39.5 From 2720e25cea522d13014e9d2d8cc349fc09449870 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 25 Mar 2022 22:34:04 +0100 Subject: [PATCH 122/227] fix ArenaCooldown not showing --- Modules/ArenaCountDown.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/ArenaCountDown.lua b/Modules/ArenaCountDown.lua index 4f7e5df..a8dfb51 100644 --- a/Modules/ArenaCountDown.lua +++ b/Modules/ArenaCountDown.lua @@ -70,7 +70,7 @@ end function ACDFrame.OnUpdate(self, elapse) if (self.countdown > 0 and Gladdy.db.countdown) then self.hidden = false; - + self.ACDNumFrame:Show() if ((floor(self.countdown) ~= floor(self.countdown - elapse)) and (floor(self.countdown - elapse) >= 0)) then local str = tostring(floor(self.countdown - elapse)); @@ -109,7 +109,6 @@ end function ACDFrame:JOINED_ARENA() if Gladdy.db.countdown then - self.ACDNumFrame:Show() self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL") self:SetScript("OnEvent", ACDFrame.OnEvent) self.endTime = GetTime() + 70 -- 2.39.5 From cb6de72b93ec436508efd83bc625800227c35ecc Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 26 Mar 2022 00:11:34 +0100 Subject: [PATCH 123/227] version string trailing zeros --- Gladdy.lua | 6 +++--- Modules/VersionCheck.lua | 14 +++++++------- Options.lua | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Gladdy.lua b/Gladdy.lua index 0270772..5c4f93a 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -17,7 +17,7 @@ local IsActiveBattlefieldArena = IsActiveBattlefieldArena local IsInInstance = IsInInstance local GetNumArenaOpponents = GetNumArenaOpponents local RELEASE_TYPES = { alpha = "Alpha", beta = "Beta", release = "Release"} -local PREFIX = "TBC-Classic_v" +local PREFIX = "Gladdy v" local VERSION_REGEX = PREFIX .. "(%d+%.%d+)%-(%a)" local LibStub = LibStub @@ -27,14 +27,14 @@ local LibStub = LibStub --------------------------- -local MAJOR, MINOR = "Gladdy", 5 +local MAJOR, MINOR = "Gladdy", 6 local Gladdy = LibStub:NewLibrary(MAJOR, MINOR) local L Gladdy.version_major_num = 2 Gladdy.version_minor_num = 0.10 Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num Gladdy.version_releaseType = RELEASE_TYPES.release -Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType +Gladdy.version = PREFIX .. string.format("%.2f", Gladdy.version_num) .. "-" .. Gladdy.version_releaseType Gladdy.VERSION_REGEX = VERSION_REGEX Gladdy.debug = false diff --git a/Modules/VersionCheck.lua b/Modules/VersionCheck.lua index 9bbe922..c86c465 100644 --- a/Modules/VersionCheck.lua +++ b/Modules/VersionCheck.lua @@ -1,4 +1,4 @@ -local tonumber, tostring = tonumber, tostring +local tonumber, tostring, str_format = tonumber, tostring, string.format local UnitName = UnitName local IsInGroup, IsInRaid = IsInGroup, IsInRaid @@ -24,11 +24,11 @@ end function VersionCheck:JOINED_ARENA() self:RegisterComm("GladdyVCheck", VersionCheck.OnCommReceived) if IsInRaid(LE_PARTY_CATEGORY_HOME) then - self:SendCommMessage("GladdyVCheck", tostring(Gladdy.version_num), "RAID", self.playerName) + self:SendCommMessage("GladdyVCheck", str_format("%.2f", Gladdy.version_num), "RAID", self.playerName) elseif IsInGroup(LE_PARTY_CATEGORY_INSTANCE) or IsInRaid(LE_PARTY_CATEGORY_INSTANCE) then - self:SendCommMessage("GladdyVCheck", tostring(Gladdy.version_num), "INSTANCE_CHAT", self.playerName) + self:SendCommMessage("GladdyVCheck", str_format("%.2f", Gladdy.version_num), "INSTANCE_CHAT", self.playerName) elseif IsInGroup(LE_PARTY_CATEGORY_HOME) then - self:SendCommMessage("GladdyVCheck", tostring(Gladdy.version_num), "PARTY", self.playerName) + self:SendCommMessage("GladdyVCheck", str_format("%.2f", Gladdy.version_num), "PARTY", self.playerName) end end @@ -41,9 +41,9 @@ end function VersionCheck.OnCommReceived(prefix, message, distribution, sender) if sender ~= VersionCheck.playerName then - local addonVersion = Gladdy.version_num - message = tonumber(message) - if message and message <= Gladdy.version_num then + local addonVersion = str_format("%.2f", Gladdy.version_num) + local message_num = tonumber(message) or 0 + if message and message_num <= Gladdy.version_num then --Gladdy:Print("Version", "\"".. addonVersion.."\"", "is up to date") else Gladdy:Warn("Current version", "\"".. addonVersion.."\"", "is outdated. Most recent version is", "\"".. message.."\"") diff --git a/Options.lua b/Options.lua index 78f78e1..5268dc6 100644 --- a/Options.lua +++ b/Options.lua @@ -1,5 +1,5 @@ local type, pairs, tinsert, tsort = type, pairs, table.insert, table.sort -local tostring, str_match, tonumber, string_format = tostring, string.match, tonumber, string.format +local tostring, str_match, tonumber, str_format = tostring, string.match, tonumber, string.format local ceil, floor = ceil, floor local ReloadUI = ReloadUI @@ -31,7 +31,7 @@ function Gladdy:FormatTimer(fontString, timeLeft, milibreakpoint, showSeconds) else if time >= 60 then if showSeconds then - fontString:SetText(floor(timeLeft / 60) .. ":" .. string_format("%02.f", floor(timeLeft - floor(timeLeft / 60) * 60))) + fontString:SetText(floor(timeLeft / 60) .. ":" .. str_format("%02.f", floor(timeLeft - floor(timeLeft / 60) * 60))) else fontString:SetText(ceil(ceil(time / 60)) .. "m") end @@ -279,7 +279,7 @@ function Gladdy:SetupOptions() order = 5, width = 1, type = "description", - name = " Gladdy v" .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType + name = " " .. Gladdy.version }, general = { type = "group", -- 2.39.5 From 80eee574a90c7c1178e4d1d5d4f0a038eb254c61 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 26 Mar 2022 00:16:13 +0100 Subject: [PATCH 124/227] cleanup ArenaCountDown --- Modules/ArenaCountDown.lua | 64 ++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/Modules/ArenaCountDown.lua b/Modules/ArenaCountDown.lua index a8dfb51..0902f51 100644 --- a/Modules/ArenaCountDown.lua +++ b/Modules/ArenaCountDown.lua @@ -22,30 +22,30 @@ function ACDFrame:Initialize() self.texturePath = "Interface\\AddOns\\Gladdy\\Images\\Countdown\\"; local ACDNumFrame = CreateFrame("Frame", "ACDNumFrame", UIParent) - ACDNumFrame:EnableMouse(false) - ACDNumFrame:SetHeight(512) - ACDNumFrame:SetWidth(512) - ACDNumFrame:SetPoint("CENTER", 0, 256) - ACDNumFrame:Hide() self.ACDNumFrame = ACDNumFrame + self.ACDNumFrame:EnableMouse(false) + self.ACDNumFrame:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumFrame:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumFrame:SetPoint("CENTER", 0, 128) + self.ACDNumFrame:Hide() local ACDNumTens = ACDNumFrame:CreateTexture("ACDNumTens", "HIGH") - ACDNumTens:SetWidth(256) - ACDNumTens:SetHeight(256) - ACDNumTens:SetPoint("CENTER", ACDNumFrame, "CENTER", -50, 0) self.ACDNumTens = ACDNumTens + self.ACDNumTens:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumTens:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumTens:SetPoint("CENTER", self.ACDNumFrame, "CENTER", -(Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0) local ACDNumOnes = ACDNumFrame:CreateTexture("ACDNumOnes", "HIGH") - ACDNumOnes:SetWidth(256) - ACDNumOnes:SetHeight(256) - ACDNumOnes:SetPoint("CENTER", ACDNumFrame, "CENTER", 50, 0) self.ACDNumOnes = ACDNumOnes + self.ACDNumOnes:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumOnes:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumOnes:SetPoint("CENTER", self.ACDNumFrame, "CENTER", (Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0) local ACDNumOne = ACDNumFrame:CreateTexture("ACDNumOne", "HIGH") - ACDNumOne:SetWidth(256) - ACDNumOne:SetHeight(256) - ACDNumOne:SetPoint("CENTER", ACDNumFrame, "CENTER", 0, 0) self.ACDNumOne = ACDNumOne + self.ACDNumOne:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumOne:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumOne:SetPoint("CENTER", self.ACDNumFrame, "CENTER", 0, 0) if Gladdy.db.countdown then self:RegisterMessage("JOINED_ARENA") @@ -65,6 +65,22 @@ function ACDFrame:UpdateFrameOnce() end self.ACDNumFrame:SetFrameStrata(Gladdy.db.arenaCountdownFrameStrata) self.ACDNumFrame:SetFrameLevel(Gladdy.db.arenaCountdownFrameLevel) + + self.ACDNumFrame:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumFrame:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumFrame:SetPoint("CENTER", 0, 128) + + self.ACDNumTens:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumTens:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumTens:SetPoint("CENTER", self.ACDNumFrame, "CENTER", -(Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0) + + self.ACDNumOnes:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumOnes:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumOnes:SetPoint("CENTER", self.ACDNumFrame, "CENTER", (Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0) + + self.ACDNumOne:SetWidth(Gladdy.db.arenaCountdownSize) + self.ACDNumOne:SetHeight(Gladdy.db.arenaCountdownSize) + self.ACDNumOne:SetPoint("CENTER", self.ACDNumFrame, "CENTER", 0, 0) end function ACDFrame.OnUpdate(self, elapse) @@ -140,25 +156,7 @@ function ACDFrame:CHAT_MSG_BG_SYSTEM_NEUTRAL(msg) end end -function ACDFrame:UpdateFrame() - self.ACDNumFrame:SetHeight(Gladdy.db.arenaCountdownSize) - self.ACDNumFrame:SetWidth(Gladdy.db.arenaCountdownSize) - self.ACDNumFrame:SetPoint("CENTER", 0, 128) - - self.ACDNumTens:SetWidth(Gladdy.db.arenaCountdownSize) - self.ACDNumTens:SetHeight(Gladdy.db.arenaCountdownSize) - self.ACDNumTens:SetPoint("CENTER", self.ACDNumFrame, "CENTER", -(Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0) - - self.ACDNumOnes:SetWidth(Gladdy.db.arenaCountdownSize) - self.ACDNumOnes:SetHeight(Gladdy.db.arenaCountdownSize) - self.ACDNumOnes:SetPoint("CENTER", self.ACDNumFrame, "CENTER", (Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0) - - self.ACDNumOne:SetWidth(Gladdy.db.arenaCountdownSize) - self.ACDNumOne:SetHeight(Gladdy.db.arenaCountdownSize) - self.ACDNumOne:SetPoint("CENTER", self.ACDNumFrame, "CENTER", 0, 0) -end - -function ACDFrame:Test() +function ACDFrame:TestOnce() self.countdown = 30 self:JOINED_ARENA() end -- 2.39.5 From 9afc359b57d1edab4088e043307867fe26611301 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 26 Mar 2022 02:07:11 +0100 Subject: [PATCH 125/227] intercept cd adjusted --- Constants.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Constants.lua b/Constants.lua index eecf7f6..0dd133b 100644 --- a/Constants.lua +++ b/Constants.lua @@ -995,7 +995,7 @@ local cooldownList = { [18499] = 30, -- Berserker Rage --[2565] = 60, -- Shield Block [12292] = { cd = 180, spec = L["Arms"], }, -- Death Wish - [20252] = { cd = 30, [L["Arms"]] = 20 }, -- Intercept + [20252] = { cd = 25, [L["Arms"]] = 15 }, -- Intercept [12975] = { cd = 180, spec = L["Protection"], }, -- Last Stand [12809] = { cd = 30, spec = L["Protection"], }, -- Concussion Blow -- 2.39.5 From 6f50bc96eff2eace7c0c0f41bd2bb2d50b2b01bc Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 26 Mar 2022 18:21:58 +0100 Subject: [PATCH 126/227] Healthbar show nametext when custom tags enabled --- Modules/Healthbar.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index 4b05cc9..f611a42 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -210,7 +210,7 @@ function Healthbar:UpdateFrame(unit) healthBar.nameText:Hide() else healthBar.nameText:SetFont(Gladdy:SMFetch("font", "healthBarFont"), Gladdy.db.healthBarNameFontSize, Gladdy.db.healthTextLeftOutline and "OUTLINE") - if Gladdy.db.healthName then + if Gladdy.db.healthName or Gladdy.db.healthCustomTagsEnabled then healthBar.nameText:Show() else healthBar.nameText:Hide() -- 2.39.5 From 73a54b448964ef7052e9daf58cc860e3cbe81354 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 26 Mar 2022 18:22:21 +0100 Subject: [PATCH 127/227] detect spec before CD used --- EventListener.lua | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index e98ae44..fe2701e 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -73,6 +73,12 @@ function Gladdy:SpotEnemy(unit, auraScan) if ( not spellName ) then break end + if Gladdy.specBuffs[spellName] and unitCaster then -- Check for auras that detect a spec + local unitPet = string_gsub(unit, "%d$", "pet%1") + if UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster) then + EventListener:DetectSpec(unit, Gladdy.specBuffs[spellName]) + end + end if Gladdy.cooldownBuffs[spellName] and unitCaster then -- Check for auras that detect used CDs (like Fear Ward) for arenaUnit,v in pairs(self.buttons) do if (UnitIsUnit(arenaUnit, unitCaster)) then @@ -84,12 +90,6 @@ function Gladdy:SpotEnemy(unit, auraScan) if Gladdy.cooldownBuffs.racials[spellName] and Gladdy.cooldownBuffs.racials[spellName] then Gladdy:SendMessage("RACIAL_USED", unit, spellName, Gladdy.cooldownBuffs.racials[spellName].cd(expirationTime - GetTime()), spellName) end - if Gladdy.specBuffs[spellName] and unitCaster then -- Check for auras that detect a spec - local unitPet = string_gsub(unit, "%d$", "pet%1") - if UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster) then - EventListener:DetectSpec(unit, Gladdy.specBuffs[spellName]) - end - end end end end @@ -126,6 +126,12 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() if (not UnitExists(srcUnit)) then return end + if not Gladdy.buttons[srcUnit].class or not Gladdy.buttons[srcUnit].race then + Gladdy:SpotEnemy(srcUnit, true) + end + if not Gladdy.buttons[srcUnit].spec then + self:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) + end if (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_AURA_APPLIED") then local unitRace = Gladdy.buttons[srcUnit].race -- cooldown tracker @@ -147,13 +153,6 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() Gladdy:SendMessage("RACIAL_USED", srcUnit) end end - - if not Gladdy.buttons[srcUnit].class or not Gladdy.buttons[srcUnit].race then - Gladdy:SpotEnemy(srcUnit, true) - end - if not Gladdy.buttons[srcUnit].spec then - self:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) - end end end @@ -250,6 +249,12 @@ function EventListener:UNIT_AURA(unit) Gladdy:SendMessage("AURA_GAIN_LIMIT", unit, auraType, n - 1) break end + if not button.spec and Gladdy.specBuffs[spellName] and unitCaster then + local unitPet = string_gsub(unit, "%d$", "pet%1") + if unitCaster and (UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster)) then + self:DetectSpec(unit, Gladdy.specBuffs[spellName]) + end + end if Gladdy.cooldownBuffs[spellName] and unitCaster then -- Check for auras that hint used CDs (like Fear Ward) for arenaUnit,v in pairs(Gladdy.buttons) do if (UnitIsUnit(arenaUnit, unitCaster)) then @@ -260,12 +265,6 @@ function EventListener:UNIT_AURA(unit) if Gladdy.cooldownBuffs.racials[spellName] and Gladdy.cooldownBuffs.racials[spellName] then Gladdy:SendMessage("RACIAL_USED", unit, spellName, Gladdy.cooldownBuffs.racials[spellName].cd(expirationTime - GetTime()), spellName) end - if not button.spec and Gladdy.specBuffs[spellName] and unitCaster then - local unitPet = string_gsub(unit, "%d$", "pet%1") - if unitCaster and (UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster)) then - self:DetectSpec(unit, Gladdy.specBuffs[spellName]) - end - end if Gladdy.exceptionNames[spellID] then spellName = Gladdy.exceptionNames[spellID] end -- 2.39.5 From f1fde07e6c2e0ec786d91dd67fc007dec0ab63f8 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sat, 26 Mar 2022 18:22:42 +0100 Subject: [PATCH 128/227] optional dependencies nameplate addons added --- Gladdy.toc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gladdy.toc b/Gladdy.toc index 098d2c1..73dc6f7 100644 --- a/Gladdy.toc +++ b/Gladdy.toc @@ -5,7 +5,7 @@ ## Author: XiconQoo, DnB_Junkee, Knall ## X-Email: contact me on discord Knall#1751 ## SavedVariables: GladdyXZ -## OptionalDeps: SharedMedia, Blizzard_CombatLog, Blizzard_ArenaUI, Blizzard_CombatText +## OptionalDeps: SharedMedia, Blizzard_CombatLog, Blizzard_ArenaUI, Blizzard_CombatText, Plater, Kui_Nameplates, NeatPlates, TidyPlates_ThreatPlates, Tukui, ElvUI embeds.xml -- 2.39.5 From 29c3a7596cdba8a8cb5fb8fcb3320ae806a761f7 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 27 Mar 2022 18:50:02 +0200 Subject: [PATCH 129/227] - fix cooldowns not showing when spec detected - fix nature's swiftness cd starts when buff fades (shaman + druid) - change order (always detect spec before cd usage) --- Constants.lua | 6 ++++-- EventListener.lua | 27 +++++++++++++++++++-------- Modules/Cooldowns.lua | 14 ++++---------- 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/Constants.lua b/Constants.lua index 0dd133b..1132b0d 100644 --- a/Constants.lua +++ b/Constants.lua @@ -107,6 +107,7 @@ local specBuffs = { -- WARLOCK [GetSpellInfo(19028)] = L["Demonology"], -- Soul Link [GetSpellInfo(23759)] = L["Demonology"], -- Master Demonologist + [GetSpellInfo(35696)] = L["Demonology"], -- Demonic Knowledge [GetSpellInfo(30302)] = L["Destruction"], -- Nether Protection [GetSpellInfo(34935)] = L["Destruction"], -- Backlash @@ -125,7 +126,7 @@ local specSpells = { [GetSpellInfo(33983)] = L["Feral"], -- Mangle (Cat) [GetSpellInfo(33987)] = L["Feral"], -- Mangle (Bear) [GetSpellInfo(18562)] = L["Restoration"], -- Swiftmend - [GetSpellInfo(16188)] = L["Restoration"], -- Nature's Swiftness + [GetSpellInfo(17116)] = L["Restoration"], -- Nature's Swiftness [GetSpellInfo(33891)] = L["Restoration"], -- Tree of Life -- HUNTER @@ -182,7 +183,7 @@ local specSpells = { [GetSpellInfo(17364)] = L["Enhancement"], -- Stormstrike [GetSpellInfo(16190)] = L["Restoration"], -- Mana Tide Totem [GetSpellInfo(32594)] = L["Restoration"], -- Earth Shield - --[GetSpellInfo(16188)] = L["Restoration"], -- Nature's Swiftness + [GetSpellInfo(16188)] = L["Restoration"], -- Nature's Swiftness -- WARLOCK [GetSpellInfo(30405)] = L["Affliction"], -- Unstable Affliction @@ -190,6 +191,7 @@ local specSpells = { --[GetSpellInfo(30911)] = L["Affliction"], -- Siphon Life [GetSpellInfo(30414)] = L["Destruction"], -- Shadowfury [GetSpellInfo(30912)] = L["Destruction"], -- Conflagrate + [GetSpellInfo(18708)] = L["Demonology"], -- Fel Domination -- WARRIOR [GetSpellInfo(30330)] = L["Arms"], -- Mortal Strike diff --git a/EventListener.lua b/EventListener.lua index fe2701e..8db9ddc 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -57,13 +57,15 @@ function Gladdy:SpotEnemy(unit, auraScan) if not unit or not button then return end - button.raceLoc = UnitRace(unit) - button.race = select(2, UnitRace(unit)) - button.classLoc = select(1, UnitClass(unit)) - button.class = select(2, UnitClass(unit)) - button.name = UnitName(unit) button.stealthed = false - Gladdy.guids[UnitGUID(unit)] = unit + if UnitExists(unit) then + button.raceLoc = UnitRace(unit) + button.race = select(2, UnitRace(unit)) + button.classLoc = select(1, UnitClass(unit)) + button.class = select(2, UnitClass(unit)) + button.name = UnitName(unit) + Gladdy.guids[UnitGUID(unit)] = unit + end if button.class and button.race then Gladdy:SendMessage("ENEMY_SPOTTED", unit) end @@ -138,14 +140,19 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() if Gladdy.db.cooldown and Cooldowns.cooldownSpellIds[spellName] then local unitClass local spellId = Cooldowns.cooldownSpellIds[spellName] -- don't use spellId from combatlog, in case of different spellrank + if spellID == 16188 or spellID == 17116 then -- Nature's Swiftness (same name for druid and shaman) + spellId = spellID + end if Gladdy.db.cooldownCooldowns[tostring(spellId)] then if (Gladdy:GetCooldownList()[Gladdy.buttons[srcUnit].class][spellId]) then unitClass = Gladdy.buttons[srcUnit].class else unitClass = Gladdy.buttons[srcUnit].race end - Cooldowns:CooldownUsed(srcUnit, unitClass, spellId) self:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) + if spellID ~= 16188 and spellID ~= 17116 then -- Nature's Swiftness CD starts when buff fades + Cooldowns:CooldownUsed(srcUnit, unitClass, spellId) + end end end @@ -153,6 +160,9 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() Gladdy:SendMessage("RACIAL_USED", srcUnit) end end + if (eventType == "SPELL_AURA_REMOVED" and (spellID ~= 16188 or spellID ~= 17116) and Gladdy.buttons[srcUnit].class) then + Cooldowns:CooldownUsed(srcUnit, Gladdy.buttons[srcUnit].class, spellID) + end end end @@ -333,8 +343,9 @@ end function EventListener:Test(unit) local button = Gladdy.buttons[unit] - if (Gladdy.testData[unit].testSpec) then + if (button and Gladdy.testData[unit].testSpec) then button.spec = nil + Gladdy:SpotEnemy(unit, false) self:DetectSpec(unit, button.testSpec) end end diff --git a/Modules/Cooldowns.lua b/Modules/Cooldowns.lua index e915321..c07e7d3 100644 --- a/Modules/Cooldowns.lua +++ b/Modules/Cooldowns.lua @@ -91,7 +91,7 @@ function Cooldowns:Initialize() end end self:RegisterMessage("ENEMY_SPOTTED") - self:RegisterMessage("SPEC_DETECTED") + self:RegisterMessage("UNIT_SPEC") self:RegisterMessage("UNIT_DEATH") self:RegisterMessage("UNIT_DESTROYED") end @@ -299,21 +299,14 @@ end function Cooldowns:Test(unit) if Gladdy.frame.testing then - local button = Gladdy.buttons[unit] - if Gladdy.db.cooldown then - button.spellCooldownFrame:Show() - else - button.spellCooldownFrame:Hide() - end self:UpdateTestCooldowns(unit) end end function Cooldowns:UpdateTestCooldowns(unit) local button = Gladdy.buttons[unit] - self:UpdateCooldowns(button) - local orderedIcons = {} + for _,icon in pairs(button.spellCooldownFrame.icons) do tinsert(orderedIcons, icon) end @@ -337,7 +330,7 @@ function Cooldowns:ENEMY_SPOTTED(unit) self:UpdateCooldowns(Gladdy.buttons[unit]) end -function Cooldowns:SPEC_DETECTED(unit) +function Cooldowns:UNIT_SPEC(unit) if (not Gladdy.buttons[unit]) then return end @@ -854,6 +847,7 @@ function Cooldowns:GetCooldownOptions() Gladdy.db.cooldownCooldowns[tostring(spellId)] = value for unit in pairs(Gladdy.buttons) do Cooldowns:ResetUnit(unit) + Cooldowns:UpdateCooldowns(Gladdy.buttons[unit]) Cooldowns:Test(unit) end Gladdy:UpdateFrame() -- 2.39.5 From 96c42b15221162fc9c89b30b039163f6942e58a2 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 27 Mar 2022 18:50:46 +0200 Subject: [PATCH 130/227] fix totempulse bar background not showing --- Modules/TotemPulse.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/TotemPulse.lua b/Modules/TotemPulse.lua index cd2fd2d..ff511e4 100644 --- a/Modules/TotemPulse.lua +++ b/Modules/TotemPulse.lua @@ -313,7 +313,7 @@ function TotemPulse:CreateCooldownFrame(style) totemTick.spark.position = 0 totemTick.spark:SetRotation(style == "Vertical" and ninetyDegreeInRad or 0) - totemTick.bg = totemTick.bar:CreateTexture(nil, "BACKGROUND") + totemTick.bg = totemTick:CreateTexture(nil, "ARTWORK") totemTick.bg:SetTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) totemTick.bg:SetAllPoints(totemTick.bar) totemTick.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBgColor)) @@ -461,7 +461,6 @@ function TotemPulse:UpdateBar(bar) bar.bar:SetStatusBarTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) bar.bar:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.totemPulseBarColor)) - bar.bar:SetAllPoints(bar) bar.bg:SetTexture(Gladdy:SMFetch("statusbar", "totemPulseBarTexture")) bar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.totemPulseBarBgColor)) -- 2.39.5 From 02e9b2e41a86ce4f7019d285f2efbdd84a5a3a29 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 27 Mar 2022 18:51:04 +0200 Subject: [PATCH 131/227] add diminish group option --- Modules/Diminishings.lua | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/Modules/Diminishings.lua b/Modules/Diminishings.lua index 32337ef..ec9fa76 100644 --- a/Modules/Diminishings.lua +++ b/Modules/Diminishings.lua @@ -1,5 +1,6 @@ local select = select local pairs,ipairs,tbl_sort,tinsert,format,rand = pairs,ipairs,table.sort,tinsert,format,math.random +local str_gsub = string.gsub local GetSpellInfo = GetSpellInfo local CreateFrame = CreateFrame @@ -55,6 +56,8 @@ local Diminishings = Gladdy:NewModule("Diminishings", nil, { drDuration = 18, drFrameStrata = "MEDIUM", drFrameLevel = 3, + drGroup = false, + drGroupDirection = "DOWN" }) local function getDiminishColor(dr) @@ -187,6 +190,22 @@ function Diminishings:UpdateFrame(unit) Gladdy:SetPosition(drFrame, unit, "drXOffset", "drYOffset", Diminishings:LegacySetPosition(drFrame, unit), Diminishings) + if (Gladdy.db.drGroup) then + if (unit ~= "arena1") then + local previousUnit = "arena" .. str_gsub(unit, "arena", "") - 1 + self.frames[unit]:ClearAllPoints() + if Gladdy.db.classIconGroupDirection == "RIGHT" then + self.frames[unit]:SetPoint("LEFT", self.frames[previousUnit], "RIGHT", 0, 0) + elseif Gladdy.db.classIconGroupDirection == "LEFT" then + self.frames[unit]:SetPoint("RIGHT", self.frames[previousUnit], "LEFT", 0, 0) + elseif Gladdy.db.classIconGroupDirection == "UP" then + self.frames[unit]:SetPoint("BOTTOM", self.frames[previousUnit], "TOP", 0, 0) + elseif Gladdy.db.classIconGroupDirection == "DOWN" then + self.frames[unit]:SetPoint("TOP", self.frames[previousUnit], "BOTTOM", 0, 0) + end + end + end + if (unit == "arena1") then Gladdy:CreateMover(drFrame,"drXOffset", "drYOffset", L["Diminishings"], Gladdy.db.drGrowDirection == "RIGHT" and {"TOPLEFT", "TOPLEFT"} or {"TOPRIGHT", "TOPRIGHT"}, @@ -439,6 +458,26 @@ function Diminishings:GetOptions() max = 20, step = .1, }), + drGroup = Gladdy:option({ + type = "toggle", + name = L["Group"] .. " " .. L["Class Icon"], + order = 5, + disabled = function() return not Gladdy.db.drEnabled end, + }), + drGroupDirection = Gladdy:option({ + type = "select", + name = L["Group direction"], + order = 6, + values = { + ["RIGHT"] = L["Right"], + ["LEFT"] = L["Left"], + ["UP"] = L["Up"], + ["DOWN"] = L["Down"], + }, + disabled = function() + return not Gladdy.db.drGroup or not Gladdy.db.drEnabled + end, + }), group = { type = "group", childGroups = "tree", -- 2.39.5 From dbaaccd3ecf5bce3255ed0bd70f11af0b66f4393 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 27 Mar 2022 20:49:02 +0200 Subject: [PATCH 132/227] fix cooldowns out of stealth --- EventListener.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 8db9ddc..820f181 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -160,7 +160,7 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() Gladdy:SendMessage("RACIAL_USED", srcUnit) end end - if (eventType == "SPELL_AURA_REMOVED" and (spellID ~= 16188 or spellID ~= 17116) and Gladdy.buttons[srcUnit].class) then + if (eventType == "SPELL_AURA_REMOVED" and (spellID == 16188 or spellID == 17116) and Gladdy.buttons[srcUnit].class) then Cooldowns:CooldownUsed(srcUnit, Gladdy.buttons[srcUnit].class, spellID) end end @@ -226,11 +226,14 @@ Gladdy.cooldownBuffs = { return expTime end, spellId = 6346 }, -- Fear Ward [GetSpellInfo(11305)] = { cd = function(expTime) -- 15s uptime - return 180 - (15 - expTime) + return 300 - (15 - expTime) end, spellId = 11305 }, -- Sprint - [GetSpellInfo(36554)] = { cd = function(expTime) -- 3s uptime + [36554] = { cd = function(expTime) -- 3s uptime return 30 - (3 - expTime) - end, spellId = 36554 }, -- Shadowstep + end, spellId = 36554 }, -- Shadowstep speed buff + [36563] = { cd = function(expTime) -- 10s uptime + return 30 - (10 - expTime) + end, spellId = 36554 }, -- Shadowstep dmg buff [GetSpellInfo(26889)] = { cd = function(expTime) -- 3s uptime return 180 - (10 - expTime) end, spellId = 26889 }, -- Vanish @@ -265,10 +268,11 @@ function EventListener:UNIT_AURA(unit) self:DetectSpec(unit, Gladdy.specBuffs[spellName]) end end - if Gladdy.cooldownBuffs[spellName] and unitCaster then -- Check for auras that hint used CDs (like Fear Ward) + if (Gladdy.cooldownBuffs[spellName] or Gladdy.cooldownBuffs[spellID]) and unitCaster then -- Check for auras that hint used CDs (like Fear Ward) + local cooldownBuff = Gladdy.cooldownBuffs[spellID] or Gladdy.cooldownBuffs[spellName] for arenaUnit,v in pairs(Gladdy.buttons) do if (UnitIsUnit(arenaUnit, unitCaster)) then - Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, Gladdy.cooldownBuffs[spellName].cd(expirationTime - GetTime())) + Cooldowns:CooldownUsed(arenaUnit, v.class, cooldownBuff.spellId, cooldownBuff.cd(expirationTime - GetTime())) end end end -- 2.39.5 From 764c8a971b03b9b3865d6ecd4a1dfba94f813e04 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 27 Mar 2022 20:51:07 +0200 Subject: [PATCH 133/227] fix poison/disease cleansing pulse timer --- Constants.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Constants.lua b/Constants.lua index 1132b0d..31589a3 100644 --- a/Constants.lua +++ b/Constants.lua @@ -1332,8 +1332,8 @@ local totemData = { [string_lower("Frost Resistance Totem")] = {id = 8181,texture = select(3, GetSpellInfo(8181)), color = {r = 0, g = 0, b = 0, a = 1}}, -- Water [string_lower("Fire Resistance Totem")] = {id = 8184,texture = select(3, GetSpellInfo(8184)), color = {r = 0, g = 0, b = 0, a = 1}}, - [string_lower("Poison Cleansing Totem")] = {id = 8166,texture = select(3, GetSpellInfo(8166)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 4}, - [string_lower("Disease Cleansing Totem")] = {id = 8170,texture = select(3, GetSpellInfo(8170)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 4}, + [string_lower("Poison Cleansing Totem")] = {id = 8166,texture = select(3, GetSpellInfo(8166)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 5}, + [string_lower("Disease Cleansing Totem")] = {id = 8170,texture = select(3, GetSpellInfo(8170)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 5}, [string_lower("Healing Stream Totem")] = {id = 5394,texture = select(3, GetSpellInfo(5394)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, [string_lower("Mana Tide Totem")] = {id = 16190,texture = select(3, GetSpellInfo(16190)), color = {r = 0.078, g = 0.9, b = 0.16, a = 1}}, [string_lower("Mana Spring Totem")] = {id = 5675,texture = select(3, GetSpellInfo(5675)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2}, -- 2.39.5 From eaf7c6a5176738bb743b615666643a648a29a6f4 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 27 Mar 2022 20:51:28 +0200 Subject: [PATCH 134/227] remove Test from ClassIcon --- Modules/Classicon.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Modules/Classicon.lua b/Modules/Classicon.lua index abaa060..db4c792 100644 --- a/Modules/Classicon.lua +++ b/Modules/Classicon.lua @@ -191,10 +191,6 @@ function Classicon:UNIT_SPEC(unit, spec) classIcon.texture:SetTexture(specIcons[Gladdy.buttons[unit].class][spec]) end -function Classicon:Test(unit) - self:ENEMY_SPOTTED(unit) -end - function Classicon:ResetUnit(unit) local classIcon = self.frames[unit] if (not classIcon) then -- 2.39.5 From b8e75b68043975018d5094a09035cb930f6711a8 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 27 Mar 2022 20:53:28 +0200 Subject: [PATCH 135/227] - health bar new option classcolored / customcolor / custom currentvalue gradient option added - move stealth from rangecheck to healthbar - custom stealth color added - powerbar fix eventhandling --- Modules/Healthbar.lua | 165 ++++++++++++++++++++++++++++++++++++----- Modules/Powerbar.lua | 14 ++-- Modules/RangeCheck.lua | 52 ++----------- Options.lua | 7 +- 4 files changed, 165 insertions(+), 73 deletions(-) diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index f611a42..7889f66 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -1,5 +1,5 @@ local pairs, ipairs = pairs, ipairs -local floor = math.floor +local floor, abs = math.floor, math.abs local str_find, str_gsub, str_sub, tinsert = string.find, string.gsub, string.sub, table.insert local UnitHealth, UnitHealthMax, UnitName, UnitExists, UnitIsDeadOrGhost = UnitHealth, UnitHealthMax, UnitName, UnitExists, UnitIsDeadOrGhost @@ -17,6 +17,15 @@ local Healthbar = Gladdy:NewModule("Health Bar", 100, { healthBarBorderSize = 9, healthBarBorderColor = { r = 0, g = 0, b = 0, a = 1 }, healthBarBgColor = { r = 0, g = 0, b = 0, a = 0.4 }, + healthBarClassColored = true, + healthBarColoredByCurrentHp = false, + healthBarStatusBarColorMax = { r = 0, g = 1, b = 0, a = 1 }, + healthBarStatusBarColorMid = { r = 1, g = 1, b = 0, a = 1 }, + healthBarStatusBarColorMin = { r = 1, g = 0, b = 0, a = 1 }, + healthFrameStrata = "MEDIUM", + healthFrameLevel = 1, + healthBarStealthColor = { r = 0.66, g = 0.66, b = 0.66, a = 1 }, + --font healthBarFontColor = { r = 1, g = 1, b = 1, a = 1 }, healthBarNameFontSize = 12, healthBarHealthFontSize = 12, @@ -25,8 +34,6 @@ local Healthbar = Gladdy:NewModule("Health Bar", 100, { healthActual = false, healthMax = true, healthPercentage = true, - healthFrameStrata = "MEDIUM", - healthFrameLevel = 1, healthCustomTagsEnabled = false, healthTextLeft = "[name]", healthTextRight = "[percent|status]", @@ -42,6 +49,7 @@ function Healthbar:Initialize() self.frames = {} self:RegisterMessage("JOINED_ARENA") self:RegisterMessage("ENEMY_SPOTTED") + self:RegisterMessage("ENEMY_STEALTH") self:RegisterMessage("UNIT_SPEC") self:RegisterMessage("UNIT_DESTROYED") self:RegisterMessage("UNIT_DEATH") @@ -123,7 +131,7 @@ function Healthbar.OnEvent(self, event, unit) self.hp.current = health self.hp.max = healthMax Healthbar:SetText(unit, health, healthMax) - --Healthbar:SetHealthText(self, health, healthMax) + Healthbar:SetHealthStatusBarColor(unit, self.hp.current, self.hp.max) elseif event == "UNIT_NAME_UPDATE" then local name = UnitName(unit) Gladdy.buttons[unit].name = name @@ -134,6 +142,67 @@ function Healthbar.OnEvent(self, event, unit) end end +local function getGradient(start, ending, percentage, factor) + return start * abs(-2 * percentage + 1) + ending * factor +end + +-- /run LibStub("Gladdy").modules["Health Bar"]:SetHealthStatusBarColor("arena1", 51, 100) +local rMax, gMax, bMax, rMid, gMid, bMid, rMin, gMin, bMin, rNow, gNow, bNow, percentage, factor, stealthAlpha +function Healthbar:SetHealthStatusBarColor(unit, health, healthMax) + local button = Gladdy.buttons[unit] + if not button or not health or not healthMax then + return + end + + local healthBar = Gladdy.buttons[unit].healthBar + if not healthBar.hp.oorFactor then + healthBar.hp.oorFactor = 1 + end + + healthBar.hp:SetMinMaxValues(0, healthMax) + healthBar.hp:SetValue(health) + + if healthBar.hp.stealth then + stealthAlpha = Gladdy.db.healthBarStealthColor.a < Gladdy.db.healthBarBgColor.a and Gladdy.db.healthBarStealthColor.a or Gladdy.db.healthBarBgColor.a + healthBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.healthBarBgColor, nil, stealthAlpha)) + healthBar.hp:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.healthBarStealthColor)) + return + else + healthBar.bg:SetVertexColor(Gladdy:SetColor(Gladdy.db.healthBarBgColor)) + end + + if not Gladdy.db.healthBarClassColored then + if Gladdy.db.healthBarColoredByCurrentHp then + rMax, gMax, bMax = Gladdy:SetColor(Gladdy.db.healthBarStatusBarColorMax) + rMid, gMid, bMid = Gladdy:SetColor(Gladdy.db.healthBarStatusBarColorMid) + rMin, gMin, bMin = Gladdy:SetColor(Gladdy.db.healthBarStatusBarColorMin) + percentage = health / healthMax + if percentage == 0.5 then + rNow, gNow, bNow = Gladdy:SetColor(Gladdy.db.healthBarStatusBarColorMid, healthBar.hp.oorFactor) + elseif percentage < 0.5 then + factor = percentage * 2 + rNow = getGradient(rMin, rMid, percentage, factor) + gNow = getGradient(gMin, gMid, percentage, factor) + bNow = getGradient(bMin, bMid, percentage, factor) + elseif percentage > 0.5 then + factor = ((healthMax - health) / healthMax) * 2 + rNow = getGradient(rMax, rMid, percentage, factor) + gNow = getGradient(gMax, gMid, percentage, factor) + bNow = getGradient(bMax, bMid, percentage, factor) + end + healthBar.hp:SetStatusBarColor(rNow / healthBar.hp.oorFactor, gNow / healthBar.hp.oorFactor, bNow / healthBar.hp.oorFactor, 1) + else + healthBar.hp:SetStatusBarColor(Gladdy:SetColor(Gladdy.db.healthBarStatusBarColorMax, healthBar.hp.oorFactor)) + end + end + if button.class and Gladdy.db.healthBarClassColored then + healthBar.hp:SetStatusBarColor( + RAID_CLASS_COLORS[button.class].r / healthBar.hp.oorFactor, + RAID_CLASS_COLORS[button.class].g / healthBar.hp.oorFactor, + RAID_CLASS_COLORS[button.class].b / healthBar.hp.oorFactor, 1) + end +end + function Healthbar:SetHealthText(healthBar, health, healthMax) local healthText = "" local healthPercentage = health and healthMax and floor(health * 100 / healthMax) @@ -220,6 +289,8 @@ function Healthbar:UpdateFrame(unit) healthBar.healthText:SetTextColor(Gladdy:SetColor(Gladdy.db.healthBarFontColor)) healthBar.nameText:SetPoint("LEFT", Gladdy.db.healthTextLeftHOffset, Gladdy.db.healthTextLeftVOffset) healthBar.healthText:SetPoint("RIGHT", Gladdy.db.healthTextRightHOffset, Gladdy.db.healthTextRightVOffset) + + Healthbar:SetHealthStatusBarColor(unit, healthBar.hp.current, healthBar.hp.max) end function Healthbar:ResetUnit(unit) @@ -232,7 +303,8 @@ function Healthbar:ResetUnit(unit) healthBar.nameText:SetText("") healthBar.healthText:SetText("") healthBar.hp:SetValue(0) - healthBar.hp.current = 0 + healthBar.hp.current = nil + healthBar.hp.max = nil end function Healthbar:Test(unit) @@ -242,7 +314,6 @@ function Healthbar:Test(unit) return end - --self:JOINED_ARENA() Gladdy:SendMessage("UNIT_HEALTH", unit, button.health, button.healthMax) healthBar.hp.current = button.health healthBar.hp.max = button.healthMax @@ -251,7 +322,6 @@ function Healthbar:Test(unit) healthBar.hp:SetValue(button.health) if unit == "arena1" then self:UNIT_DEATH(unit) - --self:SetText(unit, button.health, button.healthMax, L["DEAD"]) end end @@ -266,7 +336,8 @@ end function Healthbar:JOINED_ARENA() for i=1,Gladdy.curBracket do - self:SetText("arena" .. i, nil, nil) + local unit = "arena" .. i + self:SetText(unit, self.frames[unit].hp.current, self.frames[unit].hp.max) end end @@ -284,13 +355,21 @@ function Healthbar:ENEMY_SPOTTED(unit) healthBar.hp:SetValue(health) healthBar.hp.current = health healthBar.hp.max = healthMax - Healthbar:SetText(unit, health, healthMax) - --Healthbar:SetHealthText(healthBar, health, healthMax) + end + Healthbar:SetText(unit, healthBar.hp.current, healthBar.hp.max) + Healthbar:SetHealthStatusBarColor(unit, healthBar.hp.current, healthBar.hp.max) +end + +function Healthbar:ENEMY_STEALTH(unit, stealth) + local healthBar = self.frames[unit] + local button = Gladdy.buttons[unit] + if (not healthBar or not button) then + return end - if button.class then - healthBar.hp:SetStatusBarColor(RAID_CLASS_COLORS[button.class].r, RAID_CLASS_COLORS[button.class].g, RAID_CLASS_COLORS[button.class].b, 1) - end + healthBar.hp.stealth = stealth + + Healthbar:SetHealthStatusBarColor(unit, healthBar.hp.current, healthBar.hp.max) end function Healthbar:UNIT_DEATH(unit) @@ -394,10 +473,62 @@ function Healthbar:GetOptions() }), }, }, + barColor = { + type = "group", + name = L["Bar Color"], + order = 2, + args = { + headerAuras = { + type = "header", + name = L["Color"], + order = 1, + }, + healthBarClassColored = Gladdy:option({ + type = "toggle", + name = L["Class colored health bar"], + order = 2, + width = "full", + }), + healthBarStealthColor = Gladdy:colorOption({ + type = "color", + name = L["Stealth Color"], + order = 3, + hasAlpha = true, + }), + healthBarColoredByCurrentHp = Gladdy:option({ + type = "toggle", + name = L["healthBarColoredByCurrentHp"], + order = 4, + width = "full", + disabled = function() return Gladdy.db.healthBarClassColored end, + }), + healthBarStatusBarColorMax = Gladdy:colorOption({ + type = "color", + name = L["100%"], + order = 5, + hasAlpha = false, + disabled = function() return Gladdy.db.healthBarClassColored end, + }), + healthBarStatusBarColorMid = Gladdy:colorOption({ + type = "color", + name = L["50%"], + order = 6, + hasAlpha = false, + disabled = function() return Gladdy.db.healthBarClassColored end, + }), + healthBarStatusBarColorMin = Gladdy:colorOption({ + type = "color", + name = L["0%"], + order = 7, + hasAlpha = false, + disabled = function() return Gladdy.db.healthBarClassColored end, + }), + }, + }, font = { type = "group", name = L["Font"], - order = 2, + order = 3, args = { header = { type = "header", @@ -502,7 +633,7 @@ function Healthbar:GetOptions() border = { type = "group", name = L["Border"], - order = 3, + order = 4, args = { header = { type = "header", @@ -538,7 +669,7 @@ function Healthbar:GetOptions() frameStrata = { type = "group", name = L["Frame Strata and Level"], - order = 4, + order = 5, args = { headerAuraLevel = { type = "header", @@ -567,7 +698,7 @@ function Healthbar:GetOptions() healthValues = { type = "group", name = L["Health Bar Text"], - order = 5, + order = 6, args = { header = { type = "header", diff --git a/Modules/Powerbar.lua b/Modules/Powerbar.lua index 786ca59..8a85a50 100644 --- a/Modules/Powerbar.lua +++ b/Modules/Powerbar.lua @@ -161,13 +161,9 @@ function Powerbar:UpdateFrame(unit) end function Powerbar.OnEvent(powerBar, event, unit) - if event == "UNIT_POWER_UPDATE" then - Powerbar:SetPower(powerBar, unit, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) - elseif event == "UNIT_MAXPOWER" then - Powerbar:SetPower(powerBar, unit, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) - elseif event == "UNIT_DISPLAYPOWER" then - Powerbar:SetPower(powerBar, unit, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) - end + powerBar.energy.powerType = select(1, UnitPowerType(unit)) + powerBar.energy.current, powerBar.energy.max = UnitPower(unit, powerBar.energy.powerType, true), UnitPowerMax(unit, powerBar.energy.powerType, true) + Powerbar:SetPower(powerBar, unit, powerBar.energy.current, powerBar.energy.max, powerBar.energy.powerType) end function Powerbar:SetText(unit, power, powerMax, status) @@ -276,7 +272,9 @@ function Powerbar:ENEMY_SPOTTED(unit) end if UnitExists(unit) then - Powerbar:SetPower(powerBar, UnitPower(unit, UnitPowerType(unit), true), UnitPowerMax(unit, UnitPowerType(unit), true), UnitPowerType(unit)) + powerBar.energy.powerType = select(1, UnitPowerType(unit)) + powerBar.energy.current, powerBar.energy.max = UnitPower(unit, powerBar.energy.powerType, true), UnitPowerMax(unit, powerBar.energy.powerType, true) + Powerbar:SetPower(powerBar, unit, powerBar.energy.current, powerBar.energy.max, powerBar.energy.powerType) end end diff --git a/Modules/RangeCheck.lua b/Modules/RangeCheck.lua index 36cdcfc..023cda9 100644 --- a/Modules/RangeCheck.lua +++ b/Modules/RangeCheck.lua @@ -17,6 +17,7 @@ local LibStub = LibStub local Gladdy = LibStub("Gladdy") local LSR = LibStub("SpellRange-1.0") local L = Gladdy.L +local HealthBar = Gladdy.modules["Health Bar"] local classSpells = { ["MAGE"] = 118, @@ -54,8 +55,6 @@ local RangeCheck = Gladdy:NewModule("Range Check", nil, { function RangeCheck:Initialize() if Gladdy.db.rangeCheckEnabled then self:RegisterMessage("JOINED_ARENA") - self:RegisterMessage("ENEMY_STEALTH") - self:RegisterMessage("ENEMY_SPOTTED") end self.playerClass = select(2, UnitClass("player")) end @@ -63,8 +62,6 @@ end function RangeCheck:UpdateFrameOnce() if Gladdy.db.rangeCheckEnabled then self:RegisterMessage("JOINED_ARENA") - self:RegisterMessage("ENEMY_STEALTH") - self:RegisterMessage("ENEMY_SPOTTED") else self:UnregisterAllMessages() end @@ -78,7 +75,6 @@ function RangeCheck:ResetUnit(unit) local button = Gladdy.buttons[unit] self:CancelTimer(button) self:SetColor(button, 1) - button.classColors = {} end function RangeCheck:Test(unit) @@ -86,11 +82,10 @@ function RangeCheck:Test(unit) if not button then return end - self:ENEMY_SPOTTED(unit) self.test = true button.lastState = 0 if Gladdy.db.rangeCheckEnabled then - if unit == "arena1" then + if unit == "arena2" or unit == "arena4" then --button.unit = "target" --self:CreateTimer(button) self:SetRangeAlpha(button, nil) @@ -113,18 +108,12 @@ function RangeCheck:SetColor(button, oorFac) return end - if not button.classColors.r then - if button.class then - button.classColors = { r = RAID_CLASS_COLORS[button.class].r, g = RAID_CLASS_COLORS[button.class].g, b = RAID_CLASS_COLORS[button.class].b } - else - button.classColors = { r = 0.66, g = 0.66, b = 0.66 } - end - end - if Gladdy.db.rangeCheckHealthBar then - button.healthBar.hp:SetStatusBarColor(button.classColors.r/oorFac, button.classColors.g/oorFac, button.classColors.b/oorFac, 1) + button.healthBar.hp.oorFactor = oorFac + HealthBar:SetHealthStatusBarColor(button.unit, button.healthBar.hp.current, button.healthBar.hp.max) else - button.healthBar.hp:SetStatusBarColor(button.classColors.r, button.classColors.g, button.classColors.b, 1) + button.healthBar.hp.oorFactor = 1 + HealthBar:SetHealthStatusBarColor(button.unit, button.healthBar.hp.current, button.healthBar.hp.max) end if Gladdy.db.rangeCheckHealthBarText then @@ -189,35 +178,6 @@ function RangeCheck:JOINED_ARENA() end end -function RangeCheck:ENEMY_STEALTH(unit, stealth) - local button = Gladdy.buttons[unit] - if not button then - return - end - button.lastState = 0 - if stealth then - button.classColors = { r = 0.66, g = 0.66, b = 0.66 } - if not Gladdy.db.rangeCheckEnabled then - button.healthBar.hp:SetStatusBarColor(0.66, 0.66, 0.66, 1) - end - else - if button.class then - button.classColors = { r = RAID_CLASS_COLORS[button.class].r, g = RAID_CLASS_COLORS[button.class].g, b = RAID_CLASS_COLORS[button.class].b } - if not Gladdy.db.rangeCheckEnabled then - button.healthBar.hp:SetStatusBarColor(RAID_CLASS_COLORS[button.class].r, RAID_CLASS_COLORS[button.class].g, RAID_CLASS_COLORS[button.class].b, 1) - end - end - end -end - -function RangeCheck:ENEMY_SPOTTED(unit) - local button = Gladdy.buttons[unit] - if (not button) then - return - end - button.classColors = { r = RAID_CLASS_COLORS[button.class].r, g = RAID_CLASS_COLORS[button.class].g, b = RAID_CLASS_COLORS[button.class].b } -end - function RangeCheck.CheckRange(self) local button = self.parent diff --git a/Options.lua b/Options.lua index 5268dc6..4a6aa57 100644 --- a/Options.lua +++ b/Options.lua @@ -105,8 +105,11 @@ function Gladdy:option(params) return defaults end -function Gladdy:SetColor(option) - return option.r, option.g, option.b, option.a +function Gladdy:SetColor(option, factor, altAlpha) + if not factor then + factor = 1 + end + return option.r / factor, option.g / factor, option.b / factor, altAlpha or option.a end function Gladdy:colorOption(params) -- 2.39.5 From c576adec2f7bf69e8f47232962eb0206b7b8aa68 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 27 Mar 2022 20:53:52 +0200 Subject: [PATCH 136/227] test data updated --- Gladdy.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gladdy.lua b/Gladdy.lua index 5c4f93a..57cb8a1 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -289,11 +289,11 @@ function Gladdy:OnInitialize() L = self.L self.testData = { - ["arena1"] = { name = "Swift", raceLoc = L["NightElf"], classLoc = L["Hunter"], class = "HUNTER", health = 67, healthMax = 100, power = 76, powerMax = 100, powerType = 1, testSpec = L["Marksmanship"], race = "NightElf" }, + ["arena1"] = { name = "Swift", raceLoc = L["NightElf"], classLoc = L["Druid"], class = "DRUID", health = 67, healthMax = 100, power = 76, powerMax = 100, powerType = 1, testSpec = L["Restoration"], race = "NightElf" }, ["arena2"] = { name = "Vilden", raceLoc = L["Undead"], classLoc = L["Mage"], class = "MAGE", health = 99, healthMax = 100, power = 7833, powerMax = 10460, powerType = 0, testSpec = L["Frost"], race = "Scourge" }, - ["arena3"] = { name = "Krymu", raceLoc = L["Human"], classLoc = L["Rogue"], class = "ROGUE", health = 13, healthMax = 100, power = 45, powerMax = 110, powerType = 3, testSpec = L["Subtlety"], race = "Human" }, - ["arena4"] = { name = "Talmon", raceLoc = L["Human"], classLoc = L["Warlock"], class = "WARLOCK", health = 68, healthMax = 100, power = 9855, powerMax = 9855, powerType = 0, testSpec = L["Demonology"], race = "Human" }, - ["arena5"] = { name = "Hydra", raceLoc = L["Undead"], classLoc = L["Priest"], class = "PRIEST", health = 100, healthMax = 100, power = 2515, powerMax = 10240, powerType = 0, testSpec = L["Discipline"], race = "Human" }, + ["arena3"] = { name = "Krymu", raceLoc = L["Human"], classLoc = L["Rogue"], class = "ROGUE", health = 10, healthMax = 100, power = 45, powerMax = 110, powerType = 3, testSpec = L["Subtlety"], race = "Human" }, + ["arena4"] = { name = "Talmon", raceLoc = L["Human"], classLoc = L["Warlock"], class = "WARLOCK", health = 40, healthMax = 100, power = 9855, powerMax = 9855, powerType = 0, testSpec = L["Demonology"], race = "Human" }, + ["arena5"] = { name = "Hydra", raceLoc = L["Undead"], classLoc = L["Priest"], class = "PRIEST", health = 70, healthMax = 100, power = 2515, powerMax = 10240, powerType = 0, testSpec = L["Discipline"], race = "Human" }, } self.cooldownSpellIds = {} -- 2.39.5 From c408448aadb8764643e602b41cc7e1875968a235 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 27 Mar 2022 20:57:53 +0200 Subject: [PATCH 137/227] health bar options update --- Modules/Healthbar.lua | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/Modules/Healthbar.lua b/Modules/Healthbar.lua index 7889f66..9e06a9e 100644 --- a/Modules/Healthbar.lua +++ b/Modules/Healthbar.lua @@ -464,13 +464,6 @@ function Healthbar:GetOptions() dialogControl = "LSM30_Statusbar", values = AceGUIWidgetLSMlists.statusbar, }), - healthBarBgColor = Gladdy:colorOption({ - type = "color", - name = L["Background color"], - desc = L["Color of the status bar background"], - order = 5, - hasAlpha = true, - }), }, }, barColor = { @@ -485,7 +478,7 @@ function Healthbar:GetOptions() }, healthBarClassColored = Gladdy:option({ type = "toggle", - name = L["Class colored health bar"], + name = L["Class colored"] .. " " .. L["Health Bar"], order = 2, width = "full", }), @@ -495,31 +488,43 @@ function Healthbar:GetOptions() order = 3, hasAlpha = true, }), + healthBarBgColor = Gladdy:colorOption({ + type = "color", + name = L["Background color"], + desc = L["Color of the status bar background"], + order = 4, + hasAlpha = true, + }), + headerAuras = { + type = "header", + name = L["Custom Colors"], + order = 10, + }, healthBarColoredByCurrentHp = Gladdy:option({ type = "toggle", - name = L["healthBarColoredByCurrentHp"], - order = 4, + name = L["Enable Custom Colors"], + order = 11, width = "full", disabled = function() return Gladdy.db.healthBarClassColored end, }), healthBarStatusBarColorMax = Gladdy:colorOption({ type = "color", name = L["100%"], - order = 5, + order = 12, hasAlpha = false, disabled = function() return Gladdy.db.healthBarClassColored end, }), healthBarStatusBarColorMid = Gladdy:colorOption({ type = "color", name = L["50%"], - order = 6, + order = 13, hasAlpha = false, disabled = function() return Gladdy.db.healthBarClassColored end, }), healthBarStatusBarColorMin = Gladdy:colorOption({ type = "color", name = L["0%"], - order = 7, + order = 14, hasAlpha = false, disabled = function() return Gladdy.db.healthBarClassColored end, }), -- 2.39.5 From 13a26d82c60b7c33339ba957fff025a8abf658d5 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Sun, 27 Mar 2022 21:04:47 +0200 Subject: [PATCH 138/227] bump version + readme changelog --- Gladdy.lua | 4 ++-- Gladdy.toc | 2 +- README.md | 15 ++++++++++++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Gladdy.lua b/Gladdy.lua index 57cb8a1..4478e48 100644 --- a/Gladdy.lua +++ b/Gladdy.lua @@ -27,11 +27,11 @@ local LibStub = LibStub --------------------------- -local MAJOR, MINOR = "Gladdy", 6 +local MAJOR, MINOR = "Gladdy", 7 local Gladdy = LibStub:NewLibrary(MAJOR, MINOR) local L Gladdy.version_major_num = 2 -Gladdy.version_minor_num = 0.10 +Gladdy.version_minor_num = 0.11 Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num Gladdy.version_releaseType = RELEASE_TYPES.release Gladdy.version = PREFIX .. string.format("%.2f", Gladdy.version_num) .. "-" .. Gladdy.version_releaseType diff --git a/Gladdy.toc b/Gladdy.toc index 73dc6f7..a9c4720 100644 --- a/Gladdy.toc +++ b/Gladdy.toc @@ -1,6 +1,6 @@ ## Interface: 20504 ## Title: Gladdy - TBC -## Version: 2.10-Release +## Version: 2.11-Release ## Notes: The most powerful arena AddOn for WoW 2.5.4 ## Author: XiconQoo, DnB_Junkee, Knall ## X-Email: contact me on discord Knall#1751 diff --git a/README.md b/README.md index b2fa01b..036b6fe 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ --- -## [v2.10-Release Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v2.10-Release/Gladdy_TBC-Classic_v2.10-Release.zip) +## [v2.11-Release Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v2.11-Release/Gladdy_TBC-Classic_v2.11-Release.zip) ###### Please consider donating if you like my work @@ -79,6 +79,19 @@ Thank you! ### Changes +### v2.11-Release +- **Cooldowns** + - fixed cooldowns not showing properly for detected spec + - Nature's Swiftness (Druid/Shaman) now properly tracked + - improved cd out of stealth detection +- **HealthBar** + - added options class colored or custom colors + - custom colors for 100%, 50% 0% hp values added + - custom stealth color added +- add group option for DRs +- intercept cd adjusted (-5s for 4pc set bonus) +- totempulse minor adjustments + ### v2.10-Release - **Totems**: -- 2.39.5 From a87455e7bd93527c51593214de0b6f5c02f2b9ef Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 29 Jul 2022 07:41:55 +0200 Subject: [PATCH 139/227] Wrath: - separate TOC + Constants for BCC and Wrath - cooldowns, auras, spec detection, trinket/racial tracking --- Constants.lua => Constants_BCC.lua | 223 +---- Constants_Wrath.lua | 1334 +++++++++++++++++++++++++ Constants_shared.lua | 274 +++++ Gladdy.toc => Gladdy_BCC.toc | 5 +- Gladdy_Wrath.toc | 44 + Lang.lua | 1 + Libs/LibClassAuras-1.0/ClassBuffs.lua | 11 +- Modules/Auras.lua | 5 +- Modules/Classicon.lua | 6 + Modules/Racial.lua | 29 +- Modules/Trinket.lua | 68 +- Options.lua | 11 + 12 files changed, 1783 insertions(+), 228 deletions(-) rename Constants.lua => Constants_BCC.lua (87%) create mode 100644 Constants_Wrath.lua create mode 100644 Constants_shared.lua rename Gladdy.toc => Gladdy_BCC.toc (94%) create mode 100644 Gladdy_Wrath.toc diff --git a/Constants.lua b/Constants_BCC.lua similarity index 87% rename from Constants.lua rename to Constants_BCC.lua index 31589a3..e427565 100644 --- a/Constants.lua +++ b/Constants_BCC.lua @@ -2,44 +2,14 @@ local tbl_sort, select, string_lower = table.sort, select, string.lower local GetSpellInfo = GetSpellInfo local GetItemInfo = GetItemInfo -local GetLocale = GetLocale local Gladdy = LibStub("Gladdy") local L = Gladdy.L local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF +Gladdy.expansion = "BCC" Gladdy.CLASSES = {"MAGE", "PRIEST", "DRUID", "SHAMAN", "PALADIN", "WARLOCK", "WARRIOR", "HUNTER", "ROGUE"} tbl_sort(Gladdy.CLASSES) -Gladdy.RACES = {"Scourge", "BloodElf", "Tauren", "Orc", "Troll", "NightElf", "Draenei", "Human", "Gnome", "Dwarf"} -tbl_sort(Gladdy.RACES) - -local RACE_ICON_TCOORDS = { - ["HUMAN_MALE"] = {0, 0.125, 0, 0.25}, - ["DWARF_MALE"] = {0.125, 0.25, 0, 0.25}, - ["GNOME_MALE"] = {0.25, 0.375, 0, 0.25}, - ["NIGHTELF_MALE"] = {0.375, 0.5, 0, 0.25}, - - ["TAUREN_MALE"] = {0, 0.125, 0.25, 0.5}, - ["SCOURGE_MALE"] = {0.125, 0.25, 0.25, 0.5}, - ["TROLL_MALE"] = {0.25, 0.375, 0.25, 0.5}, - ["ORC_MALE"] = {0.375, 0.5, 0.25, 0.5}, - - ["HUMAN_FEMALE"] = {0, 0.125, 0.5, 0.75}, - ["DWARF_FEMALE"] = {0.125, 0.25, 0.5, 0.75}, - ["GNOME_FEMALE"] = {0.25, 0.375, 0.5, 0.75}, - ["NIGHTELF_FEMALE"] = {0.375, 0.5, 0.5, 0.75}, - - ["TAUREN_FEMALE"] = {0, 0.125, 0.75, 1.0}, - ["SCOURGE_FEMALE"] = {0.125, 0.25, 0.75, 1.0}, - ["TROLL_FEMALE"] = {0.25, 0.375, 0.75, 1.0}, - ["ORC_FEMALE"] = {0.375, 0.5, 0.75, 1.0}, - - ["BLOODELF_MALE"] = {0.5, 0.625, 0.25, 0.5}, - ["BLOODELF_FEMALE"] = {0.5, 0.625, 0.75, 1.0}, - - ["DRAENEI_MALE"] = {0.5, 0.625, 0, 0.25}, - ["DRAENEI_FEMALE"] = {0.5, 0.625, 0.5, 0.75}, -} local specBuffs = { -- DRUID @@ -51,7 +21,7 @@ local specBuffs = { [GetSpellInfo(33891)] = L["Restoration"], -- Tree of Life -- HUNTER - [GetSpellInfo(34692)] = L["Beast Mastery"], -- The Beast Within + [GetSpellInfo(34471)] = L["Beast Mastery"], -- The Beast Within [GetSpellInfo(20895)] = L["Beast Mastery"], -- Spirit Bond [GetSpellInfo(34455)] = L["Beast Mastery"], -- Ferocious Inspiration [GetSpellInfo(27066)] = L["Marksmanship"], -- Trueshot Aura @@ -108,8 +78,8 @@ local specBuffs = { [GetSpellInfo(19028)] = L["Demonology"], -- Soul Link [GetSpellInfo(23759)] = L["Demonology"], -- Master Demonologist [GetSpellInfo(35696)] = L["Demonology"], -- Demonic Knowledge - [GetSpellInfo(30302)] = L["Destruction"], -- Nether Protection - [GetSpellInfo(34935)] = L["Destruction"], -- Backlash + [GetSpellInfo(30300)] = L["Destruction"], -- Nether Protection + [GetSpellInfo(34936)] = L["Destruction"], -- Backlash -- WARRIOR [GetSpellInfo(29838)] = L["Arms"], -- Second Wind @@ -338,11 +308,11 @@ local importantAuras = { spellID = 19577, }, -- The Beast Within - [GetSpellInfo(34692)] = { + [GetSpellInfo(34471)] = { track = AURA_TYPE_BUFF, duration = 18, priority = 20, - spellID = 34692, + spellID = 34471, }, @@ -846,35 +816,6 @@ function Gladdy:GetInterrupts() return interrupts end -local auraTypeColor = {} -auraTypeColor["none"] = { r = 0.80, g = 0, b = 0 , a = 1} -auraTypeColor["magic"] = { r = 0.20, g = 0.60, b = 1.00, a = 1} -auraTypeColor["curse"] = { r = 0.60, g = 0.00, b = 1.00, a = 1 } -auraTypeColor["disease"] = { r = 0.60, g = 0.40, b = 0, a = 1 } -auraTypeColor["poison"] = { r = 0.00, g = 0.60, b = 0, a = 1 } -auraTypeColor["immune"] = { r = 1.00, g = 0.02, b = 0.99, a = 1 } -auraTypeColor["form"] = auraTypeColor["none"] -auraTypeColor["aura"] = auraTypeColor["none"] -auraTypeColor[""] = auraTypeColor["none"] - -function Gladdy:GetAuraTypeColor() - return auraTypeColor -end - -local spellSchoolColors = {} -spellSchoolColors[1] = {r = 1, g = 1, b = 0, a = 1, type = "Physical"} --- "physical" 255, 255, 0 -spellSchoolColors[2] = {r = 1, g = 0.901, b = 0.501, a = 1, type = "Holy"} ---"holy" -- 255, 230, 128 -spellSchoolColors[4] = {r = 1, g = 0.501, b = 0, a = 1, type = "Fire"} ---"fire" -- 255, 128, 0 -spellSchoolColors[8] = {r = 0.302, g = 1, b = 0.302, a = 1, type = "Nature"} ---"nature" -- 77, 255, 77 -spellSchoolColors[16] = {r = 0.501, g = 1, b = 1, a = 1, type = "Frost"} ---"frost" -- 128, 255, 255 -spellSchoolColors[32] = {r = 0.501, g = 0.501, b = 1, a = 1, type = "Shadow"} ---"shadow" --128, 128, 255 -spellSchoolColors[64] = {r = 1, g = 0.501, b = 1, a = 1, type = "Arcane"} ---"arcane" -- 255, 128, 255 -spellSchoolColors["unknown"] = {r = 0, g = 0, b = 0, a = 1, type = "Unknown"} ---"unknown spell school" - -function Gladdy:GetSpellSchoolColors() - return spellSchoolColors -end - local cooldownList = { -- Spell Name Cooldown[, Spec] -- Mage @@ -1034,7 +975,7 @@ local cooldownList = { [34490] = { cd = 20, spec = L["Marksmanship"], }, -- Silencing Shot [19386] = { cd = 60, spec = L["Survival"], }, -- Wyvern Sting [19577] = { cd = 60, spec = L["Beast Mastery"], }, -- Intimidation - [38373] = { cd = 120, spec = L["Beast Mastery"], }, -- The Beast Within + [34471] = { cd = 120, spec = L["Beast Mastery"], }, -- The Beast Within [5384] = 30, -- Feign Death [3034] = 15, -- Viper Sting [1543] = 20, -- Flare @@ -1168,154 +1109,6 @@ function Gladdy:Racials() return racials end -local arenaTimer = { - ["default"] = { - [61] = "One minute until the Arena battle begins!", - [31] = "Thirty seconds until the Arena battle begins!", - [16] = "Fifteen seconds until the Arena battle begins!", - [0] = "The Arena battle has begun!", - }, - ["esES"] = { - [61] = "¡Un minuto hasta que dé comienzo la batalla en arena!", - [31] = "¡Treinta segundos hasta que comience la batalla en arena!", - [16] = "¡Quince segundos hasta que comience la batalla en arena!", - [0] = "¡La batalla en arena ha comenzado!", - }, - ["ptBR"] = { - [61] = "Um minuto até a batalha na Arena começar!", - [31] = "Trinta segundos até a batalha na Arena começar!", - [16] = "Quinze segundos até a batalha na Arena começar!", - [0] = "A batalha na Arena começou!", - }, - ["deDE"] = { - [61] = "Noch eine Minute bis der Arenakampf beginnt!", - [31] = "Noch dreißig Sekunden bis der Arenakampf beginnt!", - [16] = "Noch fünfzehn Sekunden bis der Arenakampf beginnt!", - [0] = "Der Arenakampf hat begonnen!", - }, - ["frFR"] = { - [61] = "Le combat d'arène commence dans une minute\194\160!", - [31] = "Le combat d'arène commence dans trente secondes\194\160!", - [16] = "Le combat d'arène commence dans quinze secondes\194\160!", - [0] = "Le combat d'arène commence\194\160!", - }, - ["ruRU"] = { - [61] = "Одна минута до начала боя на арене!", - [31] = "Тридцать секунд до начала боя на арене!", - [16] = "До начала боя на арене осталось 15 секунд.", - [0] = "Бой начался!", - }, - ["itIT"] = { -- TODO - -- Beta has no itIT version available? - }, - ["koKR"] = { - [61] = "투기장 전투 시작 1분 전입니다!", - [31] = "투기장 전투 시작 30초 전입니다!", - [16] = "투기장 전투 시작 15초 전입니다!", - [0] = "투기장 전투가 시작되었습니다!", - }, - ["zhCN"] = { - [61] = "竞技场战斗将在一分钟后开始!", - [31] = "竞技场战斗将在三十秒后开始!", - [16] = "竞技场战斗将在十五秒后开始!", - [0] = "竞技场的战斗开始了!", - }, - ["zhTW"] = { - [61] = "1分鐘後競技場戰鬥開始!", - [31] = "30秒後競技場戰鬥開始!", - [16] = "15秒後競技場戰鬥開始!", - [0] = "競技場戰鬥開始了!", - }, -} -arenaTimer["esMX"] = arenaTimer["esES"] -arenaTimer["ptPT"] = arenaTimer["ptBR"] - -function Gladdy:GetArenaTimer() - if arenaTimer[GetLocale()] then - return arenaTimer[GetLocale()] - else - return arenaTimer["default"] - end -end - -Gladdy.legacy = { - castBarPos = "LEFT", - buffsCooldownPos = "TOP", - buffsBuffsCooldownPos = "BOTTOM", - classIconPos = "LEFT", - ciAnchor = "healthBar", - ciPos = "TOP", - cooldownYPos = "TOP", - cooldownXPos = "LEFT", - drCooldownPos = "RIGHT", - racialAnchor = "trinket", - racialPos = "RIGHT", - trinketPos = "RIGHT", - padding = 1, - growUp = false, -} - -Gladdy.newDefaults = { - ["bottomMargin"] = 94.99996948242188, - ["newLayout"] = true, - Pets = { - ["petYOffset"] = -81.99993896484375, - ["petXOffset"] = 181, - }, - ClassIcon = { - ["classIconXOffset"] = -74.90008544921875, - }, - Racial = { - ["racialXOffset"] = 255.9000244140625, - }, - Trinket = { - ["trinketXOffset"] = 182, - }, - ["Combat Indicator"] = { - ["ciXOffset"] = 79.99993896484375, - ["ciYOffset"] = -10.99993896484375, - }, - Cooldowns = { - ["cooldownYOffset"] = 31, - }, - ["Buffs and Debuffs"] = { - ["buffsBuffsXOffset"] = 29, - ["buffsBuffsYOffset"] = -82.99993896484375, - ["buffsXOffset"] = 29, - ["buffsYOffset"] = 62.00006103515625, - }, - Diminishings = { - ["drXOffset"] = 329.7999877929688, - ["drYOffset"] = -22.5, - }, - ["Cast Bar"] = { - ["castBarXOffset"] = -235.900146484375, - ["castBarYOffset"] = -30.5, - }, -} - -Gladdy.frameStrata = { - BACKGROUND = L["Background"] .. "(0)", - LOW = L["Low"] .. "(1)", - MEDIUM = L["Medium"] .. "(2)", - HIGH = L["High"] .. "(3)", - DIALOG = L["Dialog"] .. "(4)", - FULLSCREEN = L["Fullscreen"] .. "(5)", - FULLSCREEN_DIALOG = L["Fullscreen Dialog"] .. "(6)", - TOOLTIP = L["Tooltip"] .. "(7)", -} - -Gladdy.frameStrataSorting = { - [1] = "BACKGROUND", - [2] = "LOW", - [3] = "MEDIUM", - [4] = "HIGH", - [5] = "DIALOG", - [6] = "FULLSCREEN", - [7] = "FULLSCREEN_DIALOG", - [8] = "TOOLTIP", -} - --------------------- -- TOTEM STUFF @@ -1427,6 +1220,7 @@ local totemNpcIdsToTotemData = { [84519] = totemData[string_lower("Searing Totem")], [110730] = totemData[string_lower("Searing Totem")], [132178] = totemData[string_lower("Searing Totem")], + [9637] = totemData[string_lower("Searing Totem")], [5950] = totemData[string_lower("Flametongue Totem")], [6012] = totemData[string_lower("Flametongue Totem")], @@ -1652,4 +1446,3 @@ local totemNpcIdsToTotemData = { function Gladdy:GetTotemData() return totemData, totemNpcIdsToTotemData, totemSpellIdToPulse end - diff --git a/Constants_Wrath.lua b/Constants_Wrath.lua new file mode 100644 index 0000000..818d432 --- /dev/null +++ b/Constants_Wrath.lua @@ -0,0 +1,1334 @@ +local tbl_sort, select, string_lower = table.sort, select, string.lower + +local GetSpellInfo = GetSpellInfo +local GetItemInfo = GetItemInfo + +local Gladdy = LibStub("Gladdy") +local L = Gladdy.L +local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF + +Gladdy.expansion = "Wrath" +Gladdy.CLASSES = { "MAGE", "PRIEST", "DRUID", "SHAMAN", "PALADIN", "WARLOCK", "WARRIOR", "HUNTER", "ROGUE", "DEATHKNIGHT" } +tbl_sort(Gladdy.CLASSES) + +local specBuffs = { + -- WARRIOR + [GetSpellInfo(56638)] = L["Arms"], -- Taste for Blood + [GetSpellInfo(64976)] = L["Arms"], -- Juggernaut + [GetSpellInfo(57522)] = L["Arms"], -- Enrage + [GetSpellInfo(52437)] = L["Arms"], -- Sudden Death + [GetSpellInfo(46857)] = L["Arms"], -- Trauma + [GetSpellInfo(56112)] = L["Fury"], -- Furious Attacks + [GetSpellInfo(29801)] = L["Fury"], -- Rampage + [GetSpellInfo(46916)] = L["Fury"], -- Slam! + [GetSpellInfo(50227)] = L["Protection"], -- Sword and Board + [GetSpellInfo(50720)] = L["Protection"], -- Vigilance + [GetSpellInfo(74347)] = L["Protection"], -- Silenced - Gag Order + -- PALADIN + [GetSpellInfo(20375)] = L["Retribution"], -- Seal of Command + [GetSpellInfo(59578)] = L["Retribution"], -- The Art of War + [GetSpellInfo(31836)] = L["Holy"], -- Light's Grace + [GetSpellInfo(53563)] = L["Holy"], -- Beacon of Light + [GetSpellInfo(54149)] = L["Holy"], -- Infusion of Light + [GetSpellInfo(63529)] = L["Protection"], -- Silenced - Shield of the Templar + -- ROGUE + [GetSpellInfo(36554)] = L["Subtlety"], -- Shadowstep + [GetSpellInfo(44373)] = L["Subtlety"], -- Shadowstep Speed + [GetSpellInfo(36563)] = L["Subtlety"], -- Shadowstep DMG + [GetSpellInfo(51713)] = L["Subtlety"], -- Shadow Dance + [GetSpellInfo(31223)] = L["Subtlety"], -- Master of Subtlety + [GetSpellInfo(14278)] = L["Subtlety"], -- Ghostly Strike + [GetSpellInfo(51690)] = L["Combat"], -- Killing Spree + [GetSpellInfo(13877)] = L["Combat"], -- Blade Flurry + [GetSpellInfo(13750)] = L["Combat"], -- Adrenaline Rush + [GetSpellInfo(14177)] = L["Assassination"], -- Cold Blood + -- PRIEST + [GetSpellInfo(47788)] = L["Holy"], -- Guardian Spirit + [GetSpellInfo(52800)] = L["Discipline"], -- Borrowed Time + [GetSpellInfo(63944)] = L["Discipline"], -- Renewed Hope + [GetSpellInfo(15473)] = L["Shadow"], -- Shadowform + [GetSpellInfo(15286)] = L["Shadow"], -- Vampiric Embrace + -- DEATHKNIGHT + [GetSpellInfo(49222)] = L["Unholy"], -- Bone Shield + [GetSpellInfo(49016)] = L["Blood"], -- Hysteria + [GetSpellInfo(53138)] = L["Blood"], -- Abomination's Might + [GetSpellInfo(55610)] = L["Frost"], -- Imp. Icy Talons + -- MAGE + [GetSpellInfo(43039)] = L["Frost"], -- Ice Barrier + [GetSpellInfo(74396)] = L["Frost"], -- Fingers of Frost + [GetSpellInfo(57761)] = L["Frost"], -- Fireball! + [GetSpellInfo(11129)] = L["Fire"], -- Combustion + [GetSpellInfo(64346)] = L["Fire"], -- Fiery Payback + [GetSpellInfo(48108)] = L["Fire"], -- Hot Streak + [GetSpellInfo(54741)] = L["Fire"], -- Firestarter + [GetSpellInfo(55360)] = L["Fire"], -- Living Bomb + [GetSpellInfo(31583)] = L["Arcane"], -- Arcane Empowerment + [GetSpellInfo(44413)] = L["Arcane"], -- Incanter's Absorption + -- WARLOCK + [GetSpellInfo(30302)] = L["Destruction"], -- Nether Protection + [GetSpellInfo(63244)] = L["Destruction"], -- Pyroclasm + [GetSpellInfo(54277)] = L["Destruction"], -- Backdraft + [GetSpellInfo(47283)] = L["Destruction"], -- Empowered Imp + [GetSpellInfo(34936)] = L["Destruction"], -- Backlash + [GetSpellInfo(47193)] = L["Demonology"], -- Demonic Empowerment + [GetSpellInfo(64371)] = L["Affliction"], -- Eradication + -- SHAMAN + [GetSpellInfo(57663)] = L["Elemental"], -- Totem of Wrath + [GetSpellInfo(65264)] = L["Elemental"], -- Lava Flows + [GetSpellInfo(51470)] = L["Elemental"], -- Elemental Oath + [GetSpellInfo(52179)] = L["Elemental"], -- Astral Shift + [GetSpellInfo(49284)] = L["Restoration"], -- Earth Shield + [GetSpellInfo(53390)] = L["Restoration"], -- Tidal Waves + [GetSpellInfo(30809)] = L["Enhancement"], -- Unleashed Rage + [GetSpellInfo(53817)] = L["Enhancement"], -- Maelstrom Weapon + [GetSpellInfo(63685)] = L["Enhancement"], -- Freeze (Frozen Power) + -- HUNTER + [GetSpellInfo(20895)] = L["Beast Mastery"], -- Spirit Bond + [GetSpellInfo(19506)] = L["Marksmanship"], -- Trueshot Aura + -- DRUID + [GetSpellInfo(24932)] = L["Feral"], -- Leader of the Pack + [GetSpellInfo(34123)] = L["Restoration"], -- Tree of Life + [GetSpellInfo(24907)] = L["Balance"], -- Moonkin Aura + [GetSpellInfo(53251)] = L["Restoration"], -- Wild Growth +} +function Gladdy:GetSpecBuffs() + return specBuffs +end + +local specSpells = { + -- WARRIOR + [GetSpellInfo(47486)] = L["Arms"], -- Mortal Strike + [GetSpellInfo(46924)] = L["Arms"], -- Bladestorm + [GetSpellInfo(23881)] = L["Fury"], -- Bloodthirst + [GetSpellInfo(12809)] = L["Protection"], -- Concussion Blow + [GetSpellInfo(47498)] = L["Protection"], -- Devastate + [GetSpellInfo(46968)] = L["Protection"], -- Shockwave + [GetSpellInfo(50720)] = L["Protection"], -- Vigilance + -- PALADIN + [GetSpellInfo(48827)] = L["Protection"], -- Avenger's Shield + [GetSpellInfo(48825)] = L["Holy"], -- Holy Shock + [GetSpellInfo(53563)] = L["Holy"], -- Beacon of Light + [GetSpellInfo(35395)] = L["Retribution"], -- Crusader Strike + [GetSpellInfo(66006)] = L["Retribution"], -- Divine Storm + [GetSpellInfo(20066)] = L["Retribution"], -- Repentance + -- ROGUE + [GetSpellInfo(48666)] = L["Assassination"], -- Mutilate + [GetSpellInfo(14177)] = L["Assassination"], -- Cold Blood + [GetSpellInfo(51690)] = L["Combat"], -- Killing Spree + [GetSpellInfo(13877)] = L["Combat"], -- Blade Flurry + [GetSpellInfo(13750)] = L["Combat"], -- Adrenaline Rush + [GetSpellInfo(36554)] = L["Subtlety"], -- Shadowstep + [GetSpellInfo(48660)] = L["Subtlety"], -- Hemorrhage + [GetSpellInfo(51713)] = L["Subtlety"], -- Shadow Dance + -- PRIEST + [GetSpellInfo(53007)] = L["Discipline"], -- Penance + [GetSpellInfo(10060)] = L["Discipline"], -- Power Infusion + [GetSpellInfo(33206)] = L["Discipline"], -- Pain Suppression + [GetSpellInfo(34861)] = L["Holy"], -- Circle of Healing + [GetSpellInfo(15487)] = L["Shadow"], -- Silence + [GetSpellInfo(48160)] = L["Shadow"], -- Vampiric Touch + -- DEATHKNIGHT + [GetSpellInfo(55262)] = L["Blood"], -- Heart Strike + [GetSpellInfo(49203)] = L["Frost"], -- Hungering Cold + [GetSpellInfo(55268)] = L["Frost"], -- Frost Strike + [GetSpellInfo(51411)] = L["Frost"], -- Howling Blast + [GetSpellInfo(55271)] = L["Unholy"], -- Scourge Strike + -- MAGE + [GetSpellInfo(44781)] = L["Arcane"], -- Arcane Barrage + [GetSpellInfo(55360)] = L["Fire"], -- Living Bomb + [GetSpellInfo(42950)] = L["Fire"], -- Dragon's Breath + [GetSpellInfo(42945)] = L["Fire"], -- Blast Wave + [GetSpellInfo(44572)] = L["Frost"], -- Deep Freeze + -- WARLOCK + [GetSpellInfo(59164)] = L["Affliction"], -- Haunt + [GetSpellInfo(47843)] = L["Affliction"], -- Unstable Affliction + [GetSpellInfo(59672)] = L["Demonology"], -- Metamorphosis + [GetSpellInfo(47193)] = L["Demonology"], -- Demonic Empowerment + [GetSpellInfo(59172)] = L["Destruction"], -- Chaos Bolt + [GetSpellInfo(47847)] = L["Destruction"], -- Shadowfury + -- SHAMAN + [GetSpellInfo(59159)] = L["Elemental"], -- Thunderstorm + [GetSpellInfo(16166)] = L["Elemental"], -- Elemental Mastery + [GetSpellInfo(51533)] = L["Enhancement"], -- Feral Spirit + [GetSpellInfo(30823)] = L["Enhancement"], -- Shamanistic Rage + [GetSpellInfo(17364)] = L["Enhancement"], -- Stormstrike + [GetSpellInfo(61301)] = L["Restoration"], -- Riptide + [GetSpellInfo(51886)] = L["Restoration"], -- Cleanse Spirit + -- HUNTER + [GetSpellInfo(19577)] = L["Beast Mastery"], -- Intimidation + [GetSpellInfo(34490)] = L["Marksmanship"], -- Silencing Shot + [GetSpellInfo(53209)] = L["Marksmanship"], -- Chimera Shot + [GetSpellInfo(60053)] = L["Survival"], -- Explosive Shot + [GetSpellInfo(49012)] = L["Survival"], -- Wyvern Sting + -- DRUID + [GetSpellInfo(53201)] = L["Balance"], -- Starfall + [GetSpellInfo(61384)] = L["Balance"], -- Typhoon + [GetSpellInfo(48566)] = L["Feral"], -- Mangle (Cat) + [GetSpellInfo(48564)] = L["Feral"], -- Mangle (Bear) + [GetSpellInfo(18562)] = L["Restoration"], -- Swiftmend +} +function Gladdy:GetSpecSpells() + return specSpells +end + +local importantAuras = { + --- Crowd control + [GetSpellInfo(33786)] = { -- Cyclone + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 33786, + }, + [GetSpellInfo(18658)] = { -- Hibernate + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 18658, + }, + [GetSpellInfo(14309)] = { -- Freezing Trap Effect + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 14309, + }, + [GetSpellInfo(60210)] = { -- Freezing arrow effect + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 60210, + }, + [GetSpellInfo(6770)] = { -- Sap + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 6770, + }, + [GetSpellInfo(2094)] = { -- Blind + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 2094, + }, + [GetSpellInfo(5782)] = { -- Fear + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 5782, + }, + [GetSpellInfo(47860)] = { -- Death Coil Warlock + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 47860, + }, + [GetSpellInfo(6358)] = { -- Seduction + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 6358, + }, + [GetSpellInfo(5484)] = { -- Howl of Terror + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 5484, + }, + [GetSpellInfo(5246)] = { -- Intimidating Shout + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 5246, + }, + [GetSpellInfo(8122)] = { -- Psychic Scream + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 8122, + }, + [GetSpellInfo(12826)] = { -- Polymorph + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 12826, + texture = select(3, GetSpellInfo(12826)), + }, + [GetSpellInfo(51514)] = { -- Hex + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 51514, + }, + [GetSpellInfo(18647)] = { -- Banish + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 18647, + }, + [GetSpellInfo(605)] = { -- Mind Control + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 605, + }, + [GetSpellInfo(14327)] = { -- Scare Beast + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 14327, + }, + + --- Roots + -- Entangling Roots + [GetSpellInfo(26989)] = { + track = AURA_TYPE_DEBUFF, + priority = 30, + spellID = 26989, + }, + [select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689))] = { + track = AURA_TYPE_DEBUFF, + priority = 30, + spellID = 27010, + altName = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), + }, + [GetSpellInfo(42917)] = { -- Frost Nova + track = AURA_TYPE_DEBUFF, + priority = 30, + spellID = 42917, + }, + [GetSpellInfo(33395)] = { -- Freeze (Water Elemental) + track = AURA_TYPE_DEBUFF, + priority = 30, + spellID = 33395, + }, + [GetSpellInfo(16979)] = { -- Feral Charge + track = AURA_TYPE_DEBUFF, + priority = 30, + spellID = 16979, + }, + [GetSpellInfo(23694)] = { -- Improved Hamstring + track = AURA_TYPE_DEBUFF, + priority = 30, + spellID = 23694, + }, + [GetSpellInfo(4167)] = { -- Web (Hunter Pet) + track = AURA_TYPE_DEBUFF, + priority = 30, + spellID = 4167, + }, + + --- Stuns and incapacitates + [GetSpellInfo(8983)] = { -- Bash + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 8983, + }, + [GetSpellInfo(1833)] = { -- Cheap Shot + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 1833, + }, + [GetSpellInfo(8643)] = { -- Kidney Shot + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 8643, + }, + [GetSpellInfo(1776)] = { -- Gouge + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 1776, + }, + [GetSpellInfo(44572)] = { -- Deep Freeze + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 44572, + }, + [GetSpellInfo(49012)] = { -- Wyvern Sting + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 49012, + }, + [GetSpellInfo(19503)] = { -- Scatter Shot + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 19503, + }, + [GetSpellInfo(49803)] = { -- Pounce + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 49803, + }, + [GetSpellInfo(49802)] = { -- Maim + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 49802, + }, + [GetSpellInfo(10308)] = { -- Hammer of Justice + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 10308, + }, + [GetSpellInfo(20066)] = { -- Repentance + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 20066, + }, + [GetSpellInfo(46968)] = { -- Shockwave + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 46968, + }, + [GetSpellInfo(49203)] = { -- Hungering Cold + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 49203, + }, + [GetSpellInfo(47481)] = { -- Gnaw (dk pet stun) + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 47481, + }, + [GetSpellInfo(47847)] = { -- Shadowfury Stun + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 47847, + }, + [GetSpellInfo(16922)] = { -- Imp Starfire Stun + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 16922, + }, + [GetSpellInfo(5530)] = { -- Mace Stun Effect + track = AURA_TYPE_DEBUFF, + priority = 40, + texture = select(3, GetSpellInfo(12284)), + spellID = 5530, + }, + [GetSpellInfo(20549)] = { -- War Stomp + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 20549, + }, + [GetSpellInfo(7922)] = { -- Charge Stun + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 7922, + texture = select(3, GetSpellInfo(100)) + }, + [GetSpellInfo(25274)] = { -- Intercept Stun + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 25274, + texture = select(3, GetSpellInfo(25272)) + }, + [GetSpellInfo(12809)] = { -- Concussion Blow + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 12809, + }, + [GetSpellInfo(12355)] = { -- Impact + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 12355, + }, + [GetSpellInfo(19577)] = {-- Intimidation + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 19577, + }, + [GetSpellInfo(31661)] = { -- Dragon's Breath + track = AURA_TYPE_DEBUFF, + priority = 40, + spellID = 31661, + }, + + --- Silences + [GetSpellInfo(18469)] = { -- Improved Counterspell + track = AURA_TYPE_DEBUFF, + priority = 20, + spellID = 18469, + }, + [GetSpellInfo(15487)] = { -- Silence + track = AURA_TYPE_DEBUFF, + priority = 20, + spellID = 15487, + }, + [GetSpellInfo(34490)] = { -- Silencing Shot + track = AURA_TYPE_DEBUFF, + priority = 20, + spellID = 34490, + }, + [GetSpellInfo(18425)] = { -- Improved Kick + track = AURA_TYPE_DEBUFF, + priority = 20, + spellID = 18425, + }, + [GetSpellInfo(49916)] = { -- Strangulate + track = AURA_TYPE_DEBUFF, + priority = 20, + spellID = 49916, + }, + [GetSpellInfo(74347)] = { -- Silenced - Gag Order + track = AURA_TYPE_DEBUFF, + priority = 20, + spellID = 74347, + }, + [GetSpellInfo(63529)] = { -- Silenced - Shield of the Templar + track = AURA_TYPE_DEBUFF, + priority = 20, + spellID = 63529, + }, + ["Unstable Affliction Silence"] = { -- Unstable Affliction Silence (GetSpellInfo returns "Unstable Affliction") + track = AURA_TYPE_DEBUFF, + altName = select(1, GetSpellInfo(31117)) .. " Silence", + priority = 20, + spellID = 31117, + }, + [GetSpellInfo(24259)] = { -- Spell Lock (Felhunter) + track = AURA_TYPE_DEBUFF, + priority = 20, + spellID = 24259, + }, + [GetSpellInfo(28730)] = { -- Arcane Torrent + track = AURA_TYPE_DEBUFF, + priority = 20, + spellID = 28730, + }, + [GetSpellInfo(1330)] = { -- Garrote - Silence + track = AURA_TYPE_DEBUFF, + priority = 20, + spellID = 1330, + }, + + --- Disarms + [GetSpellInfo(676)] = { -- Disarm + track = AURA_TYPE_DEBUFF, + priority = 20, + spellID = 676, + }, + [GetSpellInfo(51722)] = { -- Dismantle + track = AURA_TYPE_DEBUFF, + priority = 20, + spellID = 51722, + }, + [GetSpellInfo(53359)] = { -- Chimera Shot - Scorpid + track = AURA_TYPE_DEBUFF, + priority = 20, + spellID = 53359, + }, + + --- Buffs + [GetSpellInfo(1022)] = { -- Hand of Protection + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 1022, + }, + [GetSpellInfo(1044)] = { -- Hand of Freedom + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 1044, + }, + [GetSpellInfo(6940)] = { -- Hand of Sacrifice + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 6940, + }, + [GetSpellInfo(64205)] = { -- Divine Sacrifice + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 64205, + }, + [GetSpellInfo(53271)] = { -- Master's Call (Hunter Pet Hand of Freedom) + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 53271, + }, + [GetSpellInfo(2825)] = { -- Bloodlust + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 2825, + }, + [GetSpellInfo(32182)] = { -- Heroism + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 32182, + }, + [GetSpellInfo(33206)] = { -- Pain Suppression + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 33206, + }, + [GetSpellInfo(29166)] = { -- Innervate + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 29166, + }, + [GetSpellInfo(18708)] = { -- Fel Domination + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 18708, + }, + [GetSpellInfo(54428)] = { -- Divine Plea + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 54428, + }, + [GetSpellInfo(31821)] = { -- Aura mastery + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 31821, + }, + [GetSpellInfo(51713)] = { -- Shadow Dance + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 51713, + }, + [GetSpellInfo(7744)] = { -- Will of the Forsaken + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 7744, + }, + [GetSpellInfo(12292)] = { -- Death Wish + track = AURA_TYPE_BUFF, + priority = 15, + spellID = 12292, + }, + [GetSpellInfo(23920)] = { -- Spell Reflection + track = AURA_TYPE_BUFF, + priority = 50, + spellID = 23920, + }, + [GetSpellInfo(6346)] = {-- Fear Ward + track = AURA_TYPE_BUFF, + priority = 9, + spellID = 6346, + }, + + --- Turtling abilities + [GetSpellInfo(871)] = { -- Shield Wall + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 871, + }, + [GetSpellInfo(48707)] = { -- Anti-Magic Shell + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 48707, + }, + [GetSpellInfo(31224)] = { -- Cloak of Shadows + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 31224, + }, + [GetSpellInfo(19263)] = { -- Deterrence + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 19263, + }, + [GetSpellInfo(26669)] = { -- Evasion + track = AURA_TYPE_BUFF, + priority = 10, + spellID = 26669, + }, + + --- Immunities + [GetSpellInfo(34471)] = { -- The Beast Within + track = AURA_TYPE_BUFF, + priority = 20, + spellID = 34471, + }, + [GetSpellInfo(45438)] = { -- Ice Block + track = AURA_TYPE_BUFF, + priority = 30, + spellID = 45438, + }, + [GetSpellInfo(642)] = { -- Divine Shield + track = AURA_TYPE_BUFF, + priority = 30, + spellID = 642, + }, + + --- Alt Stuff + [GetSpellInfo(34709)] = { -- Shadowsight Buff + track = AURA_TYPE_BUFF, + duration = 15, + priority = 15, + magic = true, + spellID = 34709, + }, + [GetSpellInfo(8178)] = { -- Grounding Totem Effect + track = AURA_TYPE_BUFF, + duration = 0, + priority = 15, + spellID = 8178 + }, + [GetSpellInfo(5024)] = { -- Flee (Skull of impending Doom) -- 5024 + track = AURA_TYPE_BUFF, + priority = 15, + spellID = 5024, + altName = select(1, GetSpellInfo(5024)) .. " - " .. (select(1, GetItemInfo(4984)) or "Skull of Impending Doom"), + }, +} + +function Gladdy:GetImportantAuras() + return importantAuras +end + +local interrupts = { + [GetSpellInfo(19675)] = { duration = 4, spellID = 19675, track = AURA_TYPE_DEBUFF, texture = select(3, GetSpellInfo(19675)), priority = 15 }, -- Feral Charge Effect (Druid) + [GetSpellInfo(2139)] = { duration = 8, spellID = 2139, track = AURA_TYPE_DEBUFF, texture = select(3, GetSpellInfo(2139)), priority = 15 }, -- Counterspell (Mage) + [GetSpellInfo(1766)] = { duration = 5, spellID = 1766, track = AURA_TYPE_DEBUFF, texture = select(3, GetSpellInfo(1766)), priority = 15 }, -- Kick (Rogue) + [GetSpellInfo(6552)] = { duration = 4, spellID = 6552, track = AURA_TYPE_DEBUFF, texture = select(3, GetSpellInfo(6552)), priority = 15 }, -- Pummel (Warrior) + [GetSpellInfo(72)] = { duration = 6, spellID = 72, track = AURA_TYPE_DEBUFF, texture = select(3, GetSpellInfo(72)), priority = 15 }, -- Shield Bash (Warrior) + [GetSpellInfo(57994)] = { duration = 2, spellID = 57994, track = AURA_TYPE_DEBUFF, texture = select(3, GetSpellInfo(57994)), priority = 15 }, -- Wind Shear (Shaman) + [GetSpellInfo(19244)] = { duration = 5, spellID = 19244, track = AURA_TYPE_DEBUFF, texture = select(3, GetSpellInfo(19244)), priority = 15 }, -- Spell Lock (Warlock + [GetSpellInfo(47528)] = { duration = 5, spellID = 47528, track = AURA_TYPE_DEBUFF, texture = select(3, GetSpellInfo(47528)), priority = 15 }, -- Mind Freeze (Deathknight) +} +function Gladdy:GetInterrupts() + return interrupts +end + +local cooldownList = { + -- Spell Name Cooldown[, Spec] + -- Mage + ["MAGE"] = { + [1953] = 15, -- Blink + [42917] = 25, -- Frost Nova + [2139] = 24, -- Counterspell + [55342] = 180, -- Mirror Image + [12051] = 480, --Evocation + [45438] = { cd = 300, [L["Frost"]] = 240, }, -- Ice Block + [44572] = { cd = 30, spec = L["Frost"], }, -- Deep Freeze + [12472] = { cd = 180, spec = L["Frost"], }, -- Icy Veins + [31687] = { cd = 180, spec = L["Frost"], }, -- Summon Water Elemental + [12043] = { cd = 120, spec = L["Arcane"], }, -- Presence of Mind + [12042] = { cd = 180, spec = L["Arcane"], }, -- Arcane Power + [42950] = { cd = 20, spec = L["Fire"] }, -- Dragon's Breath + [11129] = { cd = 120, spec = L["Fire"] }, -- Combustion + [11958] = { cd = 480, spec = L["Frost"], -- Coldsnap + resetCD = { + [12472] = true, + [45438] = true, + [42917] = true, + [31687] = true, + [44572] = true, + }, + }, + }, + + -- Priest + ["PRIEST"] = { + [10890] = { cd = 27, [L["Shadow"]] = 23, }, -- Psychic Scream + [34433] = { cd = 300, [L["Shadow"]] = 180, }, -- Shadowfiend + [15487] = { cd = 45, spec = L["Shadow"], }, -- Silence + [64044] = { cd = 120, spec = L["Shadow"], }, -- Psychic Horror + [64843] = 480, -- Divine Hymn + [64901] = 360, -- Hymn of Hope + [32379] = 12, -- Shadow Word: Death + [6346] = 180, -- Fear Ward + [47585] = { cd = 75, spec = L["Shadow"], }, -- Dispersion (+ Glyph) + [10060] = { cd = 120, spec = L["Discipline"], }, -- Power Infusion + [33206] = { cd = 180, spec = L["Discipline"], }, -- Pain Suppression + }, + + -- Death Knight + ["DEATHKNIGHT"] = { + [47476] = 120, -- Strangulate + [47528] = 10, -- Mind Freeze + [48707] = 45, -- Anti-Magic Shell + [48792] = 120, -- Icebound Fortitude + [49576] = 35, -- Death Grip + [47568] = 300, -- Empower Rune Weapon + [48743] = 120, -- Death Pact + [49039] = 120, -- Lichborne + [47481] = { cd = 60, spec = L["Unholy"], }, -- Pet Gnaw + [51052] = { cd = 120, spec = L["Unholy"], }, -- Anti-Magic Zone + [46584] = { cd = 180, notSpec = L["Unholy"], }, -- Raise Dead + [49206] = { cd = 180, spec = L["Unholy"], }, -- Summon Gargoyle + [49028] = { cd = 90, spec = L["Blood"], }, -- Dancing Rune Weapon + [49203] = { cd = 60, spec = L["Frost"], }, -- Hungering Cold + }, + + -- Druid + ["DRUID"] = { + [22812] = 60, -- Barkskin + [29166] = 180, -- Innervate + [8983] = 60, -- Bash + [53312] = 60, -- Natures Grasp + [48505] = { cd = 90, spec = L["Balance"], }, -- Starfall + [50334] = { cd = 180, spec = L["Feral"], }, -- Berserk + [17116] = { cd = 120, spec = L["Restoration"], }, -- Natures Swiftness + [18562] = { cd = 15, spec = L["Restoration"], }, -- Swiftmend + [33831] = { cd = 180, spec = L["Balance"], }, -- Force of Nature + }, + + -- Shaman + ["SHAMAN"] = { + [57994] = 6, -- Wind Shear + [51514] = 45, -- Hex + [8177] = 15, -- Grounding Totem + [30823] = { cd = 60, spec = L["Enhancement"], }, -- Shamanistic Rage + [16166] = { cd = 180, spec = L["Elemental"], }, -- Elemental Mastery + [59159] = { cd = 45, spec = L["Elemental"], }, -- Thunderstorm + [16188] = { cd = 120, spec = L["Restoration"], }, -- Natures Swiftness + [51533] = { cd = 180, spec = L["Enhancement"], }, -- Feral Spirit + [16190] = { cd = 300, spec = L["Restoration"], }, -- Mana Tide Totem + }, + + -- Paladin + ["PALADIN"] = { + [10278] = 300, -- Hand of Protection + [1044] = 25, -- Hand of Freedom + [54428] = 60, -- Divine Plea + [6940] = 120, -- Hand of Sacrifice + [64205] = 120, -- Divine Sacrifice + [10308] = { cd = 60, [L["Protection"]] = 40, }, -- Hammer of Justice + [642] = { cd = 300, -- Divine Shield + sharedCD = { + cd = 30, + [31884] = true, + }, + }, + [31884] = { cd = 180, -- Avenging Wrath + sharedCD = { + cd = 30, + [642] = true, + }, + }, + [31821] = { cd = 120, spec = L["Holy"], }, -- Aura Mastery + [20066] = { cd = 60, spec = L["Retribution"], }, -- Repentance + [20216] = { cd = 120, spec = L["Holy"], }, -- Divine Favor + [31842] = { cd = 180, spec = L["Holy"], }, -- Divine Illumination + [31935] = { cd = 30, spec = L["Protection"], }, -- Avengers Shield + + }, + + -- Warlock + ["WARLOCK"] = { + [17928] = 40, -- Howl of Terror + [47860] = 120, -- Death Coil + [18708] = 180, -- Feldom + [47996] = { cd = 30, pet = true, }, -- Intercept + [48020] = 30, -- Demonic Circle: Port + [19647] = { cd = 24, pet = true, }, -- Spell Lock + [27277] = { cd = 8, pet = true, }, -- Devour Magic + [61290] = 15, -- Shadowflame + [47847] = { cd = 20, spec = L["Destruction"], }, -- Shadowfury + [17877] = { cd = 15, spec = L["Destruction"], }, -- Shadowburn + [17962] = { cd = 10, spec = L["Destruction"], }, -- Conflagrate + [59172] = { cd = 12, spec = L["Destruction"], }, -- Chaos Bolt + [47241] = { cd = 180, spec = L["Demonology"], }, -- Metamorphosis + [1122] = { cd = 600, spec = L["Demonology"], }, -- Inferno + }, + + -- Warrior + ["WARRIOR"] = { + [6552] = { cd = 10, -- Pummel + sharedCD = { + [72] = true, + }, + }, + [72] = { cd = 12, -- Shield Bash + sharedCD = { + [6552] = true, + }, + }, + [23920] = 10, -- Spell Reflection + [3411] = 30, -- Intervene + [676] = 60, -- Disarm + [5246] = 120, -- Intimidating Shout + [2565] = 60, -- Shield Block + [55694] = 180, -- Enraged Regeneration + [20230] = 300, -- Retaliation + [1719] = 300, -- Recklessness + [871] = 300, -- Shield Wall + [12292] = { cd = 180, spec = L["Fury"], }, -- Death Wish + [46924] = { cd = 90, spec = L["Arms"], }, -- Bladestorm + [46968] = { cd = 20, spec = L["Protection"], }, -- Shockwave + [12975] = { cd = 180, spec = L["Protection"], }, -- Last Stand + [12809] = { cd = 30, spec = L["Protection"], }, -- Concussion Blow + + }, + + -- Hunter + ["HUNTER"] = { + --[53548] = 28, -- Crab Prin + --[53562] = 40, -- Ravager Stun + + [19503] = 30, -- Scatter Shot + [19263] = 90, -- Deterrence + [781] = 15, -- Disengage + [5384] = 20, -- Feign Death + [3045] = 20, -- Rapid Fire + [60192] = { cd = 28, -- Freezing Arrow + sharedCD = { + [14311] = true, -- Freezing Trap + [13809] = true, -- Frost Trap + }, + }, + [14311] = { cd = 28, -- Freezing Trap + sharedCD = { + [60192] = true, -- Freezing Arrow + [13809] = true, -- Frost Trap + }, + }, + [13809] = { cd = 28, -- Frost Trap + sharedCD = { + [14311] = true, -- Freezing Trap + [60192] = true, -- Freezing Arrow + }, + }, + [34600] = { cd = 28, }, -- Snake Trap + [34490] = { cd = 20, spec = L["Marksmanship"], }, -- Silencing Shot + [19386] = { cd = 60, spec = L["Survival"], }, -- Wyvern Sting + [53271] = { cd = 60, pet = true, }, -- Masters Call + [19577] = { cd = 60, pet = true, }, -- Intimidation + [19574] = { cd = 120, pet = true, }, -- Bestial Wrath + [23989] = { cd = 180, -- Readiness + resetCD = { + [19503] = true, -- Scatter Shot + [19263] = true, -- Deterrence + [781] = true, -- Disengage + [60192] = true, -- Freezing Arrow + [14311] = true, -- Freezing Trap + [13809] = true, -- Frost Trap + [34600] = true, -- Snake Trap + [34490] = true, -- Silencing Shot + [19386] = true, -- Wyvern Sting + [53271] = true, -- Masters call + [19577] = true, -- Intimidation + }, + }, + }, + + -- Rogue + ["ROGUE"] = { + [1766] = 10, -- Kick + [8643] = 20, -- Kidney Shot + [26669] = 180, -- Evasion + [31224] = 90, -- Cloak of Shadow + [26889] = 180, -- Vanish + [2094] = 180, -- Blind + [51722] = 60, -- Dismantle + [11305] = 180, -- Sprint + [14177] = { cd = 180, spec = L["Assassination"], }, -- Cold Blood + [51713] = { cd = 60, spec = L["Subtlety"], }, -- Shadow Dance + [13750] = { cd = 180, spec = L["Combat"], }, -- Adrenaline Rush + [13877] = { cd = 120, spec = L["Combat"], }, -- Blade Flurry + [51690] = { cd = 120, spec = L["Combat"], }, -- Killing Spree + [36554] = { cd = 30, spec = L["Subtlety"], }, -- Shadowstep + [14185] = { cd = 480, spec = L["Subtlety"], -- Preparation + resetCD = { + [26669] = true, + [11305] = true, + [26889] = true, + [14177] = true, + [36554] = true, + }, + }, + }, + ["Scourge"] = { + + }, + ["BloodElf"] = { + + }, + ["Tauren"] = { + + }, + ["Orc"] = { + + }, + ["Troll"] = { + + }, + ["NightElf"] = { + + }, + ["Draenei"] = { + + }, + ["Human"] = { + + }, + ["Gnome"] = { + }, + ["Dwarf"] = { + + }, +} +function Gladdy:GetCooldownList() + return cooldownList +end + +local racials = { + ["Scourge"] = { + [7744] = true, -- Will of the Forsaken + duration = 120, + spellName = select(1, GetSpellInfo(7744)), + texture = select(3, GetSpellInfo(7744)) + }, + ["BloodElf"] = { + [28730] = true, -- Arcane Torrent + duration = 120, + spellName = select(1, GetSpellInfo(28730)), + texture = select(3, GetSpellInfo(28730)) + }, + ["Tauren"] = { + [20549] = true, -- War Stomp + duration = 120, + spellName = select(1, GetSpellInfo(20549)), + texture = select(3, GetSpellInfo(20549)) + }, + ["Orc"] = { + [20572] = true, + [33697] = true, + [33702] = true, + duration = 120, + spellName = select(1, GetSpellInfo(20572)), + texture = select(3, GetSpellInfo(20572)) + }, + ["Troll"] = { + [26297] = true, + duration = 180, + spellName = select(1, GetSpellInfo(26297)), + texture = select(3, GetSpellInfo(26297)) + }, + ["NightElf"] = { + [58984] = true, + duration = 120, + spellName = select(1, GetSpellInfo(58984)), + texture = select(3, GetSpellInfo(58984)) + }, + ["Draenei"] = { + [28880] = true, + duration = 180, + spellName = select(1, GetSpellInfo(28880)), + texture = select(3, GetSpellInfo(28880)) + }, + ["Human"] = { + [59752] = true, -- Perception + duration = 120, + spellName = select(1, GetSpellInfo(59752)), + texture = select(3, GetSpellInfo(59752)) + }, + ["Gnome"] = { + [20589] = true, -- Escape Artist + duration = 105, + spellName = select(1, GetSpellInfo(20589)), + texture = select(3, GetSpellInfo(20589)) + }, + ["Dwarf"] = { + [20594] = true, -- Stoneform + duration = 180, + spellName = select(1, GetSpellInfo(20594)), + texture = select(3, GetSpellInfo(20594)) + }, +} +function Gladdy:Racials() + return racials +end + + +--------------------- +-- TOTEM STUFF +--------------------- + +local totemData = { + -- Fire + [string_lower("Searing Totem")] = { id = 3599, texture = select(3, GetSpellInfo(3599)), color = { r = 0, g = 0, b = 0, a = 1 } }, + [string_lower("Flametongue Totem")] = { id = 8227, texture = select(3, GetSpellInfo(8227)), color = { r = 0, g = 0, b = 0, a = 1 } }, + [string_lower("Magma Totem")] = { id = 8190, texture = select(3, GetSpellInfo(8190)), color = { r = 0, g = 0, b = 0, a = 1 }, pulse = 2 }, + [string_lower("Fire Nova Totem")] = { id = 1535, texture = select(3, GetSpellInfo(1535)), color = { r = 0, g = 0, b = 0, a = 1 }, pulse = { cd = 4, once = true } }, + [string_lower("Totem of Wrath")] = { id = 30706, texture = select(3, GetSpellInfo(30706)), color = { r = 0, g = 0, b = 0, a = 1 } }, + [string_lower("Fire Elemental Totem")] = { id = 32982, texture = select(3, GetSpellInfo(32982)), color = { r = 0, g = 0, b = 0, a = 1 } }, + [string_lower("Frost Resistance Totem")] = { id = 8181, texture = select(3, GetSpellInfo(8181)), color = { r = 0, g = 0, b = 0, a = 1 } }, + [string_lower("Totem of Wrath")] = { id = 30706, texture = select(3, GetSpellInfo(30706)), color = { r = 0, g = 0, b = 0, a = 1 } }, + -- Water + [string_lower("Fire Resistance Totem")] = { id = 8184, texture = select(3, GetSpellInfo(8184)), color = { r = 0, g = 0, b = 0, a = 1 } }, + [string_lower("Disease Cleansing Totem")] = { id = 8170, texture = select(3, GetSpellInfo(8170)), color = { r = 0, g = 0, b = 0, a = 1 }, pulse = 5 }, + [string_lower("Healing Stream Totem")] = { id = 5394, texture = select(3, GetSpellInfo(5394)), color = { r = 0, g = 0, b = 0, a = 1 }, pulse = 2 }, + [string_lower("Mana Tide Totem")] = { id = 16190, texture = select(3, GetSpellInfo(16190)), color = { r = 0.078, g = 0.9, b = 0.16, a = 1 } }, + [string_lower("Mana Spring Totem")] = { id = 5675, texture = select(3, GetSpellInfo(5675)), color = { r = 0, g = 0, b = 0, a = 1 }, pulse = 2 }, + -- Earth + [string_lower("Earthbind Totem")] = { id = 2484, texture = select(3, GetSpellInfo(2484)), color = { r = 0.5, g = 0.5, b = 0.5, a = 1 }, pulse = 3 }, + [string_lower("Stoneclaw Totem")] = { id = 5730, texture = select(3, GetSpellInfo(5730)), color = { r = 0, g = 0, b = 0, a = 1 }, pulse = 2 }, + [string_lower("Stoneskin Totem")] = { id = 8071, texture = select(3, GetSpellInfo(8071)), color = { r = 0, g = 0, b = 0, a = 1 } }, + [string_lower("Strength of Earth Totem")] = { id = 8075, texture = select(3, GetSpellInfo(8075)), color = { r = 0, g = 0, b = 0, a = 1 } }, + [string_lower("Earth Elemental Totem")] = { id = 33663, texture = select(3, GetSpellInfo(33663)), color = { r = 0, g = 0, b = 0, a = 1 } }, + [string_lower("Tremor Totem")] = { id = 8143, texture = select(3, GetSpellInfo(8143)), color = { r = 1, g = 0.9, b = 0.1, a = 1 }, pulse = 3 }, + -- Air + [string_lower("Grounding Totem")] = { id = 8177, texture = select(3, GetSpellInfo(8177)), color = { r = 0, g = 0.53, b = 0.92, a = 1 } }, + [string_lower("Nature Resistance Totem")] = { id = 10595, texture = select(3, GetSpellInfo(10595)), color = { r = 0, g = 0, b = 0, a = 1 } }, + [string_lower("Windfury Totem")] = { id = 8512, texture = select(3, GetSpellInfo(8512)), color = { r = 0.96, g = 0, b = 0.07, a = 1 } }, + [string_lower("Sentry Totem")] = { id = 6495, texture = select(3, GetSpellInfo(6495)), color = { r = 0, g = 0, b = 0, a = 1 } }, + [string_lower("Wrath of Air Totem")] = { id = 3738, texture = select(3, GetSpellInfo(3738)), color = { r = 0, g = 0, b = 0, a = 1 } }, +} + +local totemSpellIdToPulse = { + [GetSpellInfo(totemData[string_lower("Earthbind Totem")].id)] = totemData[string_lower("Earthbind Totem")].pulse, + [2484] = totemData[string_lower("Earthbind Totem")].pulse, + [GetSpellInfo(totemData[string_lower("Tremor Totem")].id)] = totemData[string_lower("Tremor Totem")].pulse, + [8143] = totemData[string_lower("Tremor Totem")].pulse, + --[GetSpellInfo(totemData[string_lower("Poison Cleansing Totem")].id)] = totemData[string_lower("Poison Cleansing Totem")].pulse, + --[8166] = totemData[string_lower("Poison Cleansing Totem")].pulse, + [GetSpellInfo(totemData[string_lower("Disease Cleansing Totem")].id)] = totemData[string_lower("Disease Cleansing Totem")].pulse, + [8170] = totemData[string_lower("Disease Cleansing Totem")].pulse, + [GetSpellInfo(totemData[string_lower("Fire Nova Totem")].id)] = totemData[string_lower("Fire Nova Totem")].pulse, + [1535] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 1 + [8498] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 2 + [8499] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 3 + [11314] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 4 + [11315] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 5 + [25546] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 6 + [25547] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 7 + [GetSpellInfo(totemData[string_lower("Magma Totem")].id)] = totemData[string_lower("Magma Totem")].pulse, + [8190] = totemData[string_lower("Magma Totem")].pulse, -- Rank 1 + [10585] = totemData[string_lower("Magma Totem")].pulse, -- Rank 2 + [10586] = totemData[string_lower("Magma Totem")].pulse, -- Rank 3 + [10587] = totemData[string_lower("Magma Totem")].pulse, -- Rank 4 + [25552] = totemData[string_lower("Magma Totem")].pulse, -- Rank 5 + [GetSpellInfo(totemData[string_lower("Healing Stream Totem")].id)] = totemData[string_lower("Healing Stream Totem")].pulse, + [5394] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 1 + [6375] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 2 + [6377] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 3 + [10462] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 4 + [10463] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 5 + [25567] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 6 + [GetSpellInfo(totemData[string_lower("Mana Spring Totem")].id)] = totemData[string_lower("Mana Spring Totem")].pulse, + [5675] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 1 + [10495] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 2 + [10496] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 3 + [10497] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 4 + [25570] = totemData[string_lower("Mana Spring Totem")].pulse, -- Rank 5 + [GetSpellInfo(totemData[string_lower("Stoneclaw Totem")].id)] = totemData[string_lower("Stoneclaw Totem")].pulse, + [5730] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 1 + [6390] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 2 + [6391] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 3 + [6392] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 4 + [10427] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 5 + [10428] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 6 + [25525] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 7 +} + +local totemNpcIdsToTotemData = { + --fire + [2523] = totemData[string_lower("Searing Totem")], + [3902] = totemData[string_lower("Searing Totem")], + [3903] = totemData[string_lower("Searing Totem")], + [3904] = totemData[string_lower("Searing Totem")], + [7400] = totemData[string_lower("Searing Totem")], + [7402] = totemData[string_lower("Searing Totem")], + [15480] = totemData[string_lower("Searing Totem")], + [31162] = totemData[string_lower("Searing Totem")], + [31164] = totemData[string_lower("Searing Totem")], + [31165] = totemData[string_lower("Searing Totem")], + [21995] = totemData[string_lower("Searing Totem")], + [22209] = totemData[string_lower("Searing Totem")], + [22895] = totemData[string_lower("Searing Totem")], + [22896] = totemData[string_lower("Searing Totem")], + [34687] = totemData[string_lower("Searing Totem")], + [36532] = totemData[string_lower("Searing Totem")], + [43423] = totemData[string_lower("Searing Totem")], + [67380] = totemData[string_lower("Searing Totem")], + [73477] = totemData[string_lower("Searing Totem")], + [79238] = totemData[string_lower("Searing Totem")], + [22896] = totemData[string_lower("Searing Totem")], + [84519] = totemData[string_lower("Searing Totem")], + [110730] = totemData[string_lower("Searing Totem")], + [132178] = totemData[string_lower("Searing Totem")], + [9637] = totemData[string_lower("Searing Totem")], + + [5950] = totemData[string_lower("Flametongue Totem")], + [6012] = totemData[string_lower("Flametongue Totem")], + [7423] = totemData[string_lower("Flametongue Totem")], + [10557] = totemData[string_lower("Flametongue Totem")], + [15485] = totemData[string_lower("Flametongue Totem")], + [31132] = totemData[string_lower("Flametongue Totem")], + [31133] = totemData[string_lower("Flametongue Totem")], + [31158] = totemData[string_lower("Flametongue Totem")], + [42605] = totemData[string_lower("Flametongue Totem")], + + [5929] = totemData[string_lower("Magma Totem")], + [7464] = totemData[string_lower("Magma Totem")], + [7465] = totemData[string_lower("Magma Totem")], + [7466] = totemData[string_lower("Magma Totem")], + [15484] = totemData[string_lower("Magma Totem")], + [31166] = totemData[string_lower("Magma Totem")], + [31167] = totemData[string_lower("Magma Totem")], + [32887] = totemData[string_lower("Magma Totem")], + [42211] = totemData[string_lower("Magma Totem")], + [71335] = totemData[string_lower("Magma Totem")], + [71925] = totemData[string_lower("Magma Totem")], + [73085] = totemData[string_lower("Magma Totem")], + [73093] = totemData[string_lower("Magma Totem")], + [73268] = totemData[string_lower("Magma Totem")], + [88971] = totemData[string_lower("Magma Totem")], + [97369] = totemData[string_lower("Magma Totem")], + [98676] = totemData[string_lower("Magma Totem")], + + [5879] = totemData[string_lower("Fire Nova Totem")], + [6110] = totemData[string_lower("Fire Nova Totem")], + [6111] = totemData[string_lower("Fire Nova Totem")], + [7844] = totemData[string_lower("Fire Nova Totem")], + [7845] = totemData[string_lower("Fire Nova Totem")], + [14662] = totemData[string_lower("Fire Nova Totem")], + [15482] = totemData[string_lower("Fire Nova Totem")], + [15483] = totemData[string_lower("Fire Nova Totem")], + [24320] = totemData[string_lower("Fire Nova Totem")], + [32775] = totemData[string_lower("Fire Nova Totem")], + [32776] = totemData[string_lower("Fire Nova Totem")], + + [17539] = totemData[string_lower("Totem of Wrath")], + [22970] = totemData[string_lower("Totem of Wrath")], + [22971] = totemData[string_lower("Totem of Wrath")], + [30652] = totemData[string_lower("Totem of Wrath")], + [30653] = totemData[string_lower("Totem of Wrath")], + [30654] = totemData[string_lower("Totem of Wrath")], + + [15439] = totemData[string_lower("Fire Elemental Totem")], + [40830] = totemData[string_lower("Fire Elemental Totem")], + [41337] = totemData[string_lower("Fire Elemental Totem")], + [41346] = totemData[string_lower("Fire Elemental Totem")], + [72301] = totemData[string_lower("Fire Elemental Totem")], + + [5926] = totemData[string_lower("Frost Resistance Totem")], + [7412] = totemData[string_lower("Frost Resistance Totem")], + [7413] = totemData[string_lower("Frost Resistance Totem")], + [15486] = totemData[string_lower("Frost Resistance Totem")], + [31171] = totemData[string_lower("Frost Resistance Totem")], + [31172] = totemData[string_lower("Frost Resistance Totem")], + + -- Water + [5927] = totemData[string_lower("Fire Resistance Totem")], + [7424] = totemData[string_lower("Fire Resistance Totem")], + [7425] = totemData[string_lower("Fire Resistance Totem")], + [15487] = totemData[string_lower("Fire Resistance Totem")], + [31169] = totemData[string_lower("Fire Resistance Totem")], + [31170] = totemData[string_lower("Fire Resistance Totem")], + + + [5924] = totemData[string_lower("Disease Cleansing Totem")], + + [3527] = totemData[string_lower("Healing Stream Totem")], + [3906] = totemData[string_lower("Healing Stream Totem")], + [3907] = totemData[string_lower("Healing Stream Totem")], + [3908] = totemData[string_lower("Healing Stream Totem")], + [3909] = totemData[string_lower("Healing Stream Totem")], + [14664] = totemData[string_lower("Healing Stream Totem")], + [15488] = totemData[string_lower("Healing Stream Totem")], + [18235] = totemData[string_lower("Healing Stream Totem")], + [31181] = totemData[string_lower("Healing Stream Totem")], + [31182] = totemData[string_lower("Healing Stream Totem")], + [31185] = totemData[string_lower("Healing Stream Totem")], + [34686] = totemData[string_lower("Healing Stream Totem")], + [36542] = totemData[string_lower("Healing Stream Totem")], + [37810] = totemData[string_lower("Healing Stream Totem")], + [38428] = totemData[string_lower("Healing Stream Totem")], + [47077] = totemData[string_lower("Healing Stream Totem")], + [72309] = totemData[string_lower("Healing Stream Totem")], + [72457] = totemData[string_lower("Healing Stream Totem")], + [73890] = totemData[string_lower("Healing Stream Totem")], + [74433] = totemData[string_lower("Healing Stream Totem")], + [97508] = totemData[string_lower("Healing Stream Totem")], + [112567] = totemData[string_lower("Healing Stream Totem")], + [120357] = totemData[string_lower("Healing Stream Totem")], + [128539] = totemData[string_lower("Healing Stream Totem")], + [132049] = totemData[string_lower("Healing Stream Totem")], + + [10467] = totemData[string_lower("Mana Tide Totem")], + [11100] = totemData[string_lower("Mana Tide Totem")], + [11101] = totemData[string_lower("Mana Tide Totem")], + [17061] = totemData[string_lower("Mana Tide Totem")], + + [3573] = totemData[string_lower("Mana Spring Totem")], + [7414] = totemData[string_lower("Mana Spring Totem")], + [7415] = totemData[string_lower("Mana Spring Totem")], + [7416] = totemData[string_lower("Mana Spring Totem")], + [15304] = totemData[string_lower("Mana Spring Totem")], + [15489] = totemData[string_lower("Mana Spring Totem")], + [31186] = totemData[string_lower("Mana Spring Totem")], + [31189] = totemData[string_lower("Mana Spring Totem")], + [31190] = totemData[string_lower("Mana Spring Totem")], + + -- Earth + [2630] = totemData[string_lower("Earthbind Totem")], + [22486] = totemData[string_lower("Earthbind Totem")], + [40233] = totemData[string_lower("Earthbind Totem")], + [74737] = totemData[string_lower("Earthbind Totem")], + [79155] = totemData[string_lower("Earthbind Totem")], + + [3579] = totemData[string_lower("Stoneclaw Totem")], + [3911] = totemData[string_lower("Stoneclaw Totem")], + [3912] = totemData[string_lower("Stoneclaw Totem")], + [3913] = totemData[string_lower("Stoneclaw Totem")], + [7398] = totemData[string_lower("Stoneclaw Totem")], + [7399] = totemData[string_lower("Stoneclaw Totem")], + [14870] = totemData[string_lower("Stoneclaw Totem")], + [15478] = totemData[string_lower("Stoneclaw Totem")], + [31120] = totemData[string_lower("Stoneclaw Totem")], + [31121] = totemData[string_lower("Stoneclaw Totem")], + [31122] = totemData[string_lower("Stoneclaw Totem")], + [40258] = totemData[string_lower("Stoneclaw Totem")], + [102402] = totemData[string_lower("Stoneclaw Totem")], + + [5873] = totemData[string_lower("Stoneskin Totem")], + [5919] = totemData[string_lower("Stoneskin Totem")], + [5920] = totemData[string_lower("Stoneskin Totem")], + [7366] = totemData[string_lower("Stoneskin Totem")], + [7367] = totemData[string_lower("Stoneskin Totem")], + [7368] = totemData[string_lower("Stoneskin Totem")], + [14663] = totemData[string_lower("Stoneskin Totem")], + [15470] = totemData[string_lower("Stoneskin Totem")], + [15474] = totemData[string_lower("Stoneskin Totem")], + [18177] = totemData[string_lower("Stoneskin Totem")], + [21994] = totemData[string_lower("Stoneskin Totem")], + [31175] = totemData[string_lower("Stoneskin Totem")], + [31176] = totemData[string_lower("Stoneskin Totem")], + [36550] = totemData[string_lower("Stoneskin Totem")], + [40267] = totemData[string_lower("Stoneskin Totem")], + [41967] = totemData[string_lower("Stoneskin Totem")], + + [5874] = totemData[string_lower("Strength of Earth Totem")], + [5921] = totemData[string_lower("Strength of Earth Totem")], + [5922] = totemData[string_lower("Strength of Earth Totem")], + [7403] = totemData[string_lower("Strength of Earth Totem")], + [15464] = totemData[string_lower("Strength of Earth Totem")], + [15479] = totemData[string_lower("Strength of Earth Totem")], + [21992] = totemData[string_lower("Strength of Earth Totem")], + [30647] = totemData[string_lower("Strength of Earth Totem")], + [31129] = totemData[string_lower("Strength of Earth Totem")], + [40266] = totemData[string_lower("Strength of Earth Totem")], + + [15430] = totemData[string_lower("Earth Elemental Totem")], + [24649] = totemData[string_lower("Earth Elemental Totem")], + [39387] = totemData[string_lower("Earth Elemental Totem")], + [40247] = totemData[string_lower("Earth Elemental Totem")], + [72307] = totemData[string_lower("Earth Elemental Totem")], + + [5913] = totemData[string_lower("Tremor Totem")], + [41938] = totemData[string_lower("Tremor Totem")], + [41939] = totemData[string_lower("Tremor Totem")], + + -- Air + [5925] = totemData[string_lower("Grounding Totem")], + [128537] = totemData[string_lower("Grounding Totem")], + [136251] = totemData[string_lower("Grounding Totem")], + + [7467] = totemData[string_lower("Nature Resistance Totem")], + [7468] = totemData[string_lower("Nature Resistance Totem")], + [7469] = totemData[string_lower("Nature Resistance Totem")], + [15490] = totemData[string_lower("Nature Resistance Totem")], + [31173] = totemData[string_lower("Nature Resistance Totem")], + [31174] = totemData[string_lower("Nature Resistance Totem")], + + [6112] = totemData[string_lower("Windfury Totem")], + [7483] = totemData[string_lower("Windfury Totem")], + [7484] = totemData[string_lower("Windfury Totem")], + [14666] = totemData[string_lower("Windfury Totem")], + [15496] = totemData[string_lower("Windfury Totem")], + [15497] = totemData[string_lower("Windfury Totem")], + [22897] = totemData[string_lower("Windfury Totem")], + [41940] = totemData[string_lower("Windfury Totem")], + [41941] = totemData[string_lower("Windfury Totem")], + [80703] = totemData[string_lower("Windfury Totem")], + [105690] = totemData[string_lower("Windfury Totem")], + [133684] = totemData[string_lower("Windfury Totem")], + + [3968] = totemData[string_lower("Sentry Totem")], + [28938] = totemData[string_lower("Sentry Totem")], + [40187] = totemData[string_lower("Sentry Totem")], + [69505] = totemData[string_lower("Sentry Totem")], + [70413] = totemData[string_lower("Sentry Totem")], + [71145] = totemData[string_lower("Sentry Totem")], + [147410] = totemData[string_lower("Sentry Totem")], + + [15447] = totemData[string_lower("Wrath of Air Totem")], + [36556] = totemData[string_lower("Wrath of Air Totem")], +} + +function Gladdy:GetTotemData() + return totemData, totemNpcIdsToTotemData, totemSpellIdToPulse +end diff --git a/Constants_shared.lua b/Constants_shared.lua new file mode 100644 index 0000000..1c7a6b3 --- /dev/null +++ b/Constants_shared.lua @@ -0,0 +1,274 @@ +local tbl_sort, select, string_lower = table.sort, select, string.lower +local GetLocale = GetLocale + +local Gladdy = LibStub("Gladdy") +local L = Gladdy.L + +Gladdy.RACES = {"Scourge", "BloodElf", "Tauren", "Orc", "Troll", "NightElf", "Draenei", "Human", "Gnome", "Dwarf"} +tbl_sort(Gladdy.RACES) + +local RACE_ICON_TCOORDS = { + ["HUMAN_MALE"] = { 0, 0.125, 0, 0.25 }, + ["DWARF_MALE"] = { 0.125, 0.25, 0, 0.25 }, + ["GNOME_MALE"] = { 0.25, 0.375, 0, 0.25 }, + ["NIGHTELF_MALE"] = { 0.375, 0.5, 0, 0.25 }, + + ["TAUREN_MALE"] = { 0, 0.125, 0.25, 0.5 }, + ["SCOURGE_MALE"] = { 0.125, 0.25, 0.25, 0.5 }, + ["TROLL_MALE"] = { 0.25, 0.375, 0.25, 0.5 }, + ["ORC_MALE"] = { 0.375, 0.5, 0.25, 0.5 }, + + ["HUMAN_FEMALE"] = { 0, 0.125, 0.5, 0.75 }, + ["DWARF_FEMALE"] = { 0.125, 0.25, 0.5, 0.75 }, + ["GNOME_FEMALE"] = { 0.25, 0.375, 0.5, 0.75 }, + ["NIGHTELF_FEMALE"] = { 0.375, 0.5, 0.5, 0.75 }, + + ["TAUREN_FEMALE"] = { 0, 0.125, 0.75, 1.0 }, + ["SCOURGE_FEMALE"] = { 0.125, 0.25, 0.75, 1.0 }, + ["TROLL_FEMALE"] = { 0.25, 0.375, 0.75, 1.0 }, + ["ORC_FEMALE"] = { 0.375, 0.5, 0.75, 1.0 }, + + ["BLOODELF_MALE"] = { 0.5, 0.625, 0.25, 0.5 }, + ["BLOODELF_FEMALE"] = { 0.5, 0.625, 0.75, 1.0 }, + + ["DRAENEI_MALE"] = { 0.5, 0.625, 0, 0.25 }, + ["DRAENEI_FEMALE"] = { 0.5, 0.625, 0.5, 0.75 }, +} + +local arenaTimer = { + ["default"] = { + [60] = "One minute until the Arena battle begins!", + [30] = "Thirty seconds until the Arena battle begins!", + [15] = "Fifteen seconds until the Arena battle begins!", + [0] = "The Arena battle has begun!", + }, + ["esES"] = { + [60] = "¡Un minuto hasta que dé comienzo la batalla en arena!", + [30] = "¡Treinta segundos hasta que comience la batalla en arena!", + [15] = "¡Quince segundos hasta que comience la batalla en arena!", + [0] = "¡La batalla en arena ha comenzado!", + }, + ["ptBR"] = { + [60] = "Um minuto até a batalha na Arena começar!", + [30] = "Trinta segundos até a batalha na Arena começar!", + [15] = "Quinze segundos até a batalha na Arena começar!", + [0] = "A batalha na Arena começou!", + }, + ["deDE"] = { + [60] = "Noch eine Minute bis der Arenakampf beginnt!", + [30] = "Noch dreißig Sekunden bis der Arenakampf beginnt!", + [15] = "Noch fünfzehn Sekunden bis der Arenakampf beginnt!", + [0] = "Der Arenakampf hat begonnen!", + }, + ["frFR"] = { + [60] = "Le combat d'arène commence dans une minute\194\160!", + [30] = "Le combat d'arène commence dans trente secondes\194\160!", + [15] = "Le combat d'arène commence dans quinze secondes\194\160!", + [0] = "Le combat d'arène commence\194\160!", + }, + ["ruRU"] = { + [60] = "Одна минута до начала боя на арене!", + [30] = "Тридцать секунд до начала боя на арене!", + [15] = "До начала боя на арене осталось 15 секунд.", + [0] = "Бой начался!", + }, + ["itIT"] = { -- TODO + -- Beta has no itIT version available? + }, + ["koKR"] = { + [60] = "투기장 전투 시작 1분 전입니다!", + [30] = "투기장 전투 시작 30초 전입니다!", + [15] = "투기장 전투 시작 15초 전입니다!", + [0] = "투기장 전투가 시작되었습니다!", + }, + ["zhCN"] = { + [60] = "竞技场战斗将在一分钟后开始!", + [30] = "竞技场战斗将在三十秒后开始!", + [15] = "竞技场战斗将在十五秒后开始!", + [0] = "竞技场的战斗开始了!", + }, + ["zhTW"] = { + [60] = "1分鐘後競技場戰鬥開始!", + [30] = "30秒後競技場戰鬥開始!", + [15] = "15秒後競技場戰鬥開始!", + [0] = "競技場戰鬥開始了!", + }, +} +arenaTimer["esMX"] = arenaTimer["esES"] +arenaTimer["ptPT"] = arenaTimer["ptBR"] + +function Gladdy:GetArenaTimer() + if arenaTimer[GetLocale()] then + return arenaTimer[GetLocale()] + else + return arenaTimer["default"] + end +end + +Gladdy.legacy = { + castBarPos = "LEFT", + buffsCooldownPos = "TOP", + buffsBuffsCooldownPos = "BOTTOM", + classIconPos = "LEFT", + ciAnchor = "healthBar", + ciPos = "TOP", + cooldownYPos = "TOP", + cooldownXPos = "LEFT", + drCooldownPos = "RIGHT", + racialAnchor = "trinket", + racialPos = "RIGHT", + trinketPos = "RIGHT", + padding = 1, + growUp = false, +} + +Gladdy.newDefaults = { + ["bottomMargin"] = 94.99996948242188, + ["newLayout"] = true, + Pets = { + ["petYOffset"] = -81.99993896484375, + ["petXOffset"] = 181, + }, + ClassIcon = { + ["classIconXOffset"] = -74.90008544921875, + }, + Racial = { + ["racialXOffset"] = 255.9000244140625, + }, + Trinket = { + ["trinketXOffset"] = 182, + }, + ["Combat Indicator"] = { + ["ciXOffset"] = 79.99993896484375, + ["ciYOffset"] = -10.99993896484375, + }, + Cooldowns = { + ["cooldownYOffset"] = 31, + }, + ["Buffs and Debuffs"] = { + ["buffsBuffsXOffset"] = 29, + ["buffsBuffsYOffset"] = -82.99993896484375, + ["buffsXOffset"] = 29, + ["buffsYOffset"] = 62.00006103515625, + }, + Diminishings = { + ["drXOffset"] = 329.7999877929688, + ["drYOffset"] = -22.5, + }, + ["Cast Bar"] = { + ["castBarXOffset"] = -235.900146484375, + ["castBarYOffset"] = -30.5, + }, +} + +Gladdy.frameStrata = { + BACKGROUND = L["Background"] .. "(0)", + LOW = L["Low"] .. "(1)", + MEDIUM = L["Medium"] .. "(2)", + HIGH = L["High"] .. "(3)", + DIALOG = L["Dialog"] .. "(4)", + FULLSCREEN = L["Fullscreen"] .. "(5)", + FULLSCREEN_DIALOG = L["Fullscreen Dialog"] .. "(6)", + TOOLTIP = L["Tooltip"] .. "(7)", +} + +Gladdy.frameStrataSorting = { + [1] = "BACKGROUND", + [2] = "LOW", + [3] = "MEDIUM", + [4] = "HIGH", + [5] = "DIALOG", + [6] = "FULLSCREEN", + [7] = "FULLSCREEN_DIALOG", + [8] = "TOOLTIP", +} + +local auraTypeColor = {} +auraTypeColor["none"] = { r = 0.80, g = 0, b = 0, a = 1 } +auraTypeColor["magic"] = { r = 0.20, g = 0.60, b = 1.00, a = 1 } +auraTypeColor["curse"] = { r = 0.60, g = 0.00, b = 1.00, a = 1 } +auraTypeColor["disease"] = { r = 0.60, g = 0.40, b = 0, a = 1 } +auraTypeColor["poison"] = { r = 0.00, g = 0.60, b = 0, a = 1 } +auraTypeColor["immune"] = { r = 1.00, g = 0.02, b = 0.99, a = 1 } +auraTypeColor["form"] = auraTypeColor["none"] +auraTypeColor["aura"] = auraTypeColor["none"] +auraTypeColor[""] = auraTypeColor["none"] + +function Gladdy:GetAuraTypeColor() + return auraTypeColor +end + +local spellSchoolColors = {} +spellSchoolColors[1] = { r = 1, g = 1, b = 0, a = 1, type = "Physical" } --- "physical" 255, 255, 0 +spellSchoolColors[2] = { r = 1, g = 0.901, b = 0.501, a = 1, type = "Holy" } ---"holy" -- 255, 230, 128 +spellSchoolColors[4] = { r = 1, g = 0.501, b = 0, a = 1, type = "Fire" } ---"fire" -- 255, 128, 0 +spellSchoolColors[8] = { r = 0.302, g = 1, b = 0.302, a = 1, type = "Nature" } ---"nature" -- 77, 255, 77 +spellSchoolColors[16] = { r = 0.501, g = 1, b = 1, a = 1, type = "Frost" } ---"frost" -- 128, 255, 255 +spellSchoolColors[32] = { r = 0.501, g = 0.501, b = 1, a = 1, type = "Shadow" } ---"shadow" --128, 128, 255 +spellSchoolColors[64] = { r = 1, g = 0.501, b = 1, a = 1, type = "Arcane" } ---"arcane" -- 255, 128, 255 +spellSchoolColors["unknown"] = { r = 0, g = 0, b = 0, a = 1, type = "Unknown" } ---"unknown spell school" + +function Gladdy:GetSpellSchoolColors() + return spellSchoolColors +end + +--------------------- +-- TRINKET STUFF +--------------------- + +local pvpTrinkets = { -- [itemID] = cd in ms + --wotlk + [59752] = 120000, + [51377] = 120000, + [51378] = 120000, + [46083] = 120000, + [46085] = 120000, + [46081] = 120000, + [46084] = 120000, + [46082] = 120000, + [42122] = 120000, + [42123] = 120000, + --tbc + [37864] = 120000, + [37865] = 120000, + [28235] = 120000, + [30348] = 120000, + [28238] = 120000, + [30351] = 120000, + [28236] = 120000, + [30349] = 120000, + [28234] = 120000, + [28237] = 120000, + [30350] = 120000, + [28240] = 120000, + [28243] = 120000, + [30345] = 120000, + [28241] = 120000, + [30343] = 120000, + [28239] = 120000, + [30346] = 120000, + [28242] = 120000, + [30344] = 120000, + [29593] = 120000, + [29593] = 300000, + [18859] = 300000, + [18857] = 300000, + [18864] = 300000, + [18854] = 300000, + [18862] = 300000, + [18858] = 300000, + [18856] = 300000, + [18863] = 300000, + [18834] = 300000, + [18851] = 300000, + [18845] = 300000, + [18852] = 300000, + [29592] = 300000, + [18850] = 300000, + [18846] = 300000, + [18853] = 300000, +} + +function Gladdy:GetPvpTrinkets() + return pvpTrinkets +end \ No newline at end of file diff --git a/Gladdy.toc b/Gladdy_BCC.toc similarity index 94% rename from Gladdy.toc rename to Gladdy_BCC.toc index a9c4720..8a1068e 100644 --- a/Gladdy.toc +++ b/Gladdy_BCC.toc @@ -1,6 +1,6 @@ ## Interface: 20504 ## Title: Gladdy - TBC -## Version: 2.11-Release +## Version: 2.2-Beta ## Notes: The most powerful arena AddOn for WoW 2.5.4 ## Author: XiconQoo, DnB_Junkee, Knall ## X-Email: contact me on discord Knall#1751 @@ -13,7 +13,8 @@ Gladdy.lua Lang.lua Frame.lua Options.lua -Constants.lua +Constants_shared.lua +Constants_BCC.lua ImportStrings.lua Util.lua diff --git a/Gladdy_Wrath.toc b/Gladdy_Wrath.toc new file mode 100644 index 0000000..57962c5 --- /dev/null +++ b/Gladdy_Wrath.toc @@ -0,0 +1,44 @@ +## Interface: 30400 +## Title: Gladdy - WotLK +## Version: 2.2-Beta +## Notes: The most powerful arena AddOn for WoW 3.4.0 +## Author: XiconQoo, DnB_Junkee, Knall +## X-Email: contact me on discord Knall#1751 +## SavedVariables: GladdyXZ +## OptionalDeps: SharedMedia, Blizzard_CombatLog, Blizzard_ArenaUI, Blizzard_CombatText, Plater, Kui_Nameplates, NeatPlates, TidyPlates_ThreatPlates, Tukui, ElvUI + +embeds.xml + +Gladdy.lua +Lang.lua +Frame.lua +Options.lua +Constants_shared.lua +Constants_Wrath.lua +ImportStrings.lua +Util.lua + +Modules\Announcements.lua +Modules\Healthbar.lua +Modules\Powerbar.lua +Modules\Auras.lua +Modules\Castbar.lua +Modules\Classicon.lua +Modules\Clicks.lua +Modules\Diminishings.lua +Modules\Highlight.lua +Modules\TotemPlates.lua +Modules\TotemPulse.lua +Modules\Trinket.lua +Modules\Racial.lua +Modules\Cooldowns.lua +Modules\ArenaCountDown.lua +Modules\BuffsDebuffs.lua +Modules\VersionCheck.lua +Modules\XiconProfiles.lua +Modules\Pets.lua +Modules\ExportImport.lua +Modules\CombatIndicator.lua +Modules\RangeCheck.lua +Modules\ShadowsightTimer.lua +EventListener.lua diff --git a/Lang.lua b/Lang.lua index caf2d58..2d6a97f 100644 --- a/Lang.lua +++ b/Lang.lua @@ -7,6 +7,7 @@ local L = {} -- Classes L["Druid"] = C_CreatureInfo.GetClassInfo(11).className +L["Deathknight"] = C_CreatureInfo.GetClassInfo(6).className L["Hunter"] = C_CreatureInfo.GetClassInfo(3).className L["Mage"] = C_CreatureInfo.GetClassInfo(8).className L["Paladin"] = C_CreatureInfo.GetClassInfo(2).className diff --git a/Libs/LibClassAuras-1.0/ClassBuffs.lua b/Libs/LibClassAuras-1.0/ClassBuffs.lua index 48de7aa..a89b887 100644 --- a/Libs/LibClassAuras-1.0/ClassBuffs.lua +++ b/Libs/LibClassAuras-1.0/ClassBuffs.lua @@ -194,4 +194,13 @@ Buff({ 45438 }, { buffType = "immune"}, "MAGE") -- Ice Block Buff({ 6143 }, { buffType = "magic"}, "MAGE") -- Frost Ward --talents Buff({ 11426 }, { buffType = "magic"}, "MAGE") -- Ice Barrier -Buff({ 12472 }, { buffType = "magic"}, "MAGE") -- Icy Veins \ No newline at end of file +Buff({ 12472 }, { buffType = "magic"}, "MAGE") -- Icy Veins + +------------- +-- DEATHKNIGHT +------------- + +Buff({ 48707 }, { buffType = "physical"}, "DEATHKNIGHT") -- Anti-Magic Shell +Buff({ 48792 }, { buffType = "physical"}, "DEATHKNIGHT") -- Icebound Fortitude +Buff({ 49039 }, { buffType = "physical"}, "DEATHKNIGHT") -- Lichborne +Buff({ 50461 }, { buffType = "physical"}, "DEATHKNIGHT") -- Anti-Magic Zone \ No newline at end of file diff --git a/Modules/Auras.lua b/Modules/Auras.lua index bbe428a..1433d84 100644 --- a/Modules/Auras.lua +++ b/Modules/Auras.lua @@ -483,12 +483,13 @@ function Auras:Test(unit) if Gladdy.exceptionNames[spellid] then spellName = Gladdy.exceptionNames[spellid] end + local duration = math.random(2,10) if (unit == "arena2") then if (v.value.track == AURA_TYPE_BUFF) then - self:AURA_GAIN(unit,v.value.track, spellid, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration) + self:AURA_GAIN(unit,v.value.track, spellid, spellName, icon, duration, GetTime() + duration) end else - self:AURA_GAIN(unit,v.value.track, spellid, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration) + self:AURA_GAIN(unit,v.value.track, spellid, spellName, icon, duration, GetTime() + duration) end end -- /run LibStub("Gladdy").modules["Auras"]:Test("arena1") diff --git a/Modules/Classicon.lua b/Modules/Classicon.lua index db4c792..cdf6d4b 100644 --- a/Modules/Classicon.lua +++ b/Modules/Classicon.lua @@ -22,6 +22,7 @@ local Classicon = Gladdy:NewModule("Class Icon", 81, { local classIconPath = "Interface\\Addons\\Gladdy\\Images\\Classes\\" local classIcons = { ["DRUID"] = classIconPath .. "inv_misc_monsterclaw_04", + ["DEATHKNIGHT"] = select(3, GetSpellInfo(49023)), --Might of Mograine ["HUNTER"] = classIconPath .. "inv_weapon_bow_07", ["MAGE"] = classIconPath .. "inv_staff_13", ["PALADIN"] = classIconPath .. "inv_hammer_01", @@ -39,6 +40,11 @@ local specIcons = { [L["Feral"]] = select(3, GetSpellInfo(27545)), -- Cat Form [L["Restoration"]] = select(3, GetSpellInfo(5185)), -- Healing Touch }, + ["DEATHKNIGHT"] = { + [L["Unholy"]] = select(3, GetSpellInfo(48265)), -- Unholy Presence + [L["Blood"]] = select(3, GetSpellInfo(48266)), -- Blood Presence + [L["Frost"]] = select(3, GetSpellInfo(48263)), -- Frost Presence + }, ["HUNTER"] = { [L["Beast Mastery"]] = select(3, GetSpellInfo(1515)), -- Tame Beast [L["Marksmanship"]] = select(3, GetSpellInfo(42243)), -- Volley diff --git a/Modules/Racial.lua b/Modules/Racial.lua index 335b3fe..3bba10c 100644 --- a/Modules/Racial.lua +++ b/Modules/Racial.lua @@ -32,6 +32,9 @@ function Racial:Initialize() self:RegisterMessage("JOINED_ARENA") self:RegisterMessage("ENEMY_SPOTTED") self:RegisterMessage("RACIAL_USED") + if Gladdy.expansion == "Wrath" then + self:RegisterMessage("TRINKET_USED") + end end end @@ -40,6 +43,9 @@ function Racial:UpdateFrameOnce() self:RegisterMessage("JOINED_ARENA") self:RegisterMessage("ENEMY_SPOTTED") self:RegisterMessage("RACIAL_USED") + if Gladdy.expansion == "Wrath" then + self:RegisterMessage("TRINKET_USED") + end else self:UnregisterAllMessages() end @@ -207,6 +213,25 @@ function Racial:RACIAL_USED(unit, expirationTime, spellName) Racial:Used(unit, startTime, Gladdy:Racials()[button.race].duration) end +function Racial:TRINKET_USED(unit) -- Wrath only + local racial = self.frames[unit] + local button = Gladdy.buttons[unit] + if (not racial or not button or not button.race) then + return + end + if button.race == "Scourge" then + if racial.active and racial.timeLeft >= 45 then + -- do nothing + else + racial.active = false + self:Used(unit, GetTime(), 45) + end + elseif button.race == "Human" then + racial.active = false + self:Used(unit, GetTime(), 120) + end +end + function Racial:Used(unit, startTime, duration) local racial = self.frames[unit] if (not racial) then @@ -241,8 +266,8 @@ end function Racial:Test(unit) Racial:ENEMY_SPOTTED(unit) - if (unit == "arena1" or unit == "arena3") then - Racial:Used(unit, GetTime(), Gladdy:Racials()[Gladdy.buttons[unit].race].duration) + if (unit == "arena2" or unit == "arena3") then + Gladdy:SendMessage("RACIAL_USED", unit) end end diff --git a/Modules/Trinket.lua b/Modules/Trinket.lua index fd14d10..6276f9b 100644 --- a/Modules/Trinket.lua +++ b/Modules/Trinket.lua @@ -33,12 +33,18 @@ function Trinket:Initialize() self.frames = {} if Gladdy.db.trinketEnabled then self:RegisterMessage("JOINED_ARENA") + if Gladdy.expansion == "Wrath" then + self:RegisterMessage("RACIAL_USED") + end end end function Trinket:UpdateFrameOnce() if Gladdy.db.trinketEnabled then self:RegisterMessage("JOINED_ARENA") + if Gladdy.expansion == "Wrath" then + self:RegisterMessage("RACIAL_USED") + end else self:UnregisterAllMessages() end @@ -228,6 +234,7 @@ function Trinket:ResetUnit(unit) return end + trinket.itemID = nil trinket.timeLeft = nil trinket.active = false trinket.cooldown:Clear() @@ -239,13 +246,15 @@ function Trinket:Test(unit) if (not trinket) then return end - if (unit == "arena2" or unit == "arena3") then + if (unit == "arena1" or unit == "arena2") then self:Used(unit, GetTime() * 1000, 120000) end end function Trinket:JOINED_ARENA() self:RegisterEvent("ARENA_COOLDOWNS_UPDATE") + self:RegisterEvent("ARENA_CROWD_CONTROL_SPELL_UPDATE") + self:RegisterUnitEvent("UNIT_SPELLCAST_SUCCEEDED", "arena1", "arena2", "arena3", "arena4", "arena5") self:SetScript("OnEvent", function(self, event, ...) if self[event] then self[event](self, ...) @@ -253,19 +262,64 @@ function Trinket:JOINED_ARENA() end) end +function Trinket:ARENA_CROWD_CONTROL_SPELL_UPDATE(...) + local unitID, spellID, itemID = ... + Gladdy:Debug("INFO", "Trinket:ARENA_CROWD_CONTROL_SPELL_UPDATE", unitID, spellID, itemID) + if Gladdy.buttons[unitID] and Gladdy:GetPvpTrinkets()[itemID] then + Gladdy.buttons[unitID].trinket.itemID = itemID + if not Gladdy.db.trinketColored then + self.frames[unitID].texture:SetTexture(GetItemIcon(itemID)) + end + end +end + +function Trinket:UNIT_SPELLCAST_SUCCEEDED(...) + local unitID, castGUID, spellID = ... + if Gladdy.buttons[unitID] then + if spellID == 42292 or spellID == 59752 then + Gladdy:Debug("INFO", "Trinket:UNIT_SPELLCAST_SUCCEEDED", unitID, spellID) + self:Used(unitID, GetTime() * 1000, + Gladdy.buttons[unitID].trinket.itemID and Gladdy:GetPvpTrinkets()[Gladdy.buttons[unitID].trinket.itemID] + or 120000) + end + end +end + +function Trinket:RACIAL_USED(unit) -- Wrath only + local trinket = self.frames[unit] + if (not trinket) then + return + end + if Gladdy.buttons[unit].race == "Scourge" then + if trinket.active and trinket.timeLeft >= 44 then + -- do nothing + else + trinket.active = false + self:Used(unit, GetTime() * 1000, 45000, true) + end + elseif Gladdy.buttons[unit].race == "Human" then + trinket.active = false + self:Used(unit, GetTime() * 1000, 120000) + end +end + function Trinket:ARENA_COOLDOWNS_UPDATE() for i=1, Gladdy.curBracket do - local unit = "arena" .. i - local spellID, itemID, startTime, duration = C_PvP.GetArenaCrowdControlInfo(unit); + local unitID = "arena" .. i + local spellID, itemID, startTime, duration = C_PvP.GetArenaCrowdControlInfo(unitID) + Gladdy:Debug("INFO", "Trinket:ARENA_COOLDOWNS_UPDATE", spellID, itemID, startTime, duration) if (spellID) then + if not Gladdy.db.trinketColored and Gladdy:GetPvpTrinkets()[itemID] then + self.frames[unitID].texture:SetTexture(GetItemIcon(itemID)) + end if (startTime ~= 0 and duration ~= 0) then - self:Used(unit, startTime, duration) + self:Used(unitID, startTime, duration) end end end end -function Trinket:Used(unit, startTime, duration) +function Trinket:Used(unit, startTime, duration, passive) local trinket = self.frames[unit] if (not trinket) then return @@ -277,7 +331,9 @@ function Trinket:Used(unit, startTime, duration) if Gladdy.db.trinketColored then trinket:SetBackdropColor(Gladdy:SetColor(Gladdy.db.trinketColoredCd)) end - Gladdy:SendMessage("TRINKET_USED", unit) + if not passive then + Gladdy:SendMessage("TRINKET_USED", unit) + end end end diff --git a/Options.lua b/Options.lua index 4a6aa57..a561539 100644 --- a/Options.lua +++ b/Options.lua @@ -935,6 +935,17 @@ function Gladdy:GetAuras(auraType) end return args end + if Gladdy.expansion == "Wrath" then + spells.deathknight = { + order = 3, + type = "group", + name = LOCALIZED_CLASS_NAMES_MALE["DEATHKNIGHT"], + icon = "Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes", + iconCoords = CLASS_ICON_TCOORDS["DEATHKNIGHT"], + args = {}, + } + spells.deathknight.args = assignForClass("DEATHKNIGHT") + end spells.druid.args = assignForClass("DRUID") spells.hunter.args = assignForClass("HUNTER") spells.mage.args = assignForClass("MAGE") -- 2.39.5 From e68dea3f2258644086ced66e353dbf44ace41935 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 29 Jul 2022 07:42:36 +0200 Subject: [PATCH 140/227] Wrath make export import possible with BCC profiles and vice versa --- Modules/ExportImport.lua | 41 ++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/Modules/ExportImport.lua b/Modules/ExportImport.lua index d049d48..8ffeb46 100644 --- a/Modules/ExportImport.lua +++ b/Modules/ExportImport.lua @@ -24,6 +24,7 @@ local function table_copy(t, str) end local ExportImport = Gladdy:NewModule("Export Import", nil, { + expansion = Gladdy.expansion, }) local export = AceGUI:Create("Frame") @@ -112,6 +113,18 @@ local deletedOptions = { -- backwards compatibility padding = true, growUp = true, powerBarFontSize = true, + ["38373"] = true, -- The Beast Within (Auras) + ["34692"] = true, -- The Beast Within (Cooldowns) +} + +local expansionSpecific = { + "drCategories", + "auraListDefault", + "auraListInterrupts", + "trackedDebuffs", + "trackedBuffs", + "cooldownCooldowns", + "cooldownCooldownsOrder", } local function checkIsDeletedOption(k, str, msg, errorFound, errorMsg) @@ -162,7 +175,7 @@ function ExportImport:CheckDeserializedOptions(tbl, refTbl, str) end if errorFound then - return false, errorMsg + --return false, errorMsg end return true end @@ -227,17 +240,29 @@ function ExportImport:ApplyImport(t, table, str) if (not t.newLayout) then table.newLayout = false end + if not t.expansion then + t.expansion = "BCC" + end end for k,v in pairs(t) do - if type(v) == "table" then - if (table[k] ~= nil) then - ExportImport:ApplyImport(v, table[k], str .. "." .. k) - else - Gladdy:Debug("ERROR", "ApplyImport failed for", str .. "." .. k) + local skip = k == "expansion" + if t.expansion and t.expansion ~= table.expansion then + if Gladdy:contains(k, expansionSpecific) then + Gladdy:Debug("WARN", "ExportImport:ApplyImport", "skipped", k, "- import string expansion is", t.expansion, "- current expansion is", table.expansion) + skip = true end + end + if not skip then + if type(v) == "table" then + if (table[k] ~= nil) then + ExportImport:ApplyImport(v, table[k], str .. "." .. k) + else + Gladdy:Debug("ERROR", "ExportImport:ApplyImport", "failed for", str .. "." .. k) + end - else - table[k] = v + else + table[k] = v + end end end end -- 2.39.5 From 674eabd4899fdb4a17f66efd736b2d01ed5fccc8 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 29 Jul 2022 07:43:39 +0200 Subject: [PATCH 141/227] totempulse minor fix --- Modules/TotemPulse.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/TotemPulse.lua b/Modules/TotemPulse.lua index ff511e4..a785eb6 100644 --- a/Modules/TotemPulse.lua +++ b/Modules/TotemPulse.lua @@ -330,7 +330,7 @@ function TotemPulse:CreateCooldownFrame(style) end function TotemPulse:AddTimerFrame(nameplate, timestamp, test) - if (nameplate:IsShown() or test) and timestamp then + if (nameplate:IsShown() or test) and timestamp and timestamp.id then if not nameplate.totemTick then nameplate.totemTick = TotemPulse:CreateCooldownFrame(Gladdy.db.totemPulseTotems["totem" .. timestamp.id].style) end -- 2.39.5 From be1d4475d1a27f30f90da0cecf0eff5fbb0ab401 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 29 Jul 2022 07:44:40 +0200 Subject: [PATCH 142/227] detect spec minor fix + add deathknight to spec detection --- EventListener.lua | 32 ++++++++++++-------------------- Util.lua | 11 ++++++++++- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/EventListener.lua b/EventListener.lua index 820f181..9a2692d 100644 --- a/EventListener.lua +++ b/EventListener.lua @@ -134,8 +134,9 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() if not Gladdy.buttons[srcUnit].spec then self:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) end - if (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_AURA_APPLIED") then + if (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_AURA_APPLIED" or eventType == "SPELL_MISSED") then local unitRace = Gladdy.buttons[srcUnit].race + self:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) -- cooldown tracker if Gladdy.db.cooldown and Cooldowns.cooldownSpellIds[spellName] then local unitClass @@ -149,7 +150,6 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED() else unitClass = Gladdy.buttons[srcUnit].race end - self:DetectSpec(srcUnit, Gladdy.specSpells[spellName]) if spellID ~= 16188 and spellID ~= 17116 then -- Nature's Swiftness CD starts when buff fades Cooldowns:CooldownUsed(srcUnit, unitClass, spellId) end @@ -314,29 +314,21 @@ function EventListener:UNIT_SPELLCAST_SUCCEEDED(unit) end end -local function notIn(spec, list) - for _,v in ipairs(list) do - if spec == v then - return false - end - end - return true -end - function EventListener:DetectSpec(unit, spec) local button = Gladdy.buttons[unit] if (not button or not spec or button.spec) then return end - if button.class == "PALADIN" and notIn(spec, {L["Holy"], L["Retribution"], L["Protection"]}) - or button.class == "SHAMAN" and notIn(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) - or button.class == "ROGUE" and notIn(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) - or button.class == "WARLOCK" and notIn(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) - or button.class == "PRIEST" and notIn(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) - or button.class == "MAGE" and notIn(spec, {L["Frost"], L["Fire"], L["Arcane"]}) - or button.class == "DRUID" and notIn(spec, {L["Restoration"], L["Feral"], L["Balance"]}) - or button.class == "HUNTER" and notIn(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) - or button.class == "WARRIOR" and notIn(spec, {L["Arms"], L["Protection"], L["Fury"]}) then + if button.class == "PALADIN" and Gladdy:contains(spec, {L["Holy"], L["Retribution"], L["Protection"]}) + or button.class == "SHAMAN" and not Gladdy:contains(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]}) + or button.class == "ROGUE" and not Gladdy:contains(spec, {L["Subtlety"], L["Assassination"], L["Combat"]}) + or button.class == "WARLOCK" and not Gladdy:contains(spec, {L["Demonology"], L["Destruction"], L["Affliction"]}) + or button.class == "PRIEST" and not Gladdy:contains(spec, {L["Shadow"], L["Discipline"], L["Holy"]}) + or button.class == "MAGE" and not Gladdy:contains(spec, {L["Frost"], L["Fire"], L["Arcane"]}) + or button.class == "DRUID" and not Gladdy:contains(spec, {L["Restoration"], L["Feral"], L["Balance"]}) + or button.class == "HUNTER" and not Gladdy:contains(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]}) + or button.class == "WARRIOR" and not Gladdy:contains(spec, {L["Arms"], L["Protection"], L["Fury"]}) + or button.class == "DEATHKNIGHT" and not Gladdy:contains(spec, {L["Unholy"], L["Blood"], L["Frost"]}) then return end if not button.spec then diff --git a/Util.lua b/Util.lua index 947a877..204ab05 100644 --- a/Util.lua +++ b/Util.lua @@ -141,4 +141,13 @@ function Gladdy:GetTagOption(name, order, enabledOption, func, toggle) "Can be combined with OR operator like |cff1ac742[percent|status]|r. The last valid option will be used.\n"], }) end -end \ No newline at end of file +end + +function Gladdy:contains(entry, list) + for _,v in pairs(list) do + if entry == v then + return true + end + end + return false +end -- 2.39.5 From 23097951e369c5bf21988ece067d3b1327e7bb15 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 29 Jul 2022 07:44:58 +0200 Subject: [PATCH 143/227] .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 23b1f2d..deb3cb1 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ BuffLib Ace-Libs Images_Raw Gladdy_old +untracked Gladdy_TW \ No newline at end of file -- 2.39.5 From f1652e2b42b448d59d37ecb30f14cb3c4d38fdf7 Mon Sep 17 00:00:00 2001 From: Sumsebrum Date: Fri, 29 Jul 2022 07:45:46 +0200 Subject: [PATCH 144/227] add DRList-1.0 as lib --- Libs/DRList-1.0/DRList-1.0.lua | 400 +++++++++++++++++++ Libs/DRList-1.0/DRList-1.0.toc | 23 ++ Libs/DRList-1.0/DRList-1.0.xml | 4 + Libs/DRList-1.0/Spells.lua | 689 +++++++++++++++++++++++++++++++++ Modules/Diminishings.lua | 3 +- embeds.xml | 1 + 6 files changed, 1119 insertions(+), 1 deletion(-) create mode 100644 Libs/DRList-1.0/DRList-1.0.lua create mode 100644 Libs/DRList-1.0/DRList-1.0.toc create mode 100644 Libs/DRList-1.0/DRList-1.0.xml create mode 100644 Libs/DRList-1.0/Spells.lua diff --git a/Libs/DRList-1.0/DRList-1.0.lua b/Libs/DRList-1.0/DRList-1.0.lua new file mode 100644 index 0000000..d384400 --- /dev/null +++ b/Libs/DRList-1.0/DRList-1.0.lua @@ -0,0 +1,400 @@ +--[[ +Name: DRList-1.0 +Description: Diminishing returns categorization. Fork of outdated DRData-1.0. +Website: https://github.com/wardz/DRList-1.0/ +Documentation: https://wardz.github.io/DRList-1.0/ +Dependencies: LibStub +License: MIT +]] + +--- DRList-1.0 +-- @module DRList-1.0 +local MAJOR, MINOR = "DRList-1.0", 40 -- Don't forget to change this in Spells.lua aswell! +local Lib = assert(LibStub, MAJOR .. " requires LibStub."):NewLibrary(MAJOR, MINOR) +if not Lib then return end -- already loaded + +------------------------------------------------------------------------------- +-- *** LOCALIZATIONS ARE AUTOMATICALLY GENERATED *** +-- Please see Curseforge localization page if you'd like to help translate. +-- https://www.curseforge.com/wow/addons/drlist-1-0/localization +local L = {} +Lib.L = L +L["DISARMS"] = "Disarms" +L["DISORIENTS"] = "Disorients" +L["INCAPACITATES"] = "Incapacitates" +L["KNOCKBACKS"] = "Knockbacks" +L["ROOTS"] = "Roots" +L["SILENCES"] = "Silences" +L["STUNS"] = "Stuns" +L["TAUNTS"] = "Taunts" +L["FEARS"] = "Fears" +L["RANDOM_ROOTS"] = "Random roots" +L["RANDOM_STUNS"] = "Random stuns" +L["OPENER_STUN"] = "Opener Stuns" +L["HORROR"] = "Horrors" +L["SCATTERS"] = "Scatters" +L["SLEEPS"] = GetSpellInfo(1090) or "Sleep" +L["MIND_CONTROL"] = GetSpellInfo(605) or "Mind Control" +L["FROST_SHOCK"] = GetSpellInfo(15089) or "Frost Shock" +L["KIDNEY_SHOT"] = GetSpellInfo(408) or "Kidney Shot" +L["DEATH_COIL"] = GetSpellInfo(28412) or "Death Coil" +L["UNSTABLE_AFFLICTION"] = GetSpellInfo(31117) or "Unstable Affliction" +L["CHASTISE"] = GetSpellInfo(44041) or "Chastise" +L["COUNTERATTACK"] = GetSpellInfo(19306) or "Counterattack" +L["CYCLONE"] = GetSpellInfo(33786) or "Cyclone" +L["BANISH"] = GetSpellInfo(710) or "Banish" +L["CHARGE"] = GetSpellInfo(100) or "Charge" + +-- luacheck: push ignore 542 +local locale = GetLocale() +if locale == "deDE" then + L["FEARS"] = "Furchteffekte" + L["KNOCKBACKS"] = "Rückstoßeffekte" + L["ROOTS"] = "Bewegungsunfähigkeitseffekte" + L["SILENCES"] = "Stilleeffekte" + L["STUNS"] = "Betäubungseffekte" + L["TAUNTS"] = "Spotteffekte" +elseif locale == "frFR" then + L["FEARS"] = "Peurs" + L["KNOCKBACKS"] = "Projections" + L["ROOTS"] = "Immobilisations" + L["SILENCES"] = "Silences" + L["STUNS"] = "Etourdissements" + L["TAUNTS"] = "Provocations" +elseif locale == "itIT" then + --@localization(locale="itIT", namespace="Categories", format="lua_additive_table", handle-unlocalized="ignore")@ +elseif locale == "koKR" then + L["DISORIENTS"] = "방향 감각 상실" + L["INCAPACITATES"] = "행동 불가" + L["KNOCKBACKS"] = "밀쳐내기" + L["ROOTS"] = "이동 불가" + L["SILENCES"] = "침묵" + L["STUNS"] = "기절" +elseif locale == "ptBR" then + --@localization(locale="ptBR", namespace="Categories", format="lua_additive_table", handle-unlocalized="ignore")@ +elseif locale == "ruRU" then + L["DISARMS"] = "Разоружение" + L["DISORIENTS"] = "Дезориентация" + L["FEARS"] = "Опасения" + L["INCAPACITATES"] = "Паралич" + L["KNOCKBACKS"] = "Отбрасывание" + L["RANDOM_ROOTS"] = "Случайные корни" + L["RANDOM_STUNS"] = "Случайные оглушения" + L["ROOTS"] = "Сковывание" + L["SILENCES"] = "Немота" + L["STUNS"] = "Оглушение" + L["TAUNTS"] = "Насмешки" +elseif locale == "esES" or locale == "esMX" then + L["DISARMS"] = "Desarmar" + L["DISORIENTS"] = "Desorientar" + L["FEARS"] = "Miedos" + L["INCAPACITATES"] = "Incapacitar" + L["KNOCKBACKS"] = "Derribos" + L["RANDOM_ROOTS"] = "Raíces aleatorias" + L["RANDOM_STUNS"] = "Aturdir aleatorio" + L["ROOTS"] = "Raíces" + L["SILENCES"] = "Silencios" + L["STUNS"] = "Aturdimientos" + L["TAUNTS"] = "Provocaciones" +elseif locale == "zhCN" then + L["DISARMS"] = "缴械" + L["DISORIENTS"] = "迷惑" + L["FEARS"] = "恐惧" + L["INCAPACITATES"] = "瘫痪" + L["KNOCKBACKS"] = "击退" + L["RANDOM_ROOTS"] = "随机定身" + L["RANDOM_STUNS"] = "随机眩晕" + L["ROOTS"] = "定身" + L["SILENCES"] = "沉默" + L["STUNS"] = "昏迷" + L["TAUNTS"] = "嘲讽" +elseif locale == "zhTW" then + L["DISARMS"] = "繳械" + L["DISORIENTS"] = "迷惑" + L["FEARS"] = "恐懼" + L["INCAPACITATES"] = "癱瘓" + L["KNOCKBACKS"] = "擊退" + L["RANDOM_ROOTS"] = "隨機定身" + L["RANDOM_STUNS"] = "隨機昏迷" + L["ROOTS"] = "定身" + L["SILENCES"] = "沉默" + L["STUNS"] = "昏迷" + L["TAUNTS"] = "嘲諷" +end +-- luacheck: pop +------------------------------------------------------------------------------- + +-- Check what game version we're running +Lib.gameExpansion = ({ + [WOW_PROJECT_MAINLINE] = "retail", + [WOW_PROJECT_CLASSIC] = "classic", + [WOW_PROJECT_BURNING_CRUSADE_CLASSIC or 5] = "tbc", +})[WOW_PROJECT_ID] + +local tocVersion = select(4, GetBuildInfo()) +if tocVersion >= 30400 and tocVersion < 40000 then + Lib.gameExpansion = "wotlk" -- temporary check for wotlk build until new constant is added +end + +-- How long it takes for a DR to expire, in seconds. +Lib.resetTimes = { + retail = { + ["default"] = 18.5, -- 18 sec + 0.5 latency + ["npc"] = 23, -- Against mobs it seems to last slightly longer, depending on server load + ["knockback"] = 10, -- Knockbacks are immediately immune and only DRs for 10s + }, + + classic = { + ["default"] = 19, -- dynamic between 15 and 20s + ["npc"] = 23, + }, + + tbc = { + ["default"] = 19, -- dynamic between 15 and 20s + ["npc"] = 23, + }, + + wotlk = { + ["default"] = 19, -- dynamic between 15 and 20s + ["npc"] = 23, + }, +} + +-- List of all DR categories, english -> localized. +Lib.categoryNames = { + retail = { + ["disorient"] = L.DISORIENTS, + ["incapacitate"] = L.INCAPACITATES, + ["silence"] = L.SILENCES, + ["stun"] = L.STUNS, + ["root"] = L.ROOTS, + ["disarm"] = L.DISARMS, + ["taunt"] = L.TAUNTS, + ["knockback"] = L.KNOCKBACKS, + }, + + classic = { + ["incapacitate"] = L.INCAPACITATES, + ["stun"] = L.STUNS, -- controlled stun + ["root"] = L.ROOTS, -- controlled root + ["random_stun"] = L.RANDOM_STUNS, -- random proc stun, usually short (<3s) + ["random_root"] = L.RANDOM_ROOTS, + ["fear"] = L.FEARS, + ["mind_control"] = L.MIND_CONTROL, + ["frost_shock"] = L.FROST_SHOCK, + ["kidney_shot"] = L.KIDNEY_SHOT, + }, + + tbc = { + ["disorient"] = L.DISORIENTS, + ["incapacitate"] = L.INCAPACITATES, + ["stun"] = L.STUNS, + ["random_stun"] = L.RANDOM_STUNS, + ["random_root"] = L.RANDOM_ROOTS, + ["root"] = L.ROOTS, + ["disarm"] = L.DISARMS, + ["fear"] = L.FEARS, + ["scatter"] = L.SCATTERS, + ["mind_control"] = L.MIND_CONTROL, + ["kidney_shot"] = L.KIDNEY_SHOT, + ["death_coil"] = L.DEATH_COIL, + ["unstable_affliction"] = L.UNSTABLE_AFFLICTION, + ["chastise"] = L.CHASTISE, + ["counterattack"] = L.COUNTERATTACK, + }, + + wotlk = { -- WORK IN PROGRESS + ["incapacitate"] = L.INCAPACITATES, + ["stun"] = L.STUNS, + ["random_stun"] = L.RANDOM_STUNS, + ["random_root"] = L.RANDOM_ROOTS, + ["root"] = L.ROOTS, + ["disarm"] = L.DISARMS, + ["fear"] = L.FEARS, + ["scatter"] = L.SCATTERS, + ["silence"] = L.SILENCES, + ["horror"] = L.HORROR, + ["mind_control"] = L.MIND_CONTROL, + ["cyclone"] = L.CYCLONE, + ["banish"] = L.BANISH, + ["charge"] = L.CHARGE, + ["opener_stun"] = L.OPENER_STUN, + }, +} + +-- Categories that have DR against normal mobs. +-- Note that this is only for normal mobs on retail. Special mobs or pets have DR on all categories, +-- see UnitClassification() and UnitIsQuestBoss(). +Lib.categoriesPvE = { + retail = { + ["taunt"] = L.TAUNTS, -- Lib.categoryNames.retail.taunt + ["stun"] = L.STUNS, + ["root"] = L.ROOTS, + }, + + classic = { + ["stun"] = L.STUNS, + ["kidney_shot"] = L.KIDNEY_SHOT, + }, + + tbc = { + ["stun"] = L.STUNS, + ["random_stun"] = L.RANDOM_STUNS, + ["kidney_shot"] = L.KIDNEY_SHOT, + }, + + wotlk = { + --["taunt"] = L.TAUNTS, + ["stun"] = L.STUNS, + ["random_stun"] = L.RANDOM_STUNS, + ["opener_stun"] = L.OPENER_STUN, + }, +} + +-- Successives diminished durations +Lib.diminishedDurations = { + retail = { + -- Decreases by 50%, immune at the 4th application + ["default"] = { 0.50, 0.25 }, + -- Decreases by 35%, immune at the 5th application + ["taunt"] = { 0.65, 0.42, 0.27 }, + -- Immediately immune + ["knockback"] = {}, + }, + + classic = { + ["default"] = { 0.50, 0.25 }, + }, + + tbc = { + ["default"] = { 0.50, 0.25 }, + }, + + wotlk = { + ["default"] = { 0.50, 0.25 }, + }, +} + +------------------------------------------------------------------------------- +-- Public API +------------------------------------------------------------------------------- + +--- Get table of all spells that DRs. +-- Key is the spellID, and value is the unlocalized DR category. +-- For Classic the key is the localized spell name instead, and value +-- is a table containing both the DR category and spell ID. (Classic has no spellID payload in the combat log) +-- @see IterateSpellsByCategory +-- @treturn ?table {number=string}|table {string=table} +function Lib:GetSpells() + return Lib.spellList +end + +--- Get table of all DR categories. +-- Key is unlocalized name used for API functions, value is localized name used for UI. +-- @treturn table {string=string} +function Lib:GetCategories() + return Lib.categoryNames[Lib.gameExpansion] +end + +--- Get table of all categories that DRs in PvE only. +-- Key is unlocalized name used for API functions, value is localized name used for UI. +-- Note that this is only for normal mobs on retail. Special mobs or pets have DR on all categories, +-- see UnitClassification() and UnitIsQuestBoss(). +-- Tip: you can combine :GetPvECategories() and :IterateSpellsByCategory() to get spellIDs only for PvE aswell. +-- @treturn table {string=string} +function Lib:GetPvECategories() + return Lib.categoriesPvE[Lib.gameExpansion] +end + +--- Get constant for how long a DR lasts for a given category. +-- @tparam[opt="default"] string category Unlocalized category name, or "npc" for PvE timer. +-- @treturn number +function Lib:GetResetTime(category) + return Lib.resetTimes[Lib.gameExpansion][category or "default"] or Lib.resetTimes[Lib.gameExpansion].default +end + +--- Get unlocalized DR category by spell ID. +-- For Classic (vanilla) you should pass in the spell name instead of ID. +-- For Classic you also get an optional second return value +-- which is the hardcoded spell ID of the spell name you passed in. +-- You should use this ID to query additional info from Blizzard API if needed, as +-- spell names only works for the player if they have the spell in their current spellbook. +-- @tparam number spellID +-- @treturn[1] string|nil The category name. +-- @treturn[2] number|nil The spell ID. (Classic only) +function Lib:GetCategoryBySpellID(spellID) + if Lib.gameExpansion == "classic" then + -- special case for classic as CLEU doesn't provide spellIDs + local data = Lib.spellList[spellID] + if not data then return end + return data.category, data.spellID + end + + return Lib.spellList[spellID] +end + +--- Get localized category from unlocalized category name, case sensitive. +-- @tparam string category Unlocalized category name +-- @treturn ?string|nil The localized category name. +function Lib:GetCategoryLocalization(category) + return Lib.categoryNames[Lib.gameExpansion][category] +end + +--- Check if a category has DR against mobs. +-- Note that this is only for normal mobs on retail. Special mobs or pets have DR on all categories, +-- see UnitClassification() and UnitIsQuestBoss(). +-- @tparam string category Unlocalized category name +-- @treturn bool +function Lib:IsPvECategory(category) + return Lib.categoriesPvE[Lib.gameExpansion][category] and true or false -- make sure bool is always returned here +end + +--- Get next successive diminished duration +-- @tparam number diminished How many times the DR has been applied so far +-- @tparam[opt="default"] string category Unlocalized category name +-- @usage local reduction = DRList:GetNextDR(1) -- returns 0.50, half duration on debuff +-- @treturn number DR percentage in decimals. Returns 0 if max DR is reached or arguments are invalid. +function Lib:GetNextDR(diminished, category) + local durations = Lib.diminishedDurations[Lib.gameExpansion][category or "default"] + if not durations and Lib.categoryNames[Lib.gameExpansion][category] then + -- Redirect to default when "stun", "root" etc is passed + durations = Lib.diminishedDurations[Lib.gameExpansion]["default"] + end + + return durations and durations[diminished] or 0 +end + +do + local next = _G.next + + local function CategoryIterator(category, index) + local spellList, newCat = Lib.spellList + repeat + index, newCat = next(spellList, index) + if index then + if newCat == category or newCat.category == category then + return index, category + end + end + until not index + end + + --- Iterate through the spells of a given category. + -- @tparam string category Unlocalized category name + -- @usage for spellID in DRList:IterateSpellsByCategory("root") do print(spellID) end + -- @warning Slow function, do not use for frequent combat related stuff unless you cache results. + -- @return Iterator function + function Lib:IterateSpellsByCategory(category) + assert(Lib.categoryNames[Lib.gameExpansion][category], "invalid category") + return CategoryIterator, category + end +end + +-- keep same API as DRData-1.0 for easier transitions +Lib.GetCategoryName = Lib.GetCategoryLocalization +Lib.IsPVE = Lib.IsPvECategory +Lib.NextDR = Lib.GetNextDR +Lib.GetSpellCategory = Lib.GetCategoryBySpellID +Lib.IterateSpells = Lib.IterateSpellsByCategory +Lib.RESET_TIME = Lib.resetTimes[Lib.gameExpansion].default +Lib.pveDR = Lib.categoriesPvE diff --git a/Libs/DRList-1.0/DRList-1.0.toc b/Libs/DRList-1.0/DRList-1.0.toc new file mode 100644 index 0000000..30cf4f5 --- /dev/null +++ b/Libs/DRList-1.0/DRList-1.0.toc @@ -0,0 +1,23 @@ +## Interface: 90205 +## Interface-Classic: 11402 +## Interface-BCC: 20504 +## Interface-Wrath: 30400 +## Title: Lib: DRList-1.0 +## Version: @project-version@ +## X-Category: Library +## X-License: MIT +## X-Curse-Project-ID: 315757 +## X-Wago-ID: 9rN4BxKD + +#@no-lib-strip@ +libs\LibStub\LibStub.lua +#@end-no-lib-strip@ + +DRList-1.0.xml +#@do-not-package@ +tests\engine.lua +tests\test-retail.lua +tests\test-classic.lua +tests\test-tbc.lua +tests\test-wotlk.lua +#@end-do-not-package@ diff --git a/Libs/DRList-1.0/DRList-1.0.xml b/Libs/DRList-1.0/DRList-1.0.xml new file mode 100644 index 0000000..2ab1f09 --- /dev/null +++ b/Libs/DRList-1.0/DRList-1.0.xml @@ -0,0 +1,4 @@ + +