Struct evtc::event::Event

source ·
#[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 strike (direct damage) events this contains the kind of strike.

Use Event::get_strike to obtain the value as Strike.

§is_activation: u8

Whether event is a kind of activation event.

Use Event::get_activation to obtain the value as Activation.

For Activation::CancelFire and Activation::CancelCancel value will be the ms duration of the time spent in animation. buff_dmg will be the ms duration of the scaled (as if not affected) time spent.

For Normal or Quickness, value will be the ms duration at which all significant effects have happened. buff_dmg will be the ms duration at which control is expected to be returned to character.

dst_agent will be x/y of target of skill effect. overstack_value will be z of target of skill effect.

§is_buffremove: u8

Whether event is a kind of buff remove event.

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

src_agent is agent that had buff removed, dst_agent is the agent that removed it. value will be the remaining time removed calculated as duration. buff_dmg will be the remaining time removed calculated as intensity.

For BuffRemove::All result will be the number of stacks removed. For BuffRemove::Single pad61-64 (uint32) will be buff instance id of buff removed.

§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§

source§

impl Event

source

pub fn categorize(&self) -> EventCategory

Determines the EventCategory of the event.

source

pub fn into_kind(self) -> EventKind

Converts the event into its EventKind representation.

source

pub fn get_statechange(&self) -> StateChange

Returns the event is_statechange as StateChange.

source

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.

source

pub fn get_activation(&self) -> Activation

Returns the event is_activation as Activation.

This will return Activation::Unknown if the event has no valid data in is_activation.

source

pub fn get_buffremove(&self) -> BuffRemove

Returns the event is_buffremove as BuffRemove.

This will return BuffRemove::Unknown if the event has no valid data in is_buffremove.

source

pub fn get_strike(&self) -> Strike

Returns the event result as Strike.

This will return Strike::Unknown if the event has no valid data in result.

source

pub fn get_buffcycle(&self) -> BuffCycle

Returns the event is_offcycle as BuffCycle.

This will return BuffCycle::Unknown if the event has no valid data in is_offcycle.

source

pub fn get_pad_id(&self) -> u32

Returns the padding as u32 id/signature.

source

pub fn has_time(&self) -> bool

Checks whether the event has a timestamp.

source

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

Retrieves the event time, if present.

source

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.

source

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

Attempts to extract a type implementing TryExtract from the event.

source

pub fn try_to_activation(&self) -> Option<ActivationEvent>

Attempts to extract an ActivationEvent from the event.

source

pub fn try_to_buff_remove(&self) -> Option<BuffRemoveEvent>

Attempts to extract a BuffRemoveEvent from the event.

source

pub fn try_to_buff_apply(&self) -> Option<BuffApplyEvent>

Attempts to extract a BuffApplyEvent from the event.

source

pub fn try_to_buff_damage(&self) -> Option<BuffDamageEvent>

Attempts to extract a BuffDamageEvent from the event.

source

pub fn try_to_strike(&self) -> Option<StrikeEvent>

Attempts to extract a StrikeEvent from the event.

source

pub fn is_buffinitial(&self) -> bool

Checks whether the event is an initial buff event.

Trait Implementations§

source§

impl Clone for Event

source§

fn clone(&self) -> Event

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Event

source§

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

Formats the value using the given formatter. Read more
source§

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

source§

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

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

impl From<&Event> for CommonEvent

source§

fn from(event: &Event) -> Self

Converts to this type from the input type.
source§

impl From<&Event> for EventCategory

source§

fn from(event: &Event) -> Self

Converts to this type from the input type.
source§

impl From<Event> for EventKind

source§

fn from(event: Event) -> Self

Converts to this type from the input type.
source§

impl Serialize for Event

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::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 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> 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,

§

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>,

§

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>,

§

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>,