Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
- Bump Toc
- Add #887
- Add #889
- Add #878
- Fix #882
  • Loading branch information
Aviana committed Sep 7, 2021
1 parent b531f9e commit 628c2e4
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 31 deletions.
20 changes: 19 additions & 1 deletion LunaUnitFrames.lua
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"])
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions LunaUnitFrames.toc
Original file line number Diff line number Diff line change
@@ -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/)
Expand Down
23 changes: 16 additions & 7 deletions libs/oUF_Plugins/oUF_SimpleAuras/oUF_SimpleAuras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
""
Expand Down Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion libs/oUF_Plugins/oUF_TagsWithHeal/oUF_TagsWithHeal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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]],
}

Expand Down
2 changes: 2 additions & 0 deletions locales/deDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions locales/koKR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"] = "더 큰 디버프",
Expand Down
2 changes: 2 additions & 0 deletions locales/zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"] = "加大自身施放",
Expand Down
2 changes: 2 additions & 0 deletions locales/zhTW.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"] = "放大自身施放",
Expand Down
56 changes: 36 additions & 20 deletions modules/Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -1114,15 +1120,15 @@ 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,
},
wrapbuff = {
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,
Expand All @@ -1134,34 +1140,34 @@ 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,
},
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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -1197,15 +1203,15 @@ 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"]},
},
wrapdebuff = {
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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
},
Expand Down Expand Up @@ -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,
},
Expand Down
1 change: 1 addition & 0 deletions modules/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function LUF:LoadDefaults()
inchealTime = 4,
omnicc = false,
blizzardcc = false,
strata = "MEDIUM",
range = { dist = 40, alpha = 0.4 },
},
}
Expand Down

0 comments on commit 628c2e4

Please sign in to comment.