Tracking debuffs on multiple units affected by AoE spells
What would be the best way to track multiple targets affected by multiple AoE spells?
Each AoE spell applies the same debuff to all units within the area of effect e.g. Druid Feral's Thrash is a multitarget spell which doesn't need a valid single target but applies DoTs to all non-friendly units including invisible units. Similarly, Primal Wrath does the same with a different debuff.
I made a simple function with Thrash. It is logged by CLEU using subevents such as "SPELL_DAMAGE", "SPELL_CAST_SUCCESS", "SPELL_CAST_FAILED", etc. I tried the following code:
-- spellID, sourceGUID etc. comes from CLEU
if sourceGUID ~= UnitGUID("player")thenreturnend
-- Thrash spellID: 106830
if subevent =="SPELL_CAST_SUCCESS"and spellID ==106830then
but the table auratable.targets is empty after each combat session.
I thought about catching the "UNIT_AURA" event and if a nameplate gains a debuff but having to test 40 units and checking 40 indices of possible debuff per unit each time I apply one of the AoE spells seems like a lot of loops to do.