View Single Post
08-07-19, 10:42 AM   #2
aallkkaa
A Warpwood Thunder Caller
 
aallkkaa's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2017
Posts: 98
I can't give you a real answer (because I don't have the knowledge), but I can throw a hint at you:

AceTimer-3.0.lua mentions:
Code:
-- AceTimer is currently limited to firing timers at a frequency of 0.01s as this is what the WoW timer API
-- restricts us to.
So, the "several hundred milliseconds later" might actually be exactly 0.01 seconds, plust latency. Blizzard API functions (not Ace3) of interest to you here:
C_Timer.After
GetNetStats
So, my idea is that, upon UNIT_AURA firing, you'd get the world latency via GetNetStats(), add that value to 0.01 and set a one time timer, via C_Timer.After(), to execute your GetSpellDescription() routine.

I haven't tested this, but I think it should work fairly well.
Do note that the game itself updates the recorded latency only once every 30 secons, so there might be some times where the above method fails because of instant latency higher than the last recorded value. Adding some extra padding time might be a good idea.
  Reply With Quote