Focus conditional doesn't work properly when the focus unit no longer exists.
Instead of not doing anything, it will deselect your current target and call TargetLastTarget() every time you press the macro. (Spell cast is also triggered, but im not sure if thats an issue caused by CastModifier or not)
This happens with both ClassicFocus and FocusFrame compatibility.
How to reproduce:
Set any unit as focus.
Walk away until you get "Unknown Unit" error when pressing the macro posted above.
Target a new unit with a different name and press the macro 2 times.
Just a note, changing return true; inside MMC.TryTargetFocus() to this:
return UnitExists("target") and UnitName("target") == name
seems to fix it. But it still bugs out when using multiple conditionals.
I'm not sure if there's a proper fix for this because of the way focus targeting works in vanilla. But I'll look into this when I find some time to do so.
/cast [@focus] spellName
Focus conditional doesn't work properly when the focus unit no longer exists. Instead of not doing anything, it will deselect your current target and call TargetLastTarget() every time you press the macro. (Spell cast is also triggered, but im not sure if thats an issue caused by CastModifier or not) This happens with both ClassicFocus and FocusFrame compatibility.
How to reproduce:
Just a note, changing
return true;
inside MMC.TryTargetFocus() to this:return UnitExists("target") and UnitName("target") == name
seems to fix it. But it still bugs out when using multiple conditionals.