pub struct Agent {
    pub addr: u64,
    pub prof: u32,
    pub is_elite: u32,
    pub toughness: i16,
    pub concentration: i16,
    pub healing: i16,
    pub condition: i16,
    pub name: [u8; 64],
}
Expand description

An agent.

Fields

addr: u64

Agent id.

prof: u32

Agent profession id.

is_elite: u32

Agent elite specialization.

toughness: i16

Toughnes.

concentration: i16

Concentration.

healing: i16

Healing.

condition: i16

Condition

name: [u8; 64]

Name/Account combo field.

Implementations

Checks whether this agent is a gadget.

Gadgets are entities spawned by some skills, like the “Binding Roots” spawned by Entangle.

Checks whether this agent is a character.

Characters are entities like clones, pets, minions, spirits, but also minis.

Checks whether this agent is a player.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Extract the correct AgentKind from the given raw agent.

This automatically discerns between player, gadget and characters.

Note that in most cases, you probably want to use Agent::try_from or even process instead of this function.

The type returned in the event of a conversion error.

Parse a raw agent.

The type returned in the event of a conversion error.

Convenience method to avoid manual borrowing.

Note that this conversion will consume the agent, so if you plan on re-using it, use the TryFrom<&raw::Agent> implementation that works with a reference.

The type returned in the event of a conversion error.

Convenience method to avoid manual borrowing.

Note that this conversion will consume the agent, so if you plan on re-using it, use the TryFrom<&raw::Agent> implementation that works with a reference.

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.