Skip to main content

NPCHandlerVTable

Struct NPCHandlerVTable 

Source
#[repr(C)]
pub struct NPCHandlerVTable {
Show 22 fields pub on_npc_finish_move: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC), pub on_npc_create: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC), pub on_npc_destroy: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC), pub on_npc_spawn: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC), pub on_npc_respawn: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC), pub on_npc_weapon_state_change: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32, i32), pub on_npc_take_damage: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut IPlayer, f32, u32, i32) -> bool, pub on_npc_give_damage: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut IPlayer, f32, u32, i32) -> bool, pub on_npc_death: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut IPlayer, i32), pub on_npc_shot_missed: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *const PlayerBulletData) -> bool, pub on_npc_shot_player: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut IPlayer, *const PlayerBulletData) -> bool, pub on_npc_shot_npc: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut INPC, *const PlayerBulletData) -> bool, pub on_npc_shot_vehicle: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut IVehicle, *const PlayerBulletData) -> bool, pub on_npc_shot_object: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut IObject, *const PlayerBulletData) -> bool, pub on_npc_shot_player_object: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut IPlayerObject, *const PlayerBulletData) -> bool, pub on_npc_playback_start: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32), pub on_npc_playback_end: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32), pub on_npc_finish_node_point: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32, u32), pub on_npc_finish_node: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32), pub on_npc_change_node: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32, i32) -> bool, pub on_npc_finish_move_path_point: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32, i32), pub on_npc_finish_move_path: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32),
}
Expand description

NPCEventHandler in Server/Components/NPCs/npcs.hpp.

Fields§

§on_npc_finish_move: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC)

void onNPCFinishMove(INPC &).

§on_npc_create: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC)

void onNPCCreate(INPC &).

§on_npc_destroy: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC)

void onNPCDestroy(INPC &).

§on_npc_spawn: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC)

void onNPCSpawn(INPC &).

§on_npc_respawn: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC)

void onNPCRespawn(INPC &).

§on_npc_weapon_state_change: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32, i32)

void onNPCWeaponStateChange(INPC &, PlayerWeaponState, PlayerWeaponState).

§on_npc_take_damage: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut IPlayer, f32, u32, i32) -> bool

bool onNPCTakeDamage(INPC &, IPlayer &, float, uint8_t, BodyPart).

§on_npc_give_damage: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut IPlayer, f32, u32, i32) -> bool

bool onNPCGiveDamage(INPC &, IPlayer &, float, uint8_t, BodyPart).

§on_npc_death: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut IPlayer, i32)

void onNPCDeath(INPC &, IPlayer *, int).

§on_npc_shot_missed: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *const PlayerBulletData) -> bool

bool onNPCShotMissed(INPC &, const PlayerBulletData &).

§on_npc_shot_player: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut IPlayer, *const PlayerBulletData) -> bool

bool onNPCShotPlayer(INPC &, IPlayer &, const PlayerBulletData &).

§on_npc_shot_npc: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut INPC, *const PlayerBulletData) -> bool

bool onNPCShotNPC(INPC &, INPC &, const PlayerBulletData &).

§on_npc_shot_vehicle: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut IVehicle, *const PlayerBulletData) -> bool

bool onNPCShotVehicle(INPC &, IVehicle &, const PlayerBulletData &).

§on_npc_shot_object: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut IObject, *const PlayerBulletData) -> bool

bool onNPCShotObject(INPC &, IObject &, const PlayerBulletData &).

§on_npc_shot_player_object: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, *mut IPlayerObject, *const PlayerBulletData) -> bool

bool onNPCShotPlayerObject(INPC &, IPlayerObject &, const PlayerBulletData &).

§on_npc_playback_start: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32)

void onNPCPlaybackStart(INPC &, int).

§on_npc_playback_end: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32)

void onNPCPlaybackEnd(INPC &, int).

§on_npc_finish_node_point: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32, u32)

void onNPCFinishNodePoint(INPC &, int, uint16_t).

§on_npc_finish_node: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32)

void onNPCFinishNode(INPC &, int).

§on_npc_change_node: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32, i32) -> bool

bool onNPCChangeNode(INPC &, int, int).

§on_npc_finish_move_path_point: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32, i32)

void onNPCFinishMovePathPoint(INPC &, int, int).

§on_npc_finish_move_path: unsafe extern "thiscall" fn(*mut NPCHandler, *mut INPC, i32)

void onNPCFinishMovePath(INPC &, int).

Implementations§

Source§

impl NPCHandlerVTable

Source

pub const DEFAULT: NPCHandlerVTable

Every entry doing what the C++ handler’s own body does.

Trait Implementations§

Source§

impl Clone for NPCHandlerVTable

Source§

fn clone(&self) -> NPCHandlerVTable

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for NPCHandlerVTable

Auto Trait Implementations§

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> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.