Browse Source

Merge pull request 'pbs' (#2) from pbs into master

Reviewed-on: #2
pull/5/head
jake 4 years ago
parent
commit
69ddebdc45
  1. 36
      src/packet/messages.rs

36
src/packet/messages.rs

@ -256,15 +256,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: [u8; 4],
#[pso_message(0x39)]
pub struct PlayerPBReady {
player: u16,
} }
#[pso_message(0x3A)] #[pso_message(0x3A)]
@ -358,11 +362,9 @@ pub struct PlayerTechDone { // this packet gets sent once the tech is actually c
} }
#[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)]
@ -1015,7 +1017,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),
@ -1030,6 +1032,8 @@ pub enum GameMessage {
PlayerTechCast(PlayerTechCast), PlayerTechCast(PlayerTechCast),
PlayerTechDone(PlayerTechDone), PlayerTechDone(PlayerTechDone),
PlayerPBUsed(PlayerPBUsed), PlayerPBUsed(PlayerPBUsed),
PlayerDonatedPB(PlayerDonatedPB),
PlayerPBReady(PlayerPBReady),
PlayerBlockedDamage(PlayerBlockedDamage), PlayerBlockedDamage(PlayerBlockedDamage),
PlayerReceivedDamage(PlayerReceivedDamage), PlayerReceivedDamage(PlayerReceivedDamage),
PlayerReceivedDamage2(PlayerReceivedDamage2), PlayerReceivedDamage2(PlayerReceivedDamage2),
@ -1180,7 +1184,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)?)),
@ -1195,6 +1199,8 @@ 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)?)),
PlayerPBReady::CMD => Ok(GameMessage::PlayerPBReady(PlayerPBReady::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)?)),
@ -1347,7 +1353,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(),
@ -1362,6 +1368,8 @@ 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::PlayerPBReady(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