• 0

    posted a message on Combat log events and timestamps

    Hello there!

    I'm trying to get a better understanding of how events and combat logs work in WoW. This is my current understanding:

    From what I can tell, the only way to guess when a spell is attempted to be cast is `CURRENT_SPELL_CAST_CHANGED` then I imagine the intent to cast the spell is sent to the server and then two events are fired if the cast is successful:
    - `UNIT_SPELLCAST_SENT`
    - `UNIT_SPELLCAST_SUCCEEDED`

    If unsuccessful a single event is fired:
    - `UNIT_SPELLCAST_FAILED`

    Sometimes the failed event doesn't even seem to make a round-trip to the server (I tested on a DK and the FAILED event occurs at the same time as my macro cast event when I don't have the runes available)

    So far, is my understanding correct?

    A few more questions:
    - Are the timestamps returned in the events generated by the server or the client? I've heard that they are based on the client's time but that can be true and still have the server generate them, just based on the client's starting time or something.
    - For the case where the failed event is created directly by the client (out of runes, and maybe other conditions like GCD) that seems to negatively effect those with high ping since the intent will not be sent to the server until the runes are available again. The spell queue window can also not be used until the resources are available. 
    - If the timestamps are server generated then the client can synchronize the rune state to the correct time, but again latency would mean you are always actually casting after the runes have been regenerated

    Hopefully I have articulated what I'm asking well enough. I'd love to learn more about all this in more detail. This is from simply inspecting `/etrace`, from what I can find there's nothing that goes over the WoW combat system and events in detail (what is client side, how spells are validated, etc.)



    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.