One of my abilities puts 2 stacks of a debuff on the enemy target called Winter's Chill. When Ice Lance hits the target, one stack of Winter's Chill is removed and Ice Lance does triple damage. Ice Lance sucks without Winter's Chill (or a proc which isn't relevant for this discussion) so it's important that I only cast Ice Lance when the target has the debuff.

I created a weakaura(WA) for each stack of Winter's Chill so that when the first one goes away I know to cast another Ice Lance to take the second stack. The problem I have is that the WAs are tracking Winter's Chill and don't go away until the debuff is removed from the target. Ice Lance has a travel time (missile speed) to get to the target and in that time and in the chaos of combat, I might try to cast a third Ice Lance before the second one has reached the target causing me to waste a GCD on a low damage spell.

What I want this weakaura to do is disappear on the casting of Ice Lance and only come back if for some reason the target still has the specific stack size for Winter's Chill. This was easy enough for one of the stacks; my WA had triggers for the target having 2 stacks of Winter's Chill and a trigger for me not casting Ice Lance (with a short duration). A problem arose with the WA that was only tracking 1 stack of Winter's Chill.

It was set to show when the target had at least 1 stack of Winter's Chill and Ice Lance wasn't cast (with a short duration). What was happening is I'd cast Ice Lance and the 2-stack WA would go away. Ice Lance would hit the target and remove a stack of Winter's Chill. The 1-stack WA would then see that it's trigger condition to show itself was no longer met because the target had 1 stack of Winter's Chill but I had cast Ice Lance. Once the duration I'd put on Ice Lance expired, then the WA would come back.

This flickering behavior isn't what I wanted so I looked for ways to keep the WA showing when the target went from 2 Winter's Chill stacks to 1. And that was the trigger that I was missing, a trigger on the removal of one stack of the debuff (but not the final one). I made the WA show up under the following conditions:

* Target has 2 stacks of Winter's Chill

or

* Target has 1 stack of Winter's Chill

and

** (Ice Lance was not cast or Target lost 2nd stack of Winter's Chill)

I think I mostly got the WA down but I can't figure out the durations for the Ice Lance cast or the stack of Winter's Chill being removed. As soon as I find one set of values that works when I'm far away from the target, those values don't work when I'm close to the target. Values that work close to the target don't work when I'm far away from it. Additionally, if I set values too high, the WA doesn't go away in time and I end up casting a third Ice Lance when I shouldn't. Ultimately, I want some help in making a weakaura for each stack of the debuff that goes away upon casting ice lance and not on the removal of the debuff.

The specific WeakAura:
Code:
!WA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qtzrz0DyPLT5eQ5yfjsgwIbE2SyCwwXEb1COV0cwZWo8bVA02NAsuFnEc9R4vT6tgqk0O765gDr50DYgOuJOAMr2excT4zk97wOoPjdzsKQOb9iCwB7SWD9WnasDnyMYCbNEkLyg1LuEIo9CdMmX00S2sQOyoJvDnXyb3ULBtyC8UWUWZoh8dWpcph2nSfJZuP)F35xycgBqpu)aMIeMrJtdXC2IL40xlI6mszxCQF5pUkloFH3DxL7QU2LqEKS8uY0EhWI1PhFsldZGqMOjF4AfS4tE0bRDy189FX92wjzCtoPPErImH8rtJFk)cHO9u9nLcZsElDdVOuA0(3fCU071TdrYmiRlJpAtIxhswb(pdrPeCzegnW3(9)UvwD9U5sbYk6JGWty8wc5ig1rsSdlQ7cp1PmsfAhypNskV1x5oRC7sD(NN9Vd
This additionally doesn't show up when I have a Fingers of Frost proc due to how it interacts with the rest of my UI.