diff --git a/src/raknet/client/replica/pet.rs b/src/raknet/client/replica/pet.rs index 9b887308..6064c8ec 100644 --- a/src/raknet/client/replica/pet.rs +++ b/src/raknet/client/replica/pet.rs @@ -45,19 +45,7 @@ impl ComponentConstruction for PetConstruction { } } -#[derive(Debug, PartialEq, ReplicaSerde)] -pub struct PetSerializationInfo { - /// todo: bitflag - pub pet_state: u32, - pub ability_in_use: PetAbilityType, - pub interaction_id: Option, - pub owner_id: Option, -} - -#[derive(BitVariantTests, Debug, PartialEq, ReplicaSerde)] -pub struct PetSerialization { - pub pet_serialization_info: Option, -} +pub type PetSerialization = PetConstruction; impl ComponentSerialization for PetSerialization { fn ser(&self, writer: &mut BEBitWriter>) -> Res<()> { diff --git a/src/raknet/client/replica/tests/PetSerialization.bin b/src/raknet/client/replica/tests/PetSerialization.bin index c8268665..77d507e9 100644 Binary files a/src/raknet/client/replica/tests/PetSerialization.bin and b/src/raknet/client/replica/tests/PetSerialization.bin differ diff --git a/src/raknet/client/replica/tests/PetSerialization.rs b/src/raknet/client/replica/tests/PetSerialization.rs index 2ac2b7df..3a0fe05d 100644 --- a/src/raknet/client/replica/tests/PetSerialization.rs +++ b/src/raknet/client/replica/tests/PetSerialization.rs @@ -1,8 +1,13 @@ -PetSerialization { - pet_serialization_info: Some(PetSerializationInfo { - pet_state: 8, - ability_in_use: PetAbilityType::JumpOnObject, +PetConstruction { + pet_construction_info: Some(PetConstructionInfo { + pet_state: 4, + ability_in_use: PetAbilityType::GoToObject, interaction_id: Some(1152921510209247111), owner_id: Some(1152921510209247112), + tamed_pet_info: Some(TamedPetInfo { + pet_name_moderation_status: PetModerationStatus::Accepted, + pet_name: lu!("steve"), + owner_name: lu!("ChiefRedWizard"), + }), }), }