From 7782c98ad6ca635ffa4201a813cb8bc1e8d16c35 Mon Sep 17 00:00:00 2001 From: Flamanis Date: Fri, 7 Jun 2024 22:30:45 -0500 Subject: [PATCH] Fix UnitBuff --- functions/spec_augmentation.lua | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/functions/spec_augmentation.lua b/functions/spec_augmentation.lua index c2c3902b..1c31cc5a 100644 --- a/functions/spec_augmentation.lua +++ b/functions/spec_augmentation.lua @@ -16,6 +16,7 @@ local CONST_SPELLID_INFERNOBLESS = 410263 local UnitExists = UnitExists local UnitIsUnit = UnitIsUnit local GetSpellInfo = Details222.GetSpellInfo +local UnitAuraBySpellName = C_UnitAuras.GetAuraDataBySpellName local augmentationFunctions = Details222.SpecHelpers[1473] local augmentationCache = Details222.SpecHelpers[1473].augmentation_cache @@ -28,14 +29,8 @@ local getAmountOfBuffsAppliedBySpellId = function(spellId) for i, unitId in ipairs(Details222.UnitIdCache.PartyIds) do if (UnitExists(unitId)) then - for o = 1, 40 do - local auraName = UnitBuff(unitId, o) - if (auraName == spellName) then - amountBuffs = amountBuffs + 1 - break - elseif (not auraName) then - break - end + if UnitAuraBySpellName(unitId, spellName) then + amountBuffs = amountBuffs + 1 end else break