Browse Source

pb structs

pull/2/head
andy 4 years ago
parent
commit
799a9e6880
  1. 33
      src/packet/messages.rs

33
src/packet/messages.rs

@ -255,15 +255,19 @@ pub struct PlayerUsedMoonAtomizer {
} }
#[pso_message(0x36)]
pub struct PlayerPBDonation {
#[pso_message(0x37)]
pub struct PlayerPBUsed {
energy: u32,
}
#[pso_message(0x38)]
pub struct PlayerDonatedPB {
recipient: u32,
} }
#[pso_message(0x37)]
pub struct PlayerInitiatedPB {
pb_amount: u8,
unknown1: u32,
#[pso_message(0x39)]
pub struct PlayerPBReady {
player: u16,
} }
#[pso_message(0x3A)] #[pso_message(0x3A)]
@ -345,11 +349,9 @@ pub struct PlayerTechDone {
} }
#[pso_message(0x49)] #[pso_message(0x49)]
pub struct PlayerPBUsed {
pb: u8,
unknown1: u32,
amount: u8,
unknown2: u32,
pub struct PlayerInitiatedPB {
pb: u32,
energy: u32,
} }
#[pso_message(0x4A)] #[pso_message(0x4A)]
@ -992,7 +994,7 @@ pub enum GameMessage {
PlayerResurrected(PlayerResurrected), PlayerResurrected(PlayerResurrected),
PlayerResurrectedMedicalCenter(PlayerResurrectedMedicalCenter), PlayerResurrectedMedicalCenter(PlayerResurrectedMedicalCenter),
PlayerUsedMoonAtomizer(PlayerUsedMoonAtomizer), PlayerUsedMoonAtomizer(PlayerUsedMoonAtomizer),
PlayerPBDonation(PlayerPBDonation),
// PlayerPBDonation(PlayerPBDonation),
PlayerInitiatedPB(PlayerInitiatedPB), PlayerInitiatedPB(PlayerInitiatedPB),
PlayerLeftArea(PlayerLeftArea), PlayerLeftArea(PlayerLeftArea),
PlayerSpawnedIntoArea(PlayerSpawnedIntoArea), PlayerSpawnedIntoArea(PlayerSpawnedIntoArea),
@ -1007,6 +1009,7 @@ pub enum GameMessage {
PlayerTechCast(PlayerTechCast), PlayerTechCast(PlayerTechCast),
PlayerTechDone(PlayerTechDone), PlayerTechDone(PlayerTechDone),
PlayerPBUsed(PlayerPBUsed), PlayerPBUsed(PlayerPBUsed),
PlayerDonatedPB(PlayerDonatedPB),
PlayerBlockedDamage(PlayerBlockedDamage), PlayerBlockedDamage(PlayerBlockedDamage),
PlayerReceivedDamage(PlayerReceivedDamage), PlayerReceivedDamage(PlayerReceivedDamage),
PlayerReceivedDamage2(PlayerReceivedDamage2), PlayerReceivedDamage2(PlayerReceivedDamage2),
@ -1157,7 +1160,7 @@ impl PSOPacketData for GameMessage {
PlayerResurrected::CMD => Ok(GameMessage::PlayerResurrected(PlayerResurrected::from_bytes(&mut cur)?)), PlayerResurrected::CMD => Ok(GameMessage::PlayerResurrected(PlayerResurrected::from_bytes(&mut cur)?)),
PlayerResurrectedMedicalCenter::CMD => Ok(GameMessage::PlayerResurrectedMedicalCenter(PlayerResurrectedMedicalCenter::from_bytes(&mut cur)?)), PlayerResurrectedMedicalCenter::CMD => Ok(GameMessage::PlayerResurrectedMedicalCenter(PlayerResurrectedMedicalCenter::from_bytes(&mut cur)?)),
PlayerUsedMoonAtomizer::CMD => Ok(GameMessage::PlayerUsedMoonAtomizer(PlayerUsedMoonAtomizer::from_bytes(&mut cur)?)), PlayerUsedMoonAtomizer::CMD => Ok(GameMessage::PlayerUsedMoonAtomizer(PlayerUsedMoonAtomizer::from_bytes(&mut cur)?)),
PlayerPBDonation::CMD => Ok(GameMessage::PlayerPBDonation(PlayerPBDonation::from_bytes(&mut cur)?)),
// PlayerPBDonation::CMD => Ok(GameMessage::PlayerPBDonation(PlayerPBDonation::from_bytes(&mut cur)?)),
PlayerInitiatedPB::CMD => Ok(GameMessage::PlayerInitiatedPB(PlayerInitiatedPB::from_bytes(&mut cur)?)), PlayerInitiatedPB::CMD => Ok(GameMessage::PlayerInitiatedPB(PlayerInitiatedPB::from_bytes(&mut cur)?)),
PlayerLeftArea::CMD => Ok(GameMessage::PlayerLeftArea(PlayerLeftArea::from_bytes(&mut cur)?)), PlayerLeftArea::CMD => Ok(GameMessage::PlayerLeftArea(PlayerLeftArea::from_bytes(&mut cur)?)),
PlayerSpawnedIntoArea::CMD => Ok(GameMessage::PlayerSpawnedIntoArea(PlayerSpawnedIntoArea::from_bytes(&mut cur)?)), PlayerSpawnedIntoArea::CMD => Ok(GameMessage::PlayerSpawnedIntoArea(PlayerSpawnedIntoArea::from_bytes(&mut cur)?)),
@ -1172,6 +1175,7 @@ impl PSOPacketData for GameMessage {
PlayerTechCast::CMD => Ok(GameMessage::PlayerTechCast(PlayerTechCast::from_bytes(&mut cur)?)), PlayerTechCast::CMD => Ok(GameMessage::PlayerTechCast(PlayerTechCast::from_bytes(&mut cur)?)),
PlayerTechDone::CMD => Ok(GameMessage::PlayerTechDone(PlayerTechDone::from_bytes(&mut cur)?)), PlayerTechDone::CMD => Ok(GameMessage::PlayerTechDone(PlayerTechDone::from_bytes(&mut cur)?)),
PlayerPBUsed::CMD => Ok(GameMessage::PlayerPBUsed(PlayerPBUsed::from_bytes(&mut cur)?)), PlayerPBUsed::CMD => Ok(GameMessage::PlayerPBUsed(PlayerPBUsed::from_bytes(&mut cur)?)),
PlayerDonatedPB::CMD => Ok(GameMessage::PlayerDonatedPB(PlayerDonatedPB::from_bytes(&mut cur)?)),
PlayerBlockedDamage::CMD => Ok(GameMessage::PlayerBlockedDamage(PlayerBlockedDamage::from_bytes(&mut cur)?)), PlayerBlockedDamage::CMD => Ok(GameMessage::PlayerBlockedDamage(PlayerBlockedDamage::from_bytes(&mut cur)?)),
PlayerReceivedDamage::CMD => Ok(GameMessage::PlayerReceivedDamage(PlayerReceivedDamage::from_bytes(&mut cur)?)), PlayerReceivedDamage::CMD => Ok(GameMessage::PlayerReceivedDamage(PlayerReceivedDamage::from_bytes(&mut cur)?)),
PlayerReceivedDamage2::CMD => Ok(GameMessage::PlayerReceivedDamage2(PlayerReceivedDamage2::from_bytes(&mut cur)?)), PlayerReceivedDamage2::CMD => Ok(GameMessage::PlayerReceivedDamage2(PlayerReceivedDamage2::from_bytes(&mut cur)?)),
@ -1324,7 +1328,7 @@ impl PSOPacketData for GameMessage {
GameMessage::PlayerResurrected(data) => data.as_bytes(), GameMessage::PlayerResurrected(data) => data.as_bytes(),
GameMessage::PlayerResurrectedMedicalCenter(data) => data.as_bytes(), GameMessage::PlayerResurrectedMedicalCenter(data) => data.as_bytes(),
GameMessage::PlayerUsedMoonAtomizer(data) => data.as_bytes(), GameMessage::PlayerUsedMoonAtomizer(data) => data.as_bytes(),
GameMessage::PlayerPBDonation(data) => data.as_bytes(),
// GameMessage::PlayerPBDonation(data) => data.as_bytes(),
GameMessage::PlayerInitiatedPB(data) => data.as_bytes(), GameMessage::PlayerInitiatedPB(data) => data.as_bytes(),
GameMessage::PlayerLeftArea(data) => data.as_bytes(), GameMessage::PlayerLeftArea(data) => data.as_bytes(),
GameMessage::PlayerSpawnedIntoArea(data) => data.as_bytes(), GameMessage::PlayerSpawnedIntoArea(data) => data.as_bytes(),
@ -1339,6 +1343,7 @@ impl PSOPacketData for GameMessage {
GameMessage::PlayerTechCast(data) => data.as_bytes(), GameMessage::PlayerTechCast(data) => data.as_bytes(),
GameMessage::PlayerTechDone(data) => data.as_bytes(), GameMessage::PlayerTechDone(data) => data.as_bytes(),
GameMessage::PlayerPBUsed(data) => data.as_bytes(), GameMessage::PlayerPBUsed(data) => data.as_bytes(),
GameMessage::PlayerDonatedPB(data) => data.as_bytes(),
GameMessage::PlayerBlockedDamage(data) => data.as_bytes(), GameMessage::PlayerBlockedDamage(data) => data.as_bytes(),
GameMessage::PlayerReceivedDamage(data) => data.as_bytes(), GameMessage::PlayerReceivedDamage(data) => data.as_bytes(),
GameMessage::PlayerReceivedDamage2(data) => data.as_bytes(), GameMessage::PlayerReceivedDamage2(data) => data.as_bytes(),

Loading…
Cancel
Save