diff --git a/src/packet/messages.rs b/src/packet/messages.rs index 062af3c..529a825 100644 --- a/src/packet/messages.rs +++ b/src/packet/messages.rs @@ -329,18 +329,18 @@ pub struct ComboStepDone { } #[pso_message(0x47)] -pub struct PlayerTechCast { +pub struct PlayerTechCast { // this packet and packet 0x8D (PlayerTechStart) are both sent at the same time as soon as the player presses a tech button, regardless if the tech is ACTUALLY casted (it not cancelled due to player blocking) or not. technique: u8, unknown1: u8, - unknown2: u8, + tech_level: u8, num_of_targets: u8, } #[pso_message(0x48)] -pub struct PlayerTechDone { +pub struct PlayerTechDone { // this packet gets sent once the tech is actually casted (ie: barta actually shoots out from your feet) technique: u8, unknown1: u8, - level: u8, + tech_level: u8, // tech level in packets is 0-based unknown2: u8, } @@ -561,6 +561,11 @@ pub struct KillMonster { //} +//#[pso_message(0x80)] +//pub struct PlayerTrapActivate { + +//} + #[pso_message(0x83)] pub struct PlayerTrapSet { trap_type: u16, @@ -572,11 +577,6 @@ pub struct PlayerTrapSet { //} -//#[pso_message(0x80)] -//pub struct PlayerTrapActivate { - -//} - //#[pso_message(0x87)] //pub struct PlayerShrink { @@ -597,10 +597,10 @@ pub struct PlayerKilledByMonster { //} -//#[pso_message(0x8D)] -//pub struct PlayerTechStart { - -//} +#[pso_message(0x8D)] +pub struct PlayerTechStart { // this packet and packet 0x47 (PlayerTechCast) are both sent at the same time (PlayerTechStart then PlayerTechCast) as soon as the player presses a tech button, regardless if the tech is ACTUALLY casted (it not cancelled due to player blocking) or not. + data: [u8; 4], // always 0'd? +} #[pso_message(0x94)] pub struct PlayerWarped2 { @@ -1047,7 +1047,7 @@ pub enum GameMessage { //PlayerUnshrink(PlayerUnshrink), PlayerKilledByMonster(PlayerKilledByMonster), //CmodeStatistics(CmodeStatistics), - //PlayerTechStart(PlayerTechStart), + PlayerTechStart(PlayerTechStart), PlayerWarped2(PlayerWarped2), //CmodeTryAgain(CmodeTryAgain), ModifyPlayerStats(ModifyPlayerStats), @@ -1212,7 +1212,7 @@ impl PSOPacketData for GameMessage { //PlayerUnshrink::CMD => Ok(GameMessage::PlayerUnshrink(PlayerUnshrink::from_bytes(&mut cur)?)), PlayerKilledByMonster::CMD => Ok(GameMessage::PlayerKilledByMonster(PlayerKilledByMonster::from_bytes(&mut cur)?)), //CmodeStatistics::CMD => Ok(GameMessage::CmodeStatistics(CmodeStatistics::from_bytes(&mut cur)?)), - //PlayerTechStart::CMD => Ok(GameMessage::PlayerTechStart(PlayerTechStart::from_bytes(&mut cur)?)), + PlayerTechStart::CMD => Ok(GameMessage::PlayerTechStart(PlayerTechStart::from_bytes(&mut cur)?)), PlayerWarped2::CMD => Ok(GameMessage::PlayerWarped2(PlayerWarped2::from_bytes(&mut cur)?)), //CmodeTryAgain::CMD => Ok(GameMessage::CmodeTryAgain(CmodeTryAgain::from_bytes(&mut cur)?)), ModifyPlayerStats::CMD => Ok(GameMessage::ModifyPlayerStats(ModifyPlayerStats::from_bytes(&mut cur)?)), @@ -1379,7 +1379,7 @@ impl PSOPacketData for GameMessage { //GameMessage::PlayerUnshrink(data) => data.as_bytes(), GameMessage::PlayerKilledByMonster(data) => data.as_bytes(), //GameMessage::CmodeStatistics(data) => data.as_bytes(), - //GameMessage::PlayerTechStart(data) => data.as_bytes(), + GameMessage::PlayerTechStart(data) => data.as_bytes(), GameMessage::PlayerWarped2(data) => data.as_bytes(), //GameMessage::CmodeTryAgain(data) => data.as_bytes(), GameMessage::ModifyPlayerStats(data) => data.as_bytes(),