Compare commits
12 Commits
aef4ab5463
...
b2e713fbbb
Author | SHA1 | Date | |
---|---|---|---|
b2e713fbbb | |||
1489476cd5 | |||
e698ad993c | |||
65532db884 | |||
ef69b2064d | |||
77f657dbc0 | |||
cb219d807d | |||
2c00b5999a | |||
68080eff4b | |||
a58191833f | |||
e02e3dff29 | |||
a2ecb14d82 |
@ -551,7 +551,7 @@ mod test {
|
||||
#[pso_message(0x23)]
|
||||
struct Test {
|
||||
b: [u32; 100],
|
||||
};
|
||||
}
|
||||
|
||||
let test = Test {
|
||||
client: 1,
|
||||
|
@ -135,7 +135,8 @@ pub struct TellOtherPlayerMyLocation {
|
||||
x: f32,
|
||||
y: f32,
|
||||
z: f32,
|
||||
unknown2: u32,
|
||||
rotation: u16,
|
||||
unknown2: u16,
|
||||
}
|
||||
|
||||
#[pso_message(0x21)]
|
||||
@ -263,7 +264,7 @@ pub struct PlayerPBDonation {
|
||||
#[pso_message(0x37)]
|
||||
pub struct PlayerInitiatedPB {
|
||||
pb_amount: u8,
|
||||
unknown1: u32,
|
||||
unknown1: [u8; 4],
|
||||
}
|
||||
|
||||
#[pso_message(0x3A)]
|
||||
@ -278,7 +279,8 @@ pub struct PlayerSpawnedIntoArea {
|
||||
|
||||
#[pso_message(0x3E)]
|
||||
pub struct PlayerStopped {
|
||||
unknown1: u32,
|
||||
unknown1: [u8; 2],
|
||||
rotation: u16,
|
||||
area: u16,
|
||||
room: u16,
|
||||
x: f32,
|
||||
@ -288,8 +290,10 @@ pub struct PlayerStopped {
|
||||
|
||||
#[pso_message(0x3F)]
|
||||
pub struct PlayerLoadedIn {
|
||||
unknown1: u32,
|
||||
unknown2: u32,
|
||||
unknown1: [u8; 2],
|
||||
rotation: u16,
|
||||
area: u16,
|
||||
room: u16,
|
||||
x: f32,
|
||||
y: f32,
|
||||
z: f32,
|
||||
@ -299,7 +303,7 @@ pub struct PlayerLoadedIn {
|
||||
pub struct PlayerWalking {
|
||||
x: f32,
|
||||
z: f32,
|
||||
unknown: f32,
|
||||
stance: u32,
|
||||
}
|
||||
|
||||
#[pso_message(0x42)]
|
||||
@ -310,37 +314,46 @@ pub struct PlayerRunning {
|
||||
|
||||
#[pso_message(0x43)]
|
||||
pub struct ComboStep1 {
|
||||
data: [u8; 4],
|
||||
rotation: u16,
|
||||
attack: u16,
|
||||
}
|
||||
|
||||
#[pso_message(0x44)]
|
||||
pub struct ComboStep2 {
|
||||
data: [u8; 4],
|
||||
rotation: u16,
|
||||
attack: u16,
|
||||
}
|
||||
|
||||
#[pso_message(0x45)]
|
||||
pub struct ComboStep3 {
|
||||
data: [u8; 4],
|
||||
rotation: u16,
|
||||
attack: u16,
|
||||
}
|
||||
|
||||
#[pso_message(0x46)]
|
||||
pub struct ComboStepDone {
|
||||
data: [u8; 4],
|
||||
pub struct TargetsHit {
|
||||
num_of_targets: [u8; 4], // thats a lot of targets?
|
||||
client2: u8, // TODO: what even is this?
|
||||
target2: u8, // TODO: what even is this?
|
||||
unknown2: [u8; 2],
|
||||
}
|
||||
|
||||
#[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,
|
||||
#[length_of(targets)]
|
||||
num_of_targets: u8,
|
||||
#[length_is(num_of_targets)]
|
||||
targets: Vec<u32>,
|
||||
}
|
||||
|
||||
#[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, // level - 1
|
||||
unknown2: u8,
|
||||
}
|
||||
|
||||
@ -504,7 +517,15 @@ pub struct SpawningMonsters {
|
||||
|
||||
#[pso_message(0x68)]
|
||||
pub struct PlayerTelepipe {
|
||||
|
||||
caster: u16, // room client #
|
||||
area: u16,
|
||||
room: u16,
|
||||
unknown1: u16,
|
||||
x: f32,
|
||||
y: f32,
|
||||
z: f32,
|
||||
rotation: u16,
|
||||
unknown2: [u8; 2],
|
||||
}
|
||||
|
||||
#[pso_message(0x69)]
|
||||
@ -561,6 +582,11 @@ pub struct KillMonster {
|
||||
|
||||
//}
|
||||
|
||||
//#[pso_message(0x80)]
|
||||
//pub struct PlayerTrapActivate {
|
||||
|
||||
//}
|
||||
|
||||
#[pso_message(0x83)]
|
||||
pub struct PlayerTrapSet {
|
||||
trap_type: u16,
|
||||
@ -572,11 +598,6 @@ pub struct PlayerTrapSet {
|
||||
|
||||
//}
|
||||
|
||||
//#[pso_message(0x80)]
|
||||
//pub struct PlayerTrapActivate {
|
||||
|
||||
//}
|
||||
|
||||
//#[pso_message(0x87)]
|
||||
//pub struct PlayerShrink {
|
||||
|
||||
@ -597,10 +618,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 {
|
||||
@ -661,10 +682,12 @@ pub struct BoxDropRequest {
|
||||
|
||||
//}
|
||||
|
||||
//#[pso_message(0xA6)]
|
||||
//pub struct TradeRequest {
|
||||
|
||||
//}
|
||||
#[pso_message(0xA6)]
|
||||
pub struct TradeRequest {
|
||||
unknown1: u32,
|
||||
unknown2: u32,
|
||||
unknown3: u32,
|
||||
}
|
||||
|
||||
//#[pso_message(0xA8)]
|
||||
//pub struct BossInteractionGolDragon {
|
||||
@ -1003,7 +1026,7 @@ pub enum GameMessage {
|
||||
ComboStep1(ComboStep1),
|
||||
ComboStep2(ComboStep2),
|
||||
ComboStep3(ComboStep3),
|
||||
ComboStepDone(ComboStepDone),
|
||||
TargetsHit(TargetsHit),
|
||||
PlayerTechCast(PlayerTechCast),
|
||||
PlayerTechDone(PlayerTechDone),
|
||||
PlayerPBUsed(PlayerPBUsed),
|
||||
@ -1047,7 +1070,7 @@ pub enum GameMessage {
|
||||
//PlayerUnshrink(PlayerUnshrink),
|
||||
PlayerKilledByMonster(PlayerKilledByMonster),
|
||||
//CmodeStatistics(CmodeStatistics),
|
||||
//PlayerTechStart(PlayerTechStart),
|
||||
PlayerTechStart(PlayerTechStart),
|
||||
PlayerWarped2(PlayerWarped2),
|
||||
//CmodeTryAgain(CmodeTryAgain),
|
||||
ModifyPlayerStats(ModifyPlayerStats),
|
||||
@ -1058,7 +1081,7 @@ pub enum GameMessage {
|
||||
//BossInteractionOlgaFlow(BossInteractionOlgaFlow),
|
||||
//BossInteractionOlgaFlow2(BossInteractionOlgaFlow2),
|
||||
//BossInteractionOlgaFlow3(BossInteractionOlgaFlow3),
|
||||
//TradeRequest(TradeRequest),
|
||||
TradeRequest(TradeRequest),
|
||||
//BossInteractionGolDragon(BossInteractionGolDragon),
|
||||
//BossInteractionBarbaRay(BossInteractionBarbaRay),
|
||||
//BossInteractionBarbaRay2(BossInteractionBarbaRay2),
|
||||
@ -1168,7 +1191,7 @@ impl PSOPacketData for GameMessage {
|
||||
ComboStep1::CMD => Ok(GameMessage::ComboStep1(ComboStep1::from_bytes(&mut cur)?)),
|
||||
ComboStep2::CMD => Ok(GameMessage::ComboStep2(ComboStep2::from_bytes(&mut cur)?)),
|
||||
ComboStep3::CMD => Ok(GameMessage::ComboStep3(ComboStep3::from_bytes(&mut cur)?)),
|
||||
ComboStepDone::CMD => Ok(GameMessage::ComboStepDone(ComboStepDone::from_bytes(&mut cur)?)),
|
||||
TargetsHit::CMD => Ok(GameMessage::TargetsHit(TargetsHit::from_bytes(&mut cur)?)),
|
||||
PlayerTechCast::CMD => Ok(GameMessage::PlayerTechCast(PlayerTechCast::from_bytes(&mut cur)?)),
|
||||
PlayerTechDone::CMD => Ok(GameMessage::PlayerTechDone(PlayerTechDone::from_bytes(&mut cur)?)),
|
||||
PlayerPBUsed::CMD => Ok(GameMessage::PlayerPBUsed(PlayerPBUsed::from_bytes(&mut cur)?)),
|
||||
@ -1212,7 +1235,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)?)),
|
||||
@ -1223,7 +1246,7 @@ impl PSOPacketData for GameMessage {
|
||||
//BossInteractionOlgaFlow::CMD => Ok(GameMessage::BossInteractionOlgaFlow(BossInteractionOlgaFlow::from_bytes(&mut cur)?)),
|
||||
//BossInteractionOlgaFlow2::CMD => Ok(GameMessage::BossInteractionOlgaFlow2(BossInteractionOlgaFlow2::from_bytes(&mut cur)?)),
|
||||
//BossInteractionOlgaFlow3::CMD => Ok(GameMessage::BossInteractionOlgaFlow3(BossInteractionOlgaFlow3::from_bytes(&mut cur)?)),
|
||||
//TradeRequest::CMD => Ok(GameMessage::TradeRequest(TradeRequest::from_bytes(&mut cur)?)),
|
||||
TradeRequest::CMD => Ok(GameMessage::TradeRequest(TradeRequest::from_bytes(&mut cur)?)),
|
||||
//BossInteractionGolDragon::CMD => Ok(GameMessage::BossInteractionGolDragon(BossInteractionGolDragon::from_bytes(&mut cur)?)),
|
||||
//BossInteractionBarbaRay::CMD => Ok(GameMessage::BossInteractionBarbaRay(BossInteractionBarbaRay::from_bytes(&mut cur)?)),
|
||||
//BossInteractionBarbaRay2::CMD => Ok(GameMessage::BossInteractionBarbaRay2(BossInteractionBarbaRay2::from_bytes(&mut cur)?)),
|
||||
@ -1335,7 +1358,7 @@ impl PSOPacketData for GameMessage {
|
||||
GameMessage::ComboStep1(data) => data.as_bytes(),
|
||||
GameMessage::ComboStep2(data) => data.as_bytes(),
|
||||
GameMessage::ComboStep3(data) => data.as_bytes(),
|
||||
GameMessage::ComboStepDone(data) => data.as_bytes(),
|
||||
GameMessage::TargetsHit(data) => data.as_bytes(),
|
||||
GameMessage::PlayerTechCast(data) => data.as_bytes(),
|
||||
GameMessage::PlayerTechDone(data) => data.as_bytes(),
|
||||
GameMessage::PlayerPBUsed(data) => data.as_bytes(),
|
||||
@ -1379,7 +1402,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(),
|
||||
@ -1390,7 +1413,7 @@ impl PSOPacketData for GameMessage {
|
||||
//GameMessage::BossInteractionOlgaFlow(data) => data.as_bytes(),
|
||||
//GameMessage::BossInteractionOlgaFlow2(data) => data.as_bytes(),
|
||||
//GameMessage::BossInteractionOlgaFlow3(data) => data.as_bytes(),
|
||||
//GameMessage::TradeRequest(data) => data.as_bytes(),
|
||||
GameMessage::TradeRequest(data) => data.as_bytes(),
|
||||
//GameMessage::BossInteractionGolDragon(data) => data.as_bytes(),
|
||||
//GameMessage::BossInteractionBarbaRay(data) => data.as_bytes(),
|
||||
//GameMessage::BossInteractionBarbaRay2(data) => data.as_bytes(),
|
||||
|
@ -587,4 +587,34 @@ pub struct FullCharacterData {
|
||||
#[pso_packet(0x1ED)]
|
||||
pub struct SaveOptions {
|
||||
pub options: u32,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[derive(PSOPacketData, Clone, Copy, Default)]
|
||||
pub struct TradeItem {
|
||||
pub item_data: [u8; 12],
|
||||
pub item_id: u32,
|
||||
pub item_data2: [u8; 4],
|
||||
}
|
||||
|
||||
|
||||
#[pso_packet(0xD0)]
|
||||
pub struct ItemsToTrade {
|
||||
pub trade_target: u8,
|
||||
pub unknown2: u8,
|
||||
pub count: u16,
|
||||
pub items: [TradeItem; 32],
|
||||
}
|
||||
|
||||
#[pso_packet(0xD1)]
|
||||
pub struct AcknowledgeTrade {
|
||||
}
|
||||
|
||||
#[pso_packet(0xD2)]
|
||||
pub struct TradeConfirmed {
|
||||
}
|
||||
|
||||
|
||||
#[pso_packet(0xD4)]
|
||||
pub struct CancelTrade {
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user