2025-03-18 23:30:59 -04:00
use binrw ::binrw ;
// See https://github.com/awgil/ffxiv_reverse/blob/f35b6226c1478234ca2b7149f82d251cffca2f56/vnetlog/vnetlog/ServerIPC.cs#L266 for a REALLY useful list of known values
#[ binrw ]
2025-03-23 15:28:53 -04:00
#[ derive(Debug, Eq, PartialEq, Clone) ]
2025-03-18 23:30:59 -04:00
pub enum ActorControlCategory {
2025-03-23 15:28:53 -04:00
#[ brw(magic = 0x26u16) ]
ToggleInvisibility {
#[ brw(pad_before = 2) ]
invisible : u32 , // FIXME: change to bool
} ,
#[ brw(magic = 0xC8u16) ]
ZoneIn {
#[ brw(pad_before = 2) ]
warp_finish_anim : u32 ,
raise_anim : u32 ,
} ,
#[ brw(magic = 0x260u16) ]
SetCharaGearParamUI {
#[ brw(pad_before = 2) ]
unk1 : u32 ,
unk2 : u32 ,
} ,
2025-03-18 23:30:59 -04:00
}
#[ binrw ]
2025-03-23 15:28:53 -04:00
#[ derive(Debug, Clone) ]
2025-03-18 23:30:59 -04:00
pub struct ActorControl {
2025-03-23 15:28:53 -04:00
#[ brw(pad_after = 4) ]
#[ brw(pad_size_to = 20) ] // take into account categories without params
2025-03-18 23:30:59 -04:00
pub category : ActorControlCategory ,
2025-03-23 15:28:53 -04:00
}
impl Default for ActorControl {
fn default ( ) -> Self {
Self {
category : ActorControlCategory ::ToggleInvisibility { invisible : 1 } ,
}
}
}
// Has more padding than ActorControl?
#[ binrw ]
#[ derive(Debug, Clone) ]
pub struct ActorControlSelf {
#[ brw(pad_after = 12) ]
#[ brw(pad_size_to = 20) ] // take into account categories without params
pub category : ActorControlCategory ,
}
impl Default for ActorControlSelf {
fn default ( ) -> Self {
Self {
category : ActorControlCategory ::ToggleInvisibility { invisible : 1 } ,
}
}
2025-03-18 23:30:59 -04:00
}