WeakAuras 2 Pet dead vs missing?

I almost have these WeakAuras working.

I can trigger on a dead pet that is present.

I can trigger on a pet that is dismissed.

I can’t figure out how to trigger on a pet that is both dead and dismissed. I.e., it died, and I ran out of range of the body (which despawned), so now I need to revive it, not summon it.

How do I do that?

You don’t. You have no ability to check [dead] against a non-existent unit.

You have basically only one option here with WA:

Create a helper WA with a custom trigger/untrigger that fires on pet death and fades on pet revive. Have that as a condition of your larger WA (which presumably tells you whether to use Call Pet or Revive Pet).

Limitations: Will not persist through UI reloads or client restarts.

I personally just have a big combined pet management macro. It will automatically use Call Pet or Revive Pet (or Mend Pet) based on whether my pet is present or dead. It also includes a [mod:alt] override to let me Revive Pet in the event that my dead pet has despawned.

COMBAT_EVENT_LOG_UNFILTERED for the event UNIT_DESTROYED. Not sure if that is the correct event for a despawned pet but it seems likely.

It’s not an event that WA supports directly but you can create a custom trigger for COMBAT_EVENT_LOG_UNFILTERED and then supply your own function which checks for UNIT_DESTROYED.

It would be complicated.

I’m wondering if it would be easier to have a macro like this

#showtooltip
/cast [@pet,noexists] call pet 1
/cast [@pet,dead] Revive Pet
/cast Mend Pet

You may have to actually remove the conditionals and count on some intentional glitchiness. If the pet has despawned and call pet still fails because the pet must be revived, I’m hoping it will not trigger the gcd for the failure and would still execute revive pet. On the other hand if call pet succeeds, it should trigger the GCD and prevent revive from being executed.

Revive Pet automatically becomes Mend Pet so you don’t need both.