From 628c2e4b26ff58a06e51aa0707afd79aece6d589 Mon Sep 17 00:00:00 2001 From: Aviana Date: Tue, 7 Sep 2021 12:44:30 +0200 Subject: [PATCH] Update - Bump Toc - Add #887 - Add #889 - Add #878 - Fix #882 --- LunaUnitFrames.lua | 20 ++++++- LunaUnitFrames.toc | 4 +- .../oUF_SimpleAuras/oUF_SimpleAuras.lua | 23 +++++--- .../oUF_TagsWithHeal/oUF_TagsWithHeal.lua | 4 +- locales/deDE.lua | 2 + locales/enUS.lua | 2 + locales/koKR.lua | 2 + locales/zhCN.lua | 2 + locales/zhTW.lua | 2 + modules/Options.lua | 56 ++++++++++++------- modules/defaults.lua | 1 + 11 files changed, 87 insertions(+), 31 deletions(-) diff --git a/LunaUnitFrames.lua b/LunaUnitFrames.lua index 4eec160..35e9ca5 100644 --- a/LunaUnitFrames.lua +++ b/LunaUnitFrames.lua @@ -1,7 +1,7 @@ -- Luna Unit Frames 4.0 by Aviana LUF = select(2, ...) -LUF.version = 4190 +LUF.version = 4200 local L = LUF.L local ACR = LibStub("AceConfigRegistry-3.0", true) @@ -350,6 +350,13 @@ function LUF:AutoswitchProfile(event) groupType = "SOLO" end profile = self.db.char.grpdb[groupType] + elseif event == "PLAYER_ENTERING_WORLD" and self.db.char.switchtype == "ARENA" then + if select(2,IsInInstance()) == "arena" then + profile = self.db.char.grpdb["ARENA"] + self.db.char.grpdb["NONARENA"] = self.db:GetCurrentProfile() + elseif self.db.char.grpdb["NONARENA"] then + profile = self.db.char.grpdb["NONARENA"] + end end if profile and profile ~= self.db:GetCurrentProfile() then self.db:SetProfile(profile) @@ -826,6 +833,7 @@ function LUF.ApplySettings(frame) Auras.buffFilter = AuraConfig.filterbuffs Auras.buffSize = AuraConfig.buffsize Auras.largeBuffSize = AuraConfig.enlargedbuffsize + Auras.showSteal = AuraConfig.showSteal Auras.wrapBuffSide = AuraConfig.wrapbuffside Auras.wrapBuff = AuraConfig.wrapbuff Auras.buffOffset = AuraConfig.buffOffset @@ -1215,6 +1223,9 @@ function LUF:SpawnUnits() end end end + for unit,frame in pairs(self.frameIndex) do + frame:SetFrameStrata(self.db.profile.strata) + end self.stateMonitor:SetFrameRef("partyFrame", self.frameIndex["party"]) self.stateMonitor:SetFrameRef("partytargetFrame", self.frameIndex["partytarget"]) self.stateMonitor:SetFrameRef("partypetFrame", self.frameIndex["partypet"]) @@ -1506,6 +1517,7 @@ frame:RegisterEvent("PLAYER_LOGIN") frame:RegisterEvent("ADDON_LOADED") frame:RegisterEvent("PLAYER_REGEN_DISABLED") frame:RegisterEvent("PLAYER_REGEN_ENABLED") +frame:RegisterEvent("PLAYER_ENTERING_WORLD") frame:SetScript("OnEvent", function(self, event, addon) if( event == "PLAYER_LOGIN" ) then LUF:OnLoad() @@ -1543,6 +1555,12 @@ frame:SetScript("OnEvent", function(self, event, addon) else queuedEvent = event end + elseif event == "PLAYER_ENTERING_WORLD" then + if not LUF.InCombatLockdown then + LUF:AutoswitchProfile(event) + else + queuedEvent = event + end end end) diff --git a/LunaUnitFrames.toc b/LunaUnitFrames.toc index 9b3031e..7198c46 100644 --- a/LunaUnitFrames.toc +++ b/LunaUnitFrames.toc @@ -1,8 +1,8 @@ -## Interface: 20501 +## Interface: 20502 ## Title: Luna Unit Frames ## Notes: ## Author: Aviana -## Version: 4190 +## Version: 4200 ## SavedVariables: LunaUFDB ## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, Clique ## X-License: WTFPL (http://www.wtfpl.net/about/) diff --git a/libs/oUF_Plugins/oUF_SimpleAuras/oUF_SimpleAuras.lua b/libs/oUF_Plugins/oUF_SimpleAuras/oUF_SimpleAuras.lua index 262e701..9acda5e 100644 --- a/libs/oUF_Plugins/oUF_SimpleAuras/oUF_SimpleAuras.lua +++ b/libs/oUF_Plugins/oUF_SimpleAuras/oUF_SimpleAuras.lua @@ -30,6 +30,7 @@ Yawt. .largeDebuffSize....- Make your own bigger by this amount (number) .onlyShowPlayer - Shows only auras created by player/vehicle (boolean) .showType - Colors the border in the magic type color (boolean) +.showSteal - Display the white border around stealable buffs (boolean) .spacing - Spacing between each icon. Defaults to 0 (number) .Anchor - Anchor point for the icons. Defaults to 'BOTTOMLEFT' (string) "" @@ -249,14 +250,22 @@ local function updateIcon(element, unit, index, position, filter, isDebuff) end if(button.overlay) then - local color = element.showType and oUF.colors.debuff[debuffType] or {1,1,1} - button.overlay:SetVertexColor(color[1], color[2], color[3]) - if element.overlay then - button.overlay:SetTexture(element.overlay) - button.overlay:SetTexCoord(0,1,0,1) + local color = element.showType and oUF.colors.debuff[debuffType] or {1,1,1} + if isStealable and element.showSteal then + button.overlay:SetVertexColor(1, 1, 1) + button.overlay:SetTexture("Interface\\TargetingFrame\\UI-TargetingFrame-Stealable") + button.overlay:SetTexCoord(0.1,0.95,0.1,0.95) + button.overlay:SetBlendMode("ADD") else - button.overlay:SetTexture([[Interface\Buttons\UI-Debuff-Overlays]]) - button.overlay:SetTexCoord(0.306875, 0.5703125, 0, 0.515625) + button.overlay:SetVertexColor(color[1], color[2], color[3]) + button.overlay:SetBlendMode("BLEND") + if element.overlay then + button.overlay:SetTexture(element.overlay) + button.overlay:SetTexCoord(0,1,0,1) + else + button.overlay:SetTexture([[Interface\Buttons\UI-Debuff-Overlays]]) + button.overlay:SetTexCoord(0.306875, 0.5703125, 0, 0.515625) + end end end diff --git a/libs/oUF_Plugins/oUF_TagsWithHeal/oUF_TagsWithHeal.lua b/libs/oUF_Plugins/oUF_TagsWithHeal/oUF_TagsWithHeal.lua index 7fda832..ca59fbe 100644 --- a/libs/oUF_Plugins/oUF_TagsWithHeal/oUF_TagsWithHeal.lua +++ b/libs/oUF_Plugins/oUF_TagsWithHeal/oUF_TagsWithHeal.lua @@ -1136,7 +1136,9 @@ local tagStrings = { ["rep"] = [[function(unit) local name, standing, min, max, value, factionID = GetWatchedFactionInfo() - return (value-min).."/"..(max-min).." "..name + if name then + return (value-min).."/"..(max-min).." "..name + end end]], } diff --git a/locales/deDE.lua b/locales/deDE.lua index c75f10c..e09761f 100644 --- a/locales/deDE.lua +++ b/locales/deDE.lua @@ -147,6 +147,8 @@ local L = { ["Timers"] = "Zeitanzeige", ["Limit timers to..."] = "Limitiere Zeitanzeige zu...", ["Position of the %s."] = "Position der %s.", +["Show stealable"] = "Zeige klaubare", +["Highlight stealable Buffs"] = "Hebe klaubare St\195\164rkungszauber hervor", ["Bigger buffs"] = "Gr\195\182ssere St\195\164rkungszauber", ["Bigger buff size"] = "Gr\195\182ssere St\195\164rkungszauber Gr\195\182sse", ["Bigger debuffs"] = "Gr\195\182ssere Schw\195\164chungszauber", diff --git a/locales/enUS.lua b/locales/enUS.lua index 0827e31..d0e3987 100644 --- a/locales/enUS.lua +++ b/locales/enUS.lua @@ -144,6 +144,8 @@ local L = { ["Timers"] = "Timers", ["Limit timers to..."] = "Limit timers to...", ["Position of the %s."] = "Position of the %s.", +["Show stealable"] = "Show stealable", +["Highlight stealable Buffs"] = "Highlight stealable Buffs", ["Bigger buffs"] = "Bigger buffs", ["Bigger buff size"] = "Bigger buff size", ["Bigger debuffs"] = "Bigger debuffs", diff --git a/locales/koKR.lua b/locales/koKR.lua index 2d9a984..1418bda 100644 --- a/locales/koKR.lua +++ b/locales/koKR.lua @@ -144,6 +144,8 @@ local L = { ["Timers"] = "시간", ["Limit timers to..."] = "다음의 시간 제한...", ["Position of the %s."] = "%s의 위치입니다.", +["Show stealable"] = "Show stealable", +["Highlight stealable Buffs"] = "Highlight stealable Buffs", ["Bigger buffs"] = "더 큰 버프", ["Bigger buff size"] = "더 큰 버프 크기", ["Bigger debuffs"] = "더 큰 디버프", diff --git a/locales/zhCN.lua b/locales/zhCN.lua index f8c7c17..88343aa 100644 --- a/locales/zhCN.lua +++ b/locales/zhCN.lua @@ -144,6 +144,8 @@ local L = { ["Timers"] = "计时", ["Limit timers to..."] = "光环计时。", ["Position of the %s."] = "%s的位置。", +["Show stealable"] = "Show stealable", +["Highlight stealable Buffs"] = "Highlight stealable Buffs", ["Bigger buffs"] = "加大自身施放", ["Bigger buff size"] = "加大尺寸", ["Bigger debuffs"] = "加大自身施放", diff --git a/locales/zhTW.lua b/locales/zhTW.lua index 22aea3e..9e798fc 100644 --- a/locales/zhTW.lua +++ b/locales/zhTW.lua @@ -144,6 +144,8 @@ local L = { ["Timers"] = "計時", ["Limit timers to..."] = "顯示光環計時。", ["Position of the %s."] = "%s的位置。", +["Show stealable"] = "Show stealable", +["Highlight stealable Buffs"] = "Highlight stealable Buffs", ["Bigger buffs"] = "放大自身施放", ["Bigger buff size"] = "放大幅度", ["Bigger debuffs"] = "放大自身施放", diff --git a/modules/Options.lua b/modules/Options.lua index 74969f2..63089f1 100644 --- a/modules/Options.lua +++ b/modules/Options.lua @@ -1093,18 +1093,24 @@ function LUF:CreateConfig() step = 1, hidden = function(info) return (LUF.db.profile.units[info[1]].auras.buffpos == "INFRAME" or LUF.db.profile.units[info[1]].auras.buffpos == "INFRAMECENTER") end }, + showSteal = { + name = L["Show stealable"], + desc = L["Highlight stealable Buffs"], + type = "toggle", + order = 11, + }, buffpos = { name = L["Position"], desc = string.format(L["Position of the %s."],L["Buffs"]), type = "select", - order = 11, + order = 12, values = {["LEFT"] = L["Left"], ["RIGHT"] = L["Right"], ["TOP"] = L["Top"], ["BOTTOM"] = L["Bottom"], ["INFRAME"] = L["Inside"], ["INFRAMECENTER"] = L["Inside Center"]}, }, buffOffset = { name = L["Y Position"], desc = L["Offset"], type = "range", - order = 12, + order = 13, min = -50, max = 50, step = 1, @@ -1114,7 +1120,7 @@ function LUF:CreateConfig() name = L["Horizontal Limit Side"], desc = L["Side on which to cut shorter than the frame"], type = "select", - order = 13, + order = 14, values = {["LEFT"] = L["Left"], ["RIGHT"] = L["Right"]}, hidden = function(info) return (LUF.db.profile.units[info[1]].auras.buffpos ~= "TOP" and LUF.db.profile.units[info[1]].auras.buffpos ~= "BOTTOM") end, }, @@ -1122,7 +1128,7 @@ function LUF:CreateConfig() name = L["Horizontal Limit"], desc = L["Limit to a percentage of the frame"], type = "range", - order = 14, + order = 15, min = 0.2, max = 1.5, step = 0.01, @@ -1134,7 +1140,7 @@ function LUF:CreateConfig() name = "Maximum Number of Buffs", desc = "Limit the maximum number of shown buffs", type = "range", - order = 15, + order = 16, min = 1, max = 32, step = 1, @@ -1142,26 +1148,26 @@ function LUF:CreateConfig() debuffheader = { name = L["Debuffs"], type = "header", - order = 16, + order = 17, }, debuffs = { name = L["Debuffs"], desc = string.format(L["Enable or disable the %s."],L["Debuffs"]), type = "toggle", - order = 17, + order = 18, }, filterdebuffs = { name = string.format(L["Filter %s"],L["Debuffs"]), desc = L["Show only debuffs that you can dispel or cast"], type = "select", - order = 18, + order = 19, values = {[1] = OFF, [2] = L["Your own"], [3] = DISPELS}, }, debuffsize = { name = L["Size"], desc = L["Set the debuffsize."], type = "range", - order = 19, + order = 20, min = 4, max = 50, step = 1, @@ -1170,7 +1176,7 @@ function LUF:CreateConfig() name = L["Bigger debuffs"], desc = EMPHASIZE_MY_SPELLS_TEXT, type = "range", - order = 20, + order = 21, min = 0, max = 20, step = 1, @@ -1180,14 +1186,14 @@ function LUF:CreateConfig() name = L["Position"], desc = string.format(L["Position of the %s."],L["Debuffs"]), type = "select", - order = 21, + order = 22, values = {["LEFT"] = L["Left"], ["RIGHT"] = L["Right"], ["TOP"] = L["Top"], ["BOTTOM"] = L["Bottom"], ["INFRAME"] = L["Inside"], ["INFRAMECENTER"] = L["Inside Center"]}, }, debuffOffset = { name = L["Y Position"], desc = L["Offset"], type = "range", - order = 22, + order = 23, min = -50, max = 50, step = 1, @@ -1197,7 +1203,7 @@ function LUF:CreateConfig() name = L["Horizontal Limit Side"], desc = L["Side on which to cut shorter than the frame"], type = "select", - order = 23, + order = 24, hidden = function(info) return (LUF.db.profile.units[info[1]].auras.debuffpos ~= "TOP" and LUF.db.profile.units[info[1]].auras.debuffpos ~= "BOTTOM") end, values = {["LEFT"] = L["Left"], ["RIGHT"] = L["Right"]}, }, @@ -1205,7 +1211,7 @@ function LUF:CreateConfig() name = L["Horizontal Limit"], desc = L["Limit to a percentage of the frame."], type = "range", - order = 24, + order = 25, min = 0.2, max = 1.5, step = 0.01, @@ -1217,7 +1223,7 @@ function LUF:CreateConfig() name = "Maximum Number of Debuffs", desc = "Limit the maximum number of shown debuffs", type = "range", - order = 25, + order = 26, min = 1, max = 40, step = 1, @@ -4244,16 +4250,24 @@ function LUF:CreateConfig() disabled = Lockdown, set = function(info, value) setGeneral(info, value) LUF:ReloadAll() end, }, + strata = { + order = 17, + type = "select", + name = "Strata", + values = {["BACKGROUND"] = "BACKGROUND", ["LOW"] = "LOW", ["MEDIUM"] = "MEDIUM", ["HIGH"] = "HIGH", ["DIALOG"] = "DIALOG", ["FULLSCREEN"] = "FULLSCREEN", ["FULLSCREEN_DIALOG"] = "FULLSCREEN_DIALOG", ["TOOLTIP"] = "TOOLTIP"}, + sorting = {[1] = "BACKGROUND", [2] = "LOW", [3] = "MEDIUM", [4] = "HIGH", [5] = "DIALOG", [6] = "FULLSCREEN", [7] = "FULLSCREEN_DIALOG", [8] = "TOOLTIP"}, + set = function(info, value) setGeneral(info, value) for unit,frame in pairs(LUF.frameIndex) do frame:SetFrameStrata(value) end end, + }, headerRange = { name = L["Range"], type = "header", - order = 17, + order = 18, }, range = { name = L["Distance"], desc = L["Distance to measure"], type = "select", - order = 18, + order = 19, values = {[10] = L["Inspect distance"], [30] = L["Follow distance"], [40] = L["Spell based"], [100] = L["Is Visible"], }, get = function(info) return LUF.db.profile.range.dist end, set = function(info, value) LUF.db.profile.range.dist = value LUF:ReloadAll() end, @@ -4262,7 +4276,7 @@ function LUF:CreateConfig() name = OPACITY, desc = L["Set the alpha."], type = "range", - order = 19, + order = 20, min = 0, max = 1, step = 0.01, @@ -7985,7 +7999,7 @@ function LUF:CreateConfig() desc = L["Type of event to switch to"], type = "select", order = 2, - values = {["DISABLED"] = ADDON_DISABLED, ["RESOLUTION"] = L["Screen Resolution"],["GROUP"] = L["Size of Group"]}, + values = {["DISABLED"] = ADDON_DISABLED, ["RESOLUTION"] = L["Screen Resolution"],["GROUP"] = L["Size of Group"],["ARENA"] = ARENA}, get = function(info) return LUF.db.char.switchtype end, set = function(info, value) LUF.db.char.switchtype = value LUF:AutoswitchProfileSetup() end, }, @@ -8051,8 +8065,10 @@ function LUF:CreateConfig() return end end - else + elseif LUF.db.char.switchtype == "GROUP" then LUF.db.char.grpdb[groupselectvalue] = value ~= "NIL" and profiledb[value] or nil + else + LUF.db.char.grpdb["ARENA"] = value ~= "NIL" and profiledb[value] or nil end end, }, diff --git a/modules/defaults.lua b/modules/defaults.lua index c55f4df..61d4844 100644 --- a/modules/defaults.lua +++ b/modules/defaults.lua @@ -33,6 +33,7 @@ function LUF:LoadDefaults() inchealTime = 4, omnicc = false, blizzardcc = false, + strata = "MEDIUM", range = { dist = 40, alpha = 0.4 }, }, }