From 3936d7f6820d3e0f4ed749955cd9c4755949fbc9 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Thu, 15 Aug 2024 19:38:46 +0200 Subject: [PATCH] Update some more deprecated aura functions --- .luacheckrc | 1 - modules/health.lua | 2 +- modules/highlight.lua | 2 +- modules/tags.lua | 7 ++++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index 455656373..6d9ed6fbd 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -90,7 +90,6 @@ read_globals = { "UnitClass", "UnitClassification", "UnitCreatureFamily", - "UnitDebuff", "UnitExists", "UnitFactionGroup", "UnitGetIncomingHeals", diff --git a/modules/health.lua b/modules/health.lua index 187e0641b..f9081cf59 100755 --- a/modules/health.lua +++ b/modules/health.lua @@ -62,7 +62,7 @@ function Health:UpdateAura(frame) local id = 0 while( true ) do id = id + 1 - local name, _, _, auraType = UnitDebuff(frame.unit, id) + local name, _, _, auraType = AuraUtil.UnpackAuraData(C_UnitAuras.GetDebuffDataByIndex(frame.unit, id)) if( not name ) then break end if( canCure[auraType] ) then diff --git a/modules/highlight.lua b/modules/highlight.lua index 637f46861..3fec3d62e 100755 --- a/modules/highlight.lua +++ b/modules/highlight.lua @@ -179,7 +179,7 @@ function Highlight:UpdateAura(frame) local id = 0 while( true ) do id = id + 1 - local name, _, _, auraType = UnitDebuff(frame.unit, id) + local name, _, _, auraType = AuraUtil.UnpackAuraData(C_UnitAuras.GetDebuffDataByIndex(frame.unit, id)) if( not name ) then break end if( auraType == "" ) then auraType = "Enrage" end diff --git a/modules/tags.lua b/modules/tags.lua index 518399a23..25ce37d61 100755 --- a/modules/tags.lua +++ b/modules/tags.lua @@ -1501,9 +1501,10 @@ local function loadAPIEvents() ["UnitIsPVPFreeForAll"] = "PLAYER_FLAGS_CHANGED UNIT_FACTION", ["UnitCastingInfo"] = "UNIT_SPELLCAST_START UNIT_SPELLCAST_STOP UNIT_SPELLCAST_FAILED UNIT_SPELLCAST_INTERRUPTED UNIT_SPELLCAST_DELAYED", ["UnitChannelInfo"] = "UNIT_SPELLCAST_CHANNEL_START UNIT_SPELLCAST_CHANNEL_STOP UNIT_SPELLCAST_CHANNEL_INTERRUPTED UNIT_SPELLCAST_CHANNEL_UPDATE", - ["UnitAura"] = "UNIT_AURA", - ["UnitBuff"] = "UNIT_AURA", - ["UnitDebuff"] = "UNIT_AURA", + ["GetAuraDataByIndex"] = "UNIT_AURA", + ["GetBuffDataByIndex"] = "UNIT_AURA", + ["GetDebuffDataByIndex"] = "UNIT_AURA", + ["UnitAuraBySpell"] = "UNIT_AURA", ["UnitXPMax"] = "UNIT_PET_EXPERIENCE PLAYER_XP_UPDATE PLAYER_LEVEL_UP", ["UnitGetTotalAbsorbs"] = "UNIT_ABSORB_AMOUNT_CHANGED", ["UnitXP%("] = "UNIT_PET_EXPERIENCE PLAYER_XP_UPDATE PLAYER_LEVEL_UP",