Thanks for the explanation, I have a better understanding of what the blocks of code mean now. I've updated the trigger and untrigger, as well as deleted the always active trigger. None of the edits have generated any errors but the OI WAs are not showing when I have the buffs now. Below is the custoemr trigger with the edits:
Code:
function()
aura_env.name, _, aura_env.icon = GetSpellInfo(aura_env.spellid)
if aura_env.debuff ~= nil then
aura_env.stacks = select(4,UnitDebuff(aura_env.unitid, GetSpellInfo(aura_env.buff), false, "player")) or 0
elseif aura_env.buff ~= nil then
aura_env.stacks = select(4,UnitBuff(aura_env.unitid, GetSpellInfo(aura_env.buff), false, "player")) or 0
else
aura_env.stacks = nil
end
if aura_env.debuff ~= nil then
if UnitDebuff(aura_env.unitid, GetSpellInfo(aura_env.debuff)) then
if aura_env.override == true then
--do not touch if override
else
aura_env.name, _, aura_env.icon = GetSpellInfo(aura_env.debuff)
end
end
elseif aura_env.buff ~= nil then
if UnitBuff(aura_env.unitid, GetSpellInfo(aura_env.buff)) then
if aura_env.override == true then
-- do not touch if override
else
aura_env.name, _, aura_env.icon = GetSpellInfo(aura_env.buff)
end
end
end
if aura_env.stacks > 0 then
return true
end
end
If this proves too complicated, I can just leave them as they always have been.