From 436a75bf2e27c007af960be1231bc3b9bcf97b25 Mon Sep 17 00:00:00 2001 From: Casey Raethke Date: Mon, 13 Nov 2023 15:29:39 -0600 Subject: [PATCH] Fix aura rank --- libs/StatLogic/StatLogic.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/StatLogic/StatLogic.lua b/libs/StatLogic/StatLogic.lua index 4a3669b..096cf1e 100644 --- a/libs/StatLogic/StatLogic.lua +++ b/libs/StatLogic/StatLogic.lua @@ -763,7 +763,6 @@ do if not mod.tab and mod.rank then -- not a talent, so the rank is the buff rank aura.rank = #(mod.rank) end - aura.stacks = mod.buffStack or 1 local name = GetSpellInfo(mod.buff) if name then always_buffed_aura_info[name] = aura @@ -783,7 +782,7 @@ do repeat local aura = {} local name - name, _, aura.stacks, _, _, _, _, _, _, aura.spellId = UnitBuff("player", i) + name, _, _, _, _, _, _, _, _, aura.spellId = UnitBuff("player", i) if name then aura_cache[name] = aura end @@ -1114,8 +1113,9 @@ do end table.insert(addon.StatModCacheInvalidators["CHARACTER_POINTS_CHANGED"], stat) elseif case.buff and case.rank then - local r = GetPlayerBuffRank(case.buff) - value = case.rank[r] + local aura = StatLogic:GetAuraInfo(GetSpellInfo(case.buff)) + local rank = aura.rank or GetPlayerBuffRank(aura.spellId) + value = case.rank[rank] elseif case.value then value = case.value end