mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
2a562e0550
ValidateAura resolved remote aura timers from libdebuff's allBuffAuras and then from AllCasterAuraTracking via FindAllCasterAuraByName. Both existed for one reason: vanilla cannot report a timer for an aura on a unit other than the player. ClassicAPI's Aura::Source cache does, reconstructing duration and expirationTime for any unit from the observed SMSG_SPELL_GO -- caster-modified, so talent extensions and combo-point finisher scaling are already applied, and Carnage's roll-gated Rip/Rake refresh is handled in the DLL rather than mirrored in Lua. Replaced that ~70-line cascade with ResolveUnitAuraViaClassicAPI, a positional C_UnitAuras.UnitAura scan over the relevant range. Matching stays ours -- by spellID when the conditional supplied a number, else by lowercased name, since C_UnitAuras' own by-name lookup is case-sensitive and exact and would miss [debuff:thunder_clap]. It runs after the existing scans and overrides them, which is what "source of truth" means here. Also drops the libdebuff UnitBuff timeleft bug the old comments worked around (timeleft reporting ~1000s), since nothing reads it on this path any more. Presence and stacks from C_UnitAuras are reliable. Timing is best-effort by design: an aura cast before login, or one refreshed at max stacks, yields no expirationTime, and remaining is left nil so the caller keeps its found-and-0 default. A permanent aura (duration 0) reports -1, matching the existing convention. Still on the old machinery and not yet migrated: the non-player overflow-slot buff path (AllCasterAuraTracking, guarded by a debuff-slot check) and the player branches. AllCasterAuraTracking still has 56 references across 5 files, mostly OverflowBuffFrame and Conditionals.