Change the way that auras are scanned and kept in the aura database.
Change the way that auras are scanned and kept in the aura database.
Keep a separate aura age for each GUID so we can tell when an aura
previously present is missing in a new aura scan of that GUID without
affecting the determination of other unit's aura ages. The age is simply
the number of times the unit's auras were scanned.
Be more strict about deciding when an aura found on a unit matches one
that was recently scanned on the same unit. An aura is the same if the
following details match:
caster, duration, expiration time, stack count
Being more strict helps to "age" the auras properly, instead of tossing
them out and getting new scans each time UpdateAuras/ScanUnitAuras is run.
These changes will allow us to store more metadata in the aura properties
about the player's state (e.g., tick length, crit chance, etc.) at the
time the aura was gained.
Also, store the caster's GUID in the aura properties instead of the
caster's unit ID. The former is invariant and better suited to aura
scans triggered by CLEU events.
Rename two methods to be more descriptive about what they do:
UpdateAuras -> ScanUnitAuras
AddAura -> UnitGainedAura
Re-use code to remove expired auras and be more DRY.
Be smarter about when to trigger an Ovale refresh event by checking
whether auras have actually changed on a unit since they were last
scanned.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@896 d5049fe3-3747-40f7-a4b5-f36d6801af5f