Originally Posted by Phanx
Well, assuming that's what's causing the problem, it's likely only doing so because you're calling it potentially hundreds of times per second in combat, in response to UNIT_AURA (multiply that by the number of units you use this element on). You should keep track of whether the timer is already running, and if so, just return out if the buff is still active.
|
Thanks for the tip, I'll try to add a check for the texture and duration so it hopefully will happen alot less frequently.
For the other bits it works with UnitBuff aswell, this:
Lua Code:
UnitDebuff = nil
index = 0
resets the counter and sets the local UnitDebuff to nil. So it then checks for Buffs after Debuffs. It's abit hard to read though, one day i might make it nicer