The thread's image is what I have for when you ARE targeted, I'm wondering if it's possible to have a weakaura with in-built weakauras triggers that allows the inverse? I use a lot of Causese's weakauras and he often has this custom code for targeted spells, I'm also wondering if that is better or worse than just using a default trigger. Example below, thanks for any help.
if event == "UNIT_TARGET"
and UnitIsUnit(unit.."target", "player")
then
local _,_,_,_,expirationTime,_,_,_,spellId = UnitCastingInfo(unit)
local guid = UnitGUID(unit)
if spellId
and guid
and (spellId == 291928 or spellId == 292264)
and not allstates[guid] then
allstates[guid] = {
show = true,
changed = true,
progressType = "timed",
duration = expirationTime / 1000 - GetTime(),
expirationTime = expirationTime / 1000,
unit = unit,
autoHide = true,
}
return true
end
elseif event == "UNIT_SPELLCAST_STOP" and (spellId == 291928 or spellId == 292264) then
local state = allstates[UnitGUID(unit)]
if state then
state.show = false
state.changed = true
return true
end
end
end```