Thread Tools Display Modes
02-22-09, 03:46 AM   #1
&res
A Kobold Labourer
Join Date: Feb 2009
Posts: 1
Combat Log Event Timing

Hello. I'm new here and new to ui customization as well. And this is my first post here I'm working on my first simple addon and I got a question about combat log event timing.

The addon basically tries to predict when a next 'tick' of a channeled spell lands. The event I monitor is "COMBAT_LOG_EVENT_UNFILTERED". On event type "SPELL_AURA_APPLIED" I get channeling duration with select(6, UnitBuff("player", spellName)) and divide it with total number of ticks to get the time for one tick. Now when on event type "SPELL_PERIODIC_DAMAGE" I compare the computed tick time with the actual time (by using GetTime() in appropriate places) the difference seems to be in range +- 0.3 seconds. When a tick takes around 2.5 sec then it is quite a lot imho.

Is it because of latency (was around 75ms at the time I tested) or do the combat log events just land inaccurately like this? Or are there some other ways more accurate than combat log to detect when periodic damage (or any spell/action really) lands?

Thank you.
  Reply With Quote
02-23-09, 10:40 PM   #2
tsadok
An Aku'mai Servant
 
tsadok's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 32
Even if the server sent the ticks off at precise intervals, you're relying on the public internet to get the message to you. So you have to have a "flexible" attitude to time. The good news is that because WoW uses TCP/IP the ticks will get there, even if they take longer or less than you expect.

Maybe you could get the addon to time the combat log events as they arrive, and arrive at a statistically predicted time for the individual user. If you just want to alert the user "You receive 101 damage" at 2.5 seconds, you can safely do that as (unless it is dispelled) the damage tick will come sooner or later.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Combat Log Event Timing

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off