[][src]Struct terraria_protocol::packets::NpcUpdate

pub struct NpcUpdate {
    pub npc_id: i16,
    pub pos: Vec2,
    pub vel: Vec2,
    pub target: u16,
    pub horizontal_dir: bool,
    pub vertical_dir: bool,
    pub sprite_dir: bool,
    pub spawned_from_statue: bool,
    pub ai: Vec<f32>,
    pub npc_net_id: i16,
    pub player_count_scale: Option<u8>,
    pub strength_multiplier: Option<f32>,
    pub life: Option<i32>,
}

NPC update, such as movement.

Direction: Server -> Client.

Fields

npc_id: i16pos: Vec2vel: Vec2target: u16

Player ID.

horizontal_dir: boolvertical_dir: boolsprite_dir: boolspawned_from_statue: boolai: Vec<f32>

Can have up to 4 values.

npc_net_id: i16player_count_scale: Option<u8>

Player count needed to set the multiplayer difficulty override.

strength_multiplier: Option<f32>life: Option<i32>

If not present, it means the life is at its maximum.

Trait Implementations

impl Debug for NpcUpdate[src]

impl PacketBody for NpcUpdate[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.