1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-06-30 11:47:45 +00:00

Add documentation about the supported client triggers

This commit is contained in:
Joshua Goins 2025-06-25 20:58:21 -04:00
parent ec76d3fb31
commit 7d203d1de5

View file

@ -5,6 +5,7 @@ use crate::common::{read_bool_from, write_bool_as};
#[binrw] #[binrw]
#[derive(Debug, Eq, PartialEq, Clone)] #[derive(Debug, Eq, PartialEq, Clone)]
pub enum ClientTriggerCommand { pub enum ClientTriggerCommand {
/// The player sheathes/unsheathes their weapon.
#[brw(magic = 0x1u16)] #[brw(magic = 0x1u16)]
ToggleWeapon { ToggleWeapon {
#[brw(pad_before = 2)] #[brw(pad_before = 2)]
@ -12,6 +13,7 @@ pub enum ClientTriggerCommand {
#[bw(map = write_bool_as::<u32>)] #[bw(map = write_bool_as::<u32>)]
shown: bool, shown: bool,
}, },
/// The player looks or stops looking at an actor.
#[brw(magic = 0x3u16)] #[brw(magic = 0x3u16)]
SetTarget { SetTarget {
#[brw(pad_before = 2)] #[brw(pad_before = 2)]
@ -21,23 +23,27 @@ pub enum ClientTriggerCommand {
Unk1 {}, Unk1 {},
#[brw(magic = 0xC9u16)] #[brw(magic = 0xC9u16)]
Unk2 {}, Unk2 {},
/// The player begins an emote.
#[brw(magic = 0x1F4u16)] #[brw(magic = 0x1F4u16)]
Emote { Emote {
#[brw(pad_before = 2)] // padding #[brw(pad_before = 2)] // padding
emote: u32, emote: u32,
}, },
/// The player explicitly changed their pose.
#[brw(magic = 0x1F9u16)] #[brw(magic = 0x1F9u16)]
ChangePose { ChangePose {
#[brw(pad_before = 2)] // padding #[brw(pad_before = 2)] // padding
unk1: u32, unk1: u32,
pose: u32, pose: u32,
}, },
/// The client is "reapplying" the existing pose, like after idling.
#[brw(magic = 0x1FAu16)] #[brw(magic = 0x1FAu16)]
ReapplyPose { ReapplyPose {
#[brw(pad_before = 2)] // padding #[brw(pad_before = 2)] // padding
unk1: u32, unk1: u32,
pose: u32, pose: u32,
}, },
/// The player selects a teleport destination.
#[brw(magic = 0xCAu16)] #[brw(magic = 0xCAu16)]
TeleportQuery { TeleportQuery {
#[brw(pad_before = 2)] #[brw(pad_before = 2)]