Skip to main content

Event

Struct Event 

#[repr(C)]
pub struct Event {
Show 27 fields pub time: u64, pub src_agent: u64, pub dst_agent: u64, pub value: i32, pub buff_dmg: i32, pub overstack_value: u32, pub skill_id: u32, pub src_instance_id: u16, pub dst_instance_id: u16, pub src_master_instance_id: u16, pub dst_master_instance_id: u16, pub affinity: u8, pub buff: u8, pub result: u8, pub is_activation: u8, pub is_buffremove: u8, pub is_ninety: u8, pub is_fifty: u8, pub is_moving: u8, pub is_statechange: u8, pub is_flanking: u8, pub is_shields: u8, pub is_offcycle: u8, pub pad61: u8, pub pad62: u8, pub pad63: u8, pub pad64: u8,
}
Expand description

ArcDPS event.

Fields§

§time: u64

timeGetTime() at time of registering the event.

§src_agent: u64

Agent that caused the event.

§dst_agent: u64

Agent the event happened to.

§value: i32

Value, if relevant to the event.

§buff_dmg: i32

Buff damage, if relevant to the event.

§overstack_value: u32

Overstack value, if relevant to the event.

§skill_id: u32

Skill id of the relevant skill (can be zero).

§src_instance_id: u16

Instance id of source agent as appears in game at time of event.

§dst_instance_id: u16

Instance id of destination agent as appears in game at time of event.

§src_master_instance_id: u16

If src_agent has a master (e.g. is minion), will be equal to instance id of master, zero otherwise.

§dst_master_instance_id: u16

If dst_agent has a master (e.g. is minion), will be equal to instance id of master, zero otherwise.

§affinity: u8

Current affinity of src_agent and dst_agent.

Use Event::get_affinity to obtain the value as Affinity.

Arc calls this “iff” for if friend/foe.

§buff: u8

Buff, if relevant to the event.

§result: u8

Combat result for combat events.

§is_activation: u8

Whether event is a kind of activation event.

Use Event::get_animation_progress to obtain the value as AnimationProgress.

§is_buffremove: u8

Whether event is a kind of buff remove event.

Use Event::get_buff_remove to obtain the value as BuffRemove.

§is_ninety: u8

Whether src_agent is above 90% Health.

§is_fifty: u8

Whether dst_agent is below 50% Health.

§is_moving: u8

Whether src_agent is moving at time of event.

§is_statechange: u8

Whether event is a kind of state change event.

Use Event::get_statechange to obtain the value as StateChange.

§is_flanking: u8

Whether src_agent is flanking at time of event.

The value lies in a range of 1 to 135 degrees where 135 is rear.

§is_shields: u8

Shields, if relevant to the event.

§is_offcycle: u8

For relevant events this contains when the buff cycle happened.

Use [Event::get_buffcycle] to obtain the value as [BuffCycle].

§pad61: u8

Padding.

May contain information depending on the kind of event.

§pad62: u8

Padding.

May contain information depending on the kind of event.

§pad63: u8

Padding.

May contain information depending on the kind of event.

§pad64: u8

Padding.

May contain information depending on the kind of event.

Implementations§

§

impl Event

pub fn into_kind(self) -> EventKind

Converts the event into its EventKind representation.

pub fn into_legacy(self) -> LegacyEventKind

Converts the event into its LegacyEventKind representation.

pub fn is_legacy(&self) -> bool

Checks whether the event is a legacy event.

pub unsafe fn extract<T>(&self) -> T
where T: Extract,

Forcefully extracts a type implementing Extract from the event.

§Safety

This is safe when the given event is a valid event to extract the type from.

pub fn try_extract<T>(&self) -> Option<T>
where T: TryExtract,

Attempts to extract a type implementing TryExtract from the event.

pub fn get_statechange(&self) -> StateChange

Returns the event is_statechange as StateChange.

pub fn get_affinity(&self) -> Affinity

Returns the event affinity as Affinity.

This will return Affinity::Unknown if the event has no valid data in affinity.

pub fn get_combat_result(&self) -> CombatResult

Returns result as CombatResult.

pub fn get_animation_progress(&self) -> AnimationProgress

Returns is_activation as AnimationProgress.

pub fn get_buff_remove(&self) -> BuffRemove

Returns is_buffremove as BuffRemove.

pub fn get_pad_id(&self) -> u32

Returns the padding as u32 id/signature.

pub fn has_time(&self) -> bool

Checks whether the event has a timestamp.

pub fn time(&self) -> Option<u64>

Retrieves the event time, if present.

pub fn is_buffinitial(&self) -> bool

Checks whether the event is an initial buff event.

pub fn is_source_moving(&self) -> bool

Checks whether the source is moving, if applicable for this event type.

pub fn is_target_moving(&self) -> bool

Checks whether the target is moving, if applicable for this event type.

Trait Implementations§

§

impl Clone for Event

§

fn clone(&self) -> Event

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Event

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Event

§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Event, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl From<&Event> for CommonEvent

§

fn from(event: &Event) -> CommonEvent

Converts to this type from the input type.
§

impl From<Event> for EventKind

§

fn from(event: Event) -> EventKind

Converts to this type from the input type.
§

impl From<Event> for LegacyEventKind

§

fn from(event: Event) -> LegacyEventKind

Converts to this type from the input type.
§

impl Serialize for Event

§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnsafeUnpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,