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", 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. ]] 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/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 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 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/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 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(...))