mirror of
https://github.com/lcdr/lu_packets.git
synced 2026-02-09 03:09:06 -06:00
Add EchoStartSkill and fix Quaternion Identity (#9)
This commit is contained in:
@@ -94,7 +94,6 @@ fn parse(path: &Path, cdclient: &mut Cdclient) -> Res<usize> {
|
||||
&& !file.name().contains("[53-05-00-00]")
|
||||
&& !file.name().contains("[53-05-00-15]")
|
||||
&& !file.name().contains("[53-05-00-31]")
|
||||
&& !file.name().contains("[76-00]")
|
||||
&& !file.name().contains("[e6-00]")
|
||||
&& !file.name().contains("[ff-00]")
|
||||
&& !file.name().contains("[a1-01]")
|
||||
|
||||
@@ -25,6 +25,7 @@ pub enum GameMessage {
|
||||
PreloadAnimation(PreloadAnimation) = 42,
|
||||
PlayAnimation(PlayAnimation) = 43,
|
||||
SetName(SetName) = 72,
|
||||
EchoStartSkill(EchoStartSkill) = 118,
|
||||
AddSkill(AddSkill) = 127,
|
||||
RemoveSkill(RemoveSkill) = 128,
|
||||
SetCurrency(SetCurrency) = 133,
|
||||
@@ -263,6 +264,27 @@ pub struct SetName {
|
||||
pub name: GmWString,
|
||||
}
|
||||
|
||||
#[derive(Debug, GameMessage, PartialEq)]
|
||||
pub struct EchoStartSkill {
|
||||
#[default(false)]
|
||||
pub used_mouse: bool,
|
||||
#[default(0.0)]
|
||||
pub caster_latency: f32,
|
||||
#[default(0)]
|
||||
pub cast_type: i32, // todo: type
|
||||
#[default(Vector3::ZERO)]
|
||||
pub last_clicked_posit: Vector3,
|
||||
pub optional_originator_id: ObjId,
|
||||
#[default(OBJID_EMPTY)]
|
||||
pub optional_target_id: ObjId,
|
||||
#[default(Quaternion::IDENTITY)]
|
||||
pub originator_rot: Quaternion,
|
||||
pub bitstream: Vec<u8>,
|
||||
pub skill_id: u32, // todo: type
|
||||
#[default(0)]
|
||||
pub skill_handle: u32
|
||||
}
|
||||
|
||||
#[derive(Debug, GameMessage, PartialEq)]
|
||||
pub struct AddSkill {
|
||||
#[default(0)]
|
||||
|
||||
BIN
src/world/gm/client/tests/EchoStartSkill.bin
Normal file
BIN
src/world/gm/client/tests/EchoStartSkill.bin
Normal file
Binary file not shown.
37
src/world/gm/client/tests/EchoStartSkill.rs
Normal file
37
src/world/gm/client/tests/EchoStartSkill.rs
Normal file
@@ -0,0 +1,37 @@
|
||||
GameMessage::EchoStartSkill(
|
||||
EchoStartSkill{
|
||||
used_mouse: false,
|
||||
caster_latency: 0.0,
|
||||
cast_type: 0,
|
||||
last_clicked_posit: Vector3::ZERO,
|
||||
optional_originator_id: 288300744895980623,
|
||||
optional_target_id: 1152921510123607030,
|
||||
originator_rot: Quaternion {
|
||||
x: 0.0,
|
||||
y: 0.0,
|
||||
z: 0.0,
|
||||
w: 0.0,
|
||||
},
|
||||
bitstream: vec![
|
||||
128,
|
||||
128,
|
||||
0,
|
||||
0,
|
||||
123,
|
||||
9,
|
||||
233,
|
||||
164,
|
||||
0,
|
||||
128,
|
||||
0,
|
||||
8,
|
||||
1,
|
||||
128,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
],
|
||||
skill_id: 239,
|
||||
skill_handle: 2,
|
||||
},
|
||||
)
|
||||
@@ -14,11 +14,6 @@ GameMessage::NotifyPetTamingMinigame(
|
||||
y: 0.0,
|
||||
z: 0.0,
|
||||
},
|
||||
tele_rot: Quaternion {
|
||||
x: 0.0,
|
||||
y: 0.0,
|
||||
z: 0.0,
|
||||
w: 0.0,
|
||||
},
|
||||
tele_rot: Quaternion::IDENTITY,
|
||||
},
|
||||
)
|
||||
|
||||
@@ -7,12 +7,7 @@ GameMessage::StartSkill(
|
||||
last_clicked_posit: Vector3::ZERO,
|
||||
optional_originator_id: 0,
|
||||
optional_target_id: 0,
|
||||
originator_rot: Quaternion {
|
||||
x: 0.0,
|
||||
y: 0.0,
|
||||
z: 0.0,
|
||||
w: 0.0,
|
||||
},
|
||||
originator_rot: Quaternion::IDENTITY,
|
||||
bitstream: vec![
|
||||
1, 0, 0, 0, 1, 0, 0, 0, 128, 128, 0, 0, 50, 138, 129, 0, 0, 32, 0, 2, 61, 0, 0, 0, 0,
|
||||
],
|
||||
|
||||
@@ -52,5 +52,5 @@ pub struct Quaternion {
|
||||
}
|
||||
|
||||
impl Quaternion {
|
||||
pub const IDENTITY: Self = Self { x: 0.0, y: 0.0, z: 0.0, w: 0.0 };
|
||||
pub const IDENTITY: Self = Self { x: 0.0, y: 0.0, z: 0.0, w: 1.0 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user