Hello, i'm working on a SEF aura that could track target's health (maybe not 100% accuracy).
I thought that the best way to test it is to share with others and let them try it, catching suggestions and improvements
For now it keeps track of your SEF and SEF's targets (my mainly purpose was to know if my SEF are next to disappear)
It also provides an "alert" if you are targetting the same target of one of them (a simply red flashing textures overlapping the icon)
Aura is "customizable", i mean, atleast the core provides, for each SEF summoned:
- target's name, lost health, max health, health%
- SEF name, icon, lost health, max health, health%
Well, code is little tricky cause target must be save at spell cast and tracked by his id in the logs, calculating damage and healing on himself, so there could be some inaccuracies when updating the health pools (i haven't tested the healing part yet). For this, If /reload is typed when SEF were already summoned, the tracking is lost.
Just let me know bugs or suggestions, and i hope you can find it useful.
Tracking is tricky as i said, what is essential is the GUID of your SEF target.
Once you got that, saved somewhere (ex, variable named SEF.target), and a variable that keep track if you got SEF active (easily trackable by PLAYER_TOTEM_UPDATE event or with API function GetTotemInfo()) you can simply do an aura with custom triggers:
- Trigger: return (SEF.active and SEF.target == UnitGUID("target"));
- UnTrigger: return not (SEF.active and SEF.target == UnitGUID("target")); -- just the negation of trigger function
The non-trivial fact is that you can't retrieve the targets of your SEF in any moment in time, so neither their infos (healts, name, ecc..), cause there is no API to retrieve totem's target. What i found is that you can save them from SPELL_CAST_SUCCESS event and use them until SEF duration.
I understand your method, I just don't have the LUA skills to create the whole thing myself. If you're too busy or prefer to focus on your more feature-rich version that's cool, it's still a huge help.