Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ls- committed Jan 16, 2024
2 parents 28b1664 + b3373d3 commit 2682230
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 26 deletions.
4 changes: 1 addition & 3 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ read_globals = {
"DeadlyDebuffFrame",
"DebuffFrame",
"DeleteInboxItem",
"DifficultyUtil",
"DUNGEONS_BUTTON",
"ENCHANTED_TOOLTIP_LINE",
"Enum",
Expand Down Expand Up @@ -324,15 +325,12 @@ read_globals = {
"TooltipDataProcessor",
"TotemFrame",
"UIParent",
"UnitAura",
"UnitBattlePetLevel",
"UnitBattlePetType",
"UnitBuff",
"UnitClass",
"UnitClassBase",
"UnitClassification",
"UnitCreatureType",
"UnitDebuff",
"UnitEffectiveLevel",
"UnitExists",
"UnitFactionGroup",
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## Version 100205.01

- Added 10.2.5 support.

## Version 100200.04

### Blizzard
Expand Down
4 changes: 1 addition & 3 deletions ls_UI/core/changelog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.
]]
2 changes: 1 addition & 1 deletion ls_UI/core/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion ls_UI/embeds/oUF
4 changes: 2 additions & 2 deletions ls_UI/ls_UI.toc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
18 changes: 9 additions & 9 deletions ls_UI/modules/auras/auras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
9 changes: 8 additions & 1 deletion ls_UI/modules/minimap/minimap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -325,6 +329,7 @@ do

function flag_proto:Update()
self.instanceName = nil
self.difficultyID = nil
self.difficultyName = nil
self.maxPlayers = nil
self:Hide()
Expand All @@ -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

Expand All @@ -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

Expand Down
18 changes: 12 additions & 6 deletions ls_UI/modules/tooltips/tooltips.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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(...))
Expand All @@ -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(...))
Expand Down

0 comments on commit 2682230

Please sign in to comment.