1. I have the following piece of code extracted from a book by Paul Emmerich. However, I have been trying to use it and failing dismaly. I am trying to extract the parameters from the vararg associated with COMBATLOGEVENTUNFILTERED but it does not want to play ball. I have had some success with SPELLCASTSTART in which it does display the time it started to cast a spell. However, I am having trouble with DOT's (periodic spells) using the SPELLPERIODICCASTSTART event. It does not seem to have a time that the spell was started. All I am after is the spell that was cast, the time it was cast but these must be only from my character. I have also noticed that for some reason "Herb Gathering" is a combat event? I would really appreciate some assistance, please. This combat log API is no very clear in most toturials that I have found in books and on the web and I have noticed that quite a few people are in the same boat. This inserting codeblock is not working for me either. I have been trying for 15 minutes. No help anywhere I could find, so apologies for the formatting but it should be fairly easy to read.

     local eventHandlers = {}
    
     function onEvent(self, event, ...)
         if event == "COMBAT_LOG_EVENT_UNFILTERED" then
             return onEvent(self, select(2, ...), ...);
         elseif eventHandlers[event] then
             return eventHandlers[event](...);
         end;
     end;`
    
     function eventHandlers.SPELL_CAST_START(...)
         print(string.join(",",tostringall(...)));
     end;
    
     function eventHandlers.SPELL_PERIODIC_CAST_START(...)
         print(string.join(",",tostringall(...)));
     end;
    
    
     frame = CreateFrame("Frame");
     frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
     frame:SetScript("OnEvent", onEvent);`
    
  2. I would just use /eventtrace and make sure that you're getting the right event.

    The first event you get is SPELL_AURA_APPLIED. There is no CLEU spellcast event for instant-cast spells.

  3. I would just use /eventtrace and make sure that you're getting the right event.

    I'm not exactly sure what you mean by make sure I am getting the right event. I am also not very familiar with "eventtrace" but from what I have seen when using it, it is almost impossible to follow the trace as it scrolls up at a fairly rapid rate.

    The first event you get is SPELLAURAAPPLIED. There is no CLEU spellcast event for instant-cast spells.

    Now I am lost with regards to your reference to SPELLAURAAPPLIED. As far as I can see, this has no relevance to my question. There must be a way to extract the time that an instant cast spell was actually cast as addons such as MFClip would not be able to function and provide the timing data that they do.

    From what I can work out, the CLEU has the following fields:- timestamp, type, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags. The type is the sub-event, such as SPELLCASTSTART or SPELLCASTSUCCESS. I have tried to use the timestamp from the CLEU but I have not been successful as yet.

  4. The CLEU sub-event is SPELL_AURA_APPLIED

    The /eventtrace stop command will stop it from capturing new events, allowing you plenty of time to examine it.