From fd155f6e5d04fe7c1f58313423aabe50ea06a652 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Fri, 12 Jan 2024 14:11:48 +0700 Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=92=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ls_UI/modules/minimap/minimap.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ls_UI/modules/minimap/minimap.lua b/ls_UI/modules/minimap/minimap.lua index c749d68a..c5331e6a 100644 --- a/ls_UI/modules/minimap/minimap.lua +++ b/ls_UI/modules/minimap/minimap.lua @@ -294,7 +294,11 @@ do end function flag_proto:OnEnter() - if self.instanceName then + if self.difficultyID then + if not DifficultyUtil.GetDifficultyName(self.difficultyID) then + return + end + local p, rP, x, y = E:GetTooltipPoint(self) if p == "TOPRIGHT" then x, y = 24, 24 @@ -325,6 +329,7 @@ do function flag_proto:Update() self.instanceName = nil + self.difficultyID = nil self.difficultyName = nil self.maxPlayers = nil self:Hide() @@ -334,6 +339,7 @@ do local difficultyName, _, isHeroic, isChallengeMode, displayHeroic, displayMythic, _, isLFR = GetDifficultyInfo(difficultyID) self.instanceName = instanceName + self.difficultyID = difficultyID self.difficultyName = difficultyName self.maxPlayers = maxPlayers @@ -355,6 +361,7 @@ do if not (isHeroic or displayHeroic or displayMythic) then return end self.instanceName = instanceName + self.difficultyID = difficultyID self.difficultyName = difficultyName self.maxPlayers = maxPlayers From 5074ce50fb0b2fe813cf2d165184b654f01661c6 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Fri, 12 Jan 2024 14:12:37 +0700 Subject: [PATCH 2/6] Update for Aura API changes --- ls_UI/core/defaults.lua | 2 +- ls_UI/modules/auras/auras.lua | 18 +++++++++--------- ls_UI/modules/tooltips/tooltips.lua | 18 ++++++++++++------ 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/ls_UI/core/defaults.lua b/ls_UI/core/defaults.lua index e0fbbabb..df42cc30 100644 --- a/ls_UI/core/defaults.lua +++ b/ls_UI/core/defaults.lua @@ -315,7 +315,7 @@ D.global = { }, ["ls:debuffs"] = { events = "UNIT_AURA", - func = "function(unit)\n if not UnitCanAssist(\"player\", unit) then\n return \"\"\n end\n\n local hasDebuff = {Curse = false, Disease = false, Magic = false, Poison = false}\n local status = \"\"\n\n for i = 1, 40 do\n local name, _, _, type = UnitDebuff(unit, i, \"RAID\")\n if not name then\n break\n end\n\n if _VARS.E:IsDispellable(type) and not hasDebuff[type] then\n status = status .. _VARS.INLINE_AURA_ICONS[type]\n hasDebuff[type] = true\n end\n end\n\n return status\nend", + func = "function(unit)\n if not UnitCanAssist(\"player\", unit) then\n return \"\"\n end\n\n local hasDebuff = {Curse = false, Disease = false, Magic = false, Poison = false}\n local status = \"\"\n\n for i = 1, 40 do\n local data = C_UnitAuras.GetDebuffDataByIndex(unit, i, \"RAID\")\n if not data then\n break\n end\n\n if _VARS.E:IsDispellable(data.dispelName) and not hasDebuff[data.dispelName] then\n status = status .. _VARS.INLINE_AURA_ICONS[data.dispelName]\n hasDebuff[data.dispelName] = true\n end\n end\n\n return status\nend", }, ["ls:health:cur"] = { events = "UNIT_HEALTH UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED", diff --git a/ls_UI/modules/auras/auras.lua b/ls_UI/modules/auras/auras.lua index e8b67732..a9852cae 100644 --- a/ls_UI/modules/auras/auras.lua +++ b/ls_UI/modules/auras/auras.lua @@ -28,23 +28,23 @@ local function updateAura(button, index) end local unit = button:GetParent():GetAttribute("unit") - local name, texture, count, debuffType, duration, expirationTime = UnitAura(unit, index, filter) - if name then - button.Icon:SetTexture(texture) - button.Count:SetText(count > 1 and count or "") + local data = C_UnitAuras.GetAuraDataByIndex(unit, index, filter) + if data then + button.Icon:SetTexture(data.icon) + button.Count:SetText(data.applications > 1 and data.applications or "") - if duration and duration > 0 and expirationTime then - button.Cooldown:SetCooldown(expirationTime - duration, duration) + if data.duration and data.duration > 0 and data.expirationTime then + button.Cooldown:SetCooldown(data.expirationTime - data.duration, data.duration) button.Cooldown:Show() else button.Cooldown:Hide() end if filter == "HARMFUL" then - button.Border:SetVertexColor((C.db.global.colors.debuff[debuffType] or C.db.global.colors.debuff.None):GetRGB()) + button.Border:SetVertexColor((C.db.global.colors.debuff[data.dispelName] or C.db.global.colors.debuff.None):GetRGB()) - if debuffType and button.showDebuffType then - button.AuraType:SetTexCoord(unpack(M.textures.aura_icons[debuffType] or M.textures.aura_icons.Debuff)) + if data.dispelName and button.showDebuffType then + button.AuraType:SetTexCoord(unpack(M.textures.aura_icons[data.dispelName] or M.textures.aura_icons.Debuff)) button.AuraType:Show() else button.AuraType:Hide() diff --git a/ls_UI/modules/tooltips/tooltips.lua b/ls_UI/modules/tooltips/tooltips.lua index 5011d3c5..2a10cc21 100644 --- a/ls_UI/modules/tooltips/tooltips.lua +++ b/ls_UI/modules/tooltips/tooltips.lua @@ -174,12 +174,16 @@ function MODULE:Init() local auraGetterToAPI = { ["GetUnitAura"] = function(...) - local _, _, _, _, _, _, caster = UnitAura(unpack(...)) - return caster + local data = C_UnitAuras.GetAuraDataByIndex(unpack(...)) + if data then + return data.sourceUnit + end end, ["GetUnitBuff"] = function(...) - local _, _, _, _, _, _, caster = UnitBuff(unpack(...)) - return caster + local data = C_UnitAuras.GetBuffDataByIndex(unpack(...)) + if data then + return data.sourceUnit + end end, ["GetUnitBuffByAuraInstanceID"] = function(...) local data = C_UnitAuras.GetAuraDataByAuraInstanceID(unpack(...)) @@ -188,8 +192,10 @@ function MODULE:Init() end end, ["GetUnitDebuff"] = function(...) - local _, _, _, _, _, _, caster = UnitDebuff(unpack(...)) - return caster + local data = C_UnitAuras.GetDebuffDataByIndex(unpack(...)) + if data then + return data.sourceUnit + end end, ["GetUnitDebuffByAuraInstanceID"] = function(...) local data = C_UnitAuras.GetAuraDataByAuraInstanceID(unpack(...)) From 066d8a9c4327f211bcab3e583f7d10cb14cd68d9 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Fri, 12 Jan 2024 14:12:46 +0700 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=A7=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .luacheckrc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index b4103afd..9c44f93a 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -110,6 +110,7 @@ read_globals = { "DeadlyDebuffFrame", "DebuffFrame", "DeleteInboxItem", + "DifficultyUtil", "DUNGEONS_BUTTON", "ENCHANTED_TOOLTIP_LINE", "Enum", @@ -324,15 +325,12 @@ read_globals = { "TooltipDataProcessor", "TotemFrame", "UIParent", - "UnitAura", "UnitBattlePetLevel", "UnitBattlePetType", - "UnitBuff", "UnitClass", "UnitClassBase", "UnitClassification", "UnitCreatureType", - "UnitDebuff", "UnitEffectiveLevel", "UnitExists", "UnitFactionGroup", From e7baac090288f93b44d644d9fc285ce4524de831 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Tue, 16 Jan 2024 21:34:59 +0700 Subject: [PATCH 4/6] Update embeds --- ls_UI/embeds/oUF | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ls_UI/embeds/oUF b/ls_UI/embeds/oUF index e2b813e1..1b5b6d2e 160000 --- a/ls_UI/embeds/oUF +++ b/ls_UI/embeds/oUF @@ -1 +1 @@ -Subproject commit e2b813e13a1bc994ec629169c144b05f76d55492 +Subproject commit 1b5b6d2e22c99bf700dbc80f2a3337782cd1ce6c From 813a548aacca163ba22055251a74d4601a633c02 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Tue, 16 Jan 2024 21:37:49 +0700 Subject: [PATCH 5/6] .toc bump --- ls_UI/ls_UI.toc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ls_UI/ls_UI.toc b/ls_UI/ls_UI.toc index f91afe77..1f5cdb4d 100644 --- a/ls_UI/ls_UI.toc +++ b/ls_UI/ls_UI.toc @@ -1,6 +1,6 @@ -## Interface: 100200 +## Interface: 100205 ## Author: lightspark -## Version: 100200.04 +## Version: 100205.01 ## Title: LS: |cff1a9fc0UI|r ## Notes: Yet another UI, but this one is a bit special... ## IconTexture: Interface\AddOns\ls_UI\assets\logo-64 From b3373d344817921cdc58e99907078ce3e6fa5b13 Mon Sep 17 00:00:00 2001 From: Val Voronov Date: Tue, 16 Jan 2024 21:37:59 +0700 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=93=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ ls_UI/core/changelog.lua | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea32d074..48c78248 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## Version 100205.01 + +- Added 10.2.5 support. + ## Version 100200.04 ### Blizzard diff --git a/ls_UI/core/changelog.lua b/ls_UI/core/changelog.lua index 9cec7743..3226147f 100644 --- a/ls_UI/core/changelog.lua +++ b/ls_UI/core/changelog.lua @@ -6,7 +6,5 @@ local _G = getfenv(0) -- Mine E.CHANGELOG = [[ -### Blizzard - -- Fixed an issue where raid helm enchants would break the character panel. +- Added 10.2.5 support. ]]