Question

I am trying to get a trigger that will show with the sunfire debuff has less time then my nature's grace buff. the lua calls seem to be pulling the correct number, but it is constantly returning true?

function ()
    _,_,_,_,_,_,sundur= UnitDebuff("target","Sunfire","player");
    _,_,_,_,_,_,NGDur= UnitAura("player","Nature's Grace");
    if sundur and NGDur  then
        if sundur<NGDur+2 then
            return true
        else
            return false
        end
    end
end
Was it helpful?

Solution

The issue i found was that the ad don was allowing the declared variables to be saved globally which was causing it not to be updated properly even as i changed them. I also had to change one part of code, removing the "" around player only on the uniteDebuff "caster" filter.

local _,_,_,_,_,_,sundur= UnitDebuff("target","Sunfire",player);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top