Just FYI there is no reason to define variables outside of a loop when they will only be used inside of the loop, and doing it anyway can have
unintended consequences depending on what you're using the variables for.
Don't:
Code:
local icon, count, dispelType, expires, caster, spellID, canApplyAura, isBoss
for i = 1, 40 do
_, _, icon, count, dispelType, _, expires, caster, _, _, spellID, canApplyAura, isBoss = UnitDebuff(self.displayedUnit or self.unit, i)
Do:
Code:
for i = 1, 40 do
local _, _, icon, count, dispelType, _, expires, caster, _, _, spellID, canApplyAura, isBoss = UnitDebuff(self.displayedUnit or self.unit, i)
(Also, your code was leaking a global _ variable, which in the past has caused UI-wide breakage. Be careful about any global leakage, but especially _ and other common variable names.)