balakethelock / SuperAPI

The companion compatibility addon to the 1.12.1 client mod SuperWoW
10 stars 7 forks source link

not issue but question... #11

Open Zelfreg opened 6 days ago

Zelfreg commented 6 days ago

Good day! Is here any option to turn off extra buffs or maybe an advice how to index them within loop ie

local i, target_spell_id = 1, 123
while UnitBuff("player", i) do
            local spell_path, stack_count, spell_id = UnitBuff("player", i)
            if spell_id == target_spell_id then
                break
            end
            i = i + 1
        end
print(i)
balakethelock commented 6 days ago

Use GetPlayerBuff and GetPlayerBuffID(buffindex) instead of UnitBuff

Zelfreg commented 6 days ago

thx! gonna try it