inthedrops: So you're suggesting having the lib communicate with group members when it detects players/mobs aura changes?
If a enemy is beyond the 100 yard combatlog radius, it's probably unnecessary to track their auras. With the amount and speed of auras changing in combatlog, there would result in way too much comm traffic to keep everyone in a raid updated.
I've added tracking of auras in combatlog and callbacks when a GUID's aura status changes. Info on the aura such as stackCount, debuffType, duration, expires and isDebuff can be retrieved using lib:GUIDAura( GUID, spellID )
I'm trying to mimic UnitAura( unitID, index ) using combat log data. The lib will update it's GUID aura info if user target/mouseover the unit but won't fire a callback for this info change.
That's a good idea. I was gonna do that awhile ago but got distracted and forgot about it. Then I seen I had duration/debuffType for 3k spells in platebuffs and decided to move it to it's own lib. But yeah, having a lib:GUIDAura(dstGUID) API that returns known auras on that GUID world be helpful.
on a unrelated note. Since some spellIDs can have varying durations, I think my current database of durations might be poisoned with durations that aren't the base duration. I wonder how I can correct this. I could go with lowest seen duration but diminishing returns on CC spells may throw it off.
LibAuraInfo-1.0 attempts to mimic UNIT_AURA and UnitAura() events and API using info seen in the combatlog. The goal being you won't need a unitID to receive updates on player/mobs active spells.
When LibAI sees someone gain a spell, it fires a callback LibAuraInfo_AURA_APPLIED(dstGUID, spellID, srcGUID, spellSchool, auraType)
The addon can then request LibAI:GUIDAuraID(dstGUID, spellID) to receive the stackCount, debuffType, duration, expires, isDebuff and casterGUID info.
LibAI also keeps a database of aura durations which aren't provided by the combatlog. To keep the durations more accurate, LibAI keeps track if a caster has a unusual spell duration (alerted by talents/glyph/gear) and uses that duration when it sees that person cast the spell again. LibAI also keeps track of diminishing returns on spell durations.
I created LibAuraInfo so that PlateBuffs would be notified when a player or mob gained/lost a aura. This way the user doesn't need to target/mouseover units to update their known auras.