diff --git a/WeakAuras/AuraWarnings.lua b/WeakAuras/AuraWarnings.lua index 70b42e7..f8bb689 100644 --- a/WeakAuras/AuraWarnings.lua +++ b/WeakAuras/AuraWarnings.lua @@ -54,10 +54,10 @@ local severityLevel = { } local icons = { - info = { path = [[Interface\FriendsFrame\InformationIcon]] }, - sound = { path = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\ChatFrame", texCoords = {0.757812, 0.871094, 0.0078125, 0.234375} }, - warning = { path = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\ServicesAtlas", texCoords = {0.000976562, 0.0419922, 0.961914, 0.998047} }, - error = { path = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\HelpIcon-Bug" }, + info = [[Interface\FriendsFrame\InformationIcon]], + sound = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\ChatFrame", + warning = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\ServicesAtlas", + error = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\HelpIcon-Bug", } local titles = { @@ -76,13 +76,7 @@ local function AddMessages(result, messages, icon, mixedSeverity) result = result .. "\n\n" end if mixedSeverity then - local iconPath = icon.path - local texCoords = icon.texCoords - if texCoords then - result = result .. string.format("|T%s:12:12:0:0:64:64:%d:%d:%d:%d|t", iconPath, texCoords[1] * 64, texCoords[2] * 64, texCoords[3] * 64, texCoords[4] * 64) - else - result = result .. string.format("|T%s:12:12:0:0:64:64:4:60:4:60|t", iconPath) - end + result = result .. "|T" .. icon .. ":12:12:0:0:64:64:4:60:4:60|t" end result = result .. message end diff --git a/WeakAuras/DiscordList.lua b/WeakAuras/DiscordList.lua index 776801e..18e9d2a 100644 --- a/WeakAuras/DiscordList.lua +++ b/WeakAuras/DiscordList.lua @@ -28,6 +28,7 @@ Private.DiscordList = { [=[Ifor]=], [=[Ipwnturkeys]=], [=[Ironi]=], + [=[Jiberish]=], [=[Jods]=], [=[kanegasi]=], [=[Koxy]=], @@ -41,9 +42,9 @@ Private.DiscordList = { [=[Mynze]=], [=[Nona]=], [=[NostraDumAzz]=], + [=[Ocelots]=], [=[Oi]=], [=[Ora]=], - [=[ParkSaeRoyi]=], [=[phoenix7700]=], [=[Pseiko]=], [=[reggie]=], diff --git a/WeakAuras/Init.lua b/WeakAuras/Init.lua index 3832bf9..912165c 100644 --- a/WeakAuras/Init.lua +++ b/WeakAuras/Init.lua @@ -8,7 +8,7 @@ WeakAuras.halfWidth = WeakAuras.normalWidth / 2 WeakAuras.doubleWidth = WeakAuras.normalWidth * 2 local versionStringFromToc = GetAddOnMetadata("WeakAuras", "Version") -local versionString = "5.19.0 Beta" +local versionString = "5.19.1 Beta" local buildTime = "20250127040000" local isAwesomeEnabled = C_NamePlate and C_NamePlate.GetNamePlateForUnit and true or false diff --git a/WeakAuras/LibGroupTalentsWrapper.lua b/WeakAuras/LibGroupTalentsWrapper.lua index 09ac918..322a9ec 100644 --- a/WeakAuras/LibGroupTalentsWrapper.lua +++ b/WeakAuras/LibGroupTalentsWrapper.lua @@ -3,7 +3,7 @@ if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... -- Lua APIs -local unpack = unpack +local unpack, wipe = unpack, wipe -- WoW APIs local UnitName, UnitIsUnit, UnitClass, GetNumGroupMembers = UnitName, UnitIsUnit, UnitClass, GetNumGroupMembers @@ -39,23 +39,15 @@ if LibGroupTalents then local ownName = UnitName("player") local numMembers = GetNumGroupMembers() - local units - if IsInRaid() then - units = WeakAuras.raidUnits - else - units = WeakAuras.partyUnits - end + local units = IsInRaid() and WeakAuras.raidUnits or WeakAuras.partyUnits + nameToUnitMap = { [ownName] = "player" } for i = 1, numMembers do - local groupUnit = units[i] - if groupUnit then - local groupUnitName = UnitName(groupUnit) - if groupUnitName then - nameToUnitMap[groupUnitName] = groupUnit - end + local groupUnitName = UnitName(units[i]) + if groupUnitName then + nameToUnitMap[groupUnitName] = groupUnit end end - nameToUnitMap[ownName] = "player" for storedName in pairs(nameToSpecMap) do if not nameToUnitMap[storedName] then @@ -66,21 +58,18 @@ if LibGroupTalents then end local specInfo = { LibGroupTalents:GetUnitTalentSpec(unit) } - if specInfo and #specInfo > 0 then - local class = select(2, UnitClass(unit)) - if specInfo and #specInfo > 0 and class then - nameToSpecMap[unitName] = { - class .. specInfo[1], unpack(specInfo) - } - end + local class = select(2, UnitClass(unit)) + if specInfo and #specInfo > 0 and class then + nameToSpecMap[unitName] = { + class .. specInfo[1], unpack(specInfo) + } end nameToUnitRole[unitName] = LibGroupTalents:GetUnitRole(unit) - local glyphs = { LibGroupTalents:GetUnitGlyphs(unit) } - if glyphs and #glyphs > 0 then - nameToGlyphs[unitName] = {} - for _, glyphId in ipairs(glyphs) do + nameToGlyphs[unitName] = {} + for _, glyphId in ipairs({ LibGroupTalents:GetUnitGlyphs(unit) }) do + if glyphId then nameToGlyphs[unitName][glyphId] = true end end @@ -153,9 +142,9 @@ if LibGroupTalents then local glyphs = { LibGroupTalents:GetUnitGlyphs(unit) } if glyphs then for _, id in ipairs(glyphs) do - if id == glyphId then - return true - end + if id == glyphId then + return true + end end end end diff --git a/WeakAuras/Libs/LibGetFrame-1.0/LibGetFrame-1.0.lua b/WeakAuras/Libs/LibGetFrame-1.0/LibGetFrame-1.0.lua index 88f3a54..d8618b0 100644 --- a/WeakAuras/Libs/LibGetFrame-1.0/LibGetFrame-1.0.lua +++ b/WeakAuras/Libs/LibGetFrame-1.0/LibGetFrame-1.0.lua @@ -237,10 +237,8 @@ function CacheMonitorMixin:CalcRemoved() end end function CacheMonitorMixin:WriteCache() - local tmp = self.data - self.data = self.cache - self.cache = tmp - wipe(self.cache) + wipe(self.data) + self.data, self.cache = self.cache, {} end function CacheMonitorMixin:Reset() if self.makeDiff then @@ -693,7 +691,6 @@ function lib.GetUnitNameplate(unit) return nameplate.UnitFrame.Name -- elvui someday elseif nameplate.unitFrame and nameplate.unitFrame.Health and nameplate.unitFrame.Health:IsShown() then - return nameplate.unitFrame.Health elseif nameplate.unitFrame and nameplate.unitFrame.Name and nameplate.unitFrame.Name:IsShown() then return nameplate.unitFrame.Name diff --git a/WeakAuras/Libs/LibGetFrame-1.0/LibGetFrame-1.0.xml b/WeakAuras/Libs/LibGetFrame-1.0/LibGetFrame-1.0.xml index 9655921..ec68612 100644 --- a/WeakAuras/Libs/LibGetFrame-1.0/LibGetFrame-1.0.xml +++ b/WeakAuras/Libs/LibGetFrame-1.0/LibGetFrame-1.0.xml @@ -2,6 +2,6 @@ ..\FrameXML\UI.xsd">