Instead of tracking it on demand on each pulse, rather make an event listener to build the buffs table (on aura applied / removed).
Player is the top priority but the handler should be flexible to take any UnitIDs/GUID (so, in the future it could be extended to UnitIDs even if the GUID changes, which is something that can happen with nameplates tracking especially).
Instead of tracking it on demand on each pulse, rather make an event listener to build the buffs table (on aura applied / removed).
Player is the top priority but the handler should be flexible to take any UnitIDs/GUID (so, in the future it could be extended to UnitIDs even if the GUID changes, which is something that can happen with nameplates tracking especially).