12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

618 Part IV ■ <strong>Reference</strong>CombatLogClearEntriesRemoves all entries from the combat log.CombatLogGetCurrentEntryReturns the combat log event in<strong>for</strong>mation <strong>for</strong> the current entry <strong>and</strong> advancesto the next entry.timestamp, event, srcGUID, srcName, srcFlags, destGUID, destName, idestFlags, ... = CombatLogGetCurrentEntry([ignoreFilter])See COMBAT_LOG_EVENT <strong>for</strong> details <strong>of</strong> the event in<strong>for</strong>mation.The combat log maintains a ‘‘cursor’’ in the list <strong>of</strong> entries; this function returnsin<strong>for</strong>mation about the event at the cursor position <strong>and</strong> advances the cursor tothe next entry. Since this function is used by the default UI’s combat logdisplay, the cursor position is usually at the end <strong>of</strong> the log; calling it thusreturns nothing. The function CombatLogSetCurrentEntry() can be used to‘‘rewind’’ the combat log cursor, enabling retrieval <strong>of</strong> in<strong>for</strong>mation about earlierevents.Arguments:ignoreFilter (optional)—True to use the entire saved combat log history;false or omitted to use only events matching the current filter (boolean)Returns:timestamp—Time at which the event occurred (same <strong>for</strong>mat astime() <strong>and</strong> date(), but with millisecond precision) (number)event—Type <strong>of</strong> combat log event (string)srcGUID—GUID <strong>of</strong> the unit that initiated the event (string, guid)srcName—Name <strong>of</strong> the unit that initiated the event (string)srcFlags—Flags indicating the nature <strong>of</strong> the source unit (number, bitfield)destGUID—GUID <strong>of</strong> the unit that was the target <strong>of</strong> the event (string,guid)destName—Name <strong>of</strong> the unit that was the target <strong>of</strong> the event (string)destFlags—Flags indicating the nature <strong>of</strong> the target unit (number, bitfield)...—Additional arguments specific to the event type (list)CombatLogGetNumEntriesReturns the number <strong>of</strong> available combat log events.CombatLogGetNumEntries(ignoreFilter)Arguments:ignoreFilter—True to use the entire saved combat log history; falseor omitted to use only events matching the current filter (boolean)CombatLogGetRetentionTimeReturns the amount <strong>of</strong> time combat log entries are stored.seconds = CombatLogGetRetentionTime()Returns:seconds—Amount <strong>of</strong> time entries remain available (number)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!