|
@ -199,6 +199,23 @@ pub struct PlayerTrapActivate { |
|
|
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[pso_message(0x06)]
|
|
|
|
|
|
pub struct GuildcardSend {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[pso_message(0x06)]
|
|
|
|
|
|
pub struct GuildcardRecv {
|
|
|
|
|
|
guildcard: u32,
|
|
|
|
|
|
name: [u16; 0x18],
|
|
|
|
|
|
team: [u16; 0x10],
|
|
|
|
|
|
desc: [u16; 0x58],
|
|
|
|
|
|
one: u8,
|
|
|
|
|
|
language: u8,
|
|
|
|
|
|
section_id: u8,
|
|
|
|
|
|
class: u8,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Clone, PartialEq)]
|
|
|
#[derive(Debug, Clone, PartialEq)]
|
|
|
pub enum GameMessage {
|
|
|
pub enum GameMessage {
|
|
@ -232,6 +249,8 @@ pub enum GameMessage { |
|
|
PlayerBlockedDamage(PlayerBlockedDamage),
|
|
|
PlayerBlockedDamage(PlayerBlockedDamage),
|
|
|
PlayerTrapSet(PlayerTrapSet),
|
|
|
PlayerTrapSet(PlayerTrapSet),
|
|
|
PlayerTrapActivate(PlayerTrapActivate),
|
|
|
PlayerTrapActivate(PlayerTrapActivate),
|
|
|
|
|
|
GuildcardSend(GuildcardSend),
|
|
|
|
|
|
GuildcardRecv(GuildcardRecv),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
impl PSOPacketData for GameMessage {
|
|
|
impl PSOPacketData for GameMessage {
|
|
@ -272,6 +291,8 @@ impl PSOPacketData for GameMessage { |
|
|
PlayerBlockedDamage::CMD => Ok(GameMessage::PlayerBlockedDamage(PlayerBlockedDamage::from_bytes(&mut cur)?)),
|
|
|
PlayerBlockedDamage::CMD => Ok(GameMessage::PlayerBlockedDamage(PlayerBlockedDamage::from_bytes(&mut cur)?)),
|
|
|
PlayerTrapSet::CMD => Ok(GameMessage::PlayerTrapSet(PlayerTrapSet::from_bytes(&mut cur)?)),
|
|
|
PlayerTrapSet::CMD => Ok(GameMessage::PlayerTrapSet(PlayerTrapSet::from_bytes(&mut cur)?)),
|
|
|
PlayerTrapActivate::CMD => Ok(GameMessage::PlayerTrapActivate(PlayerTrapActivate::from_bytes(&mut cur)?)),
|
|
|
PlayerTrapActivate::CMD => Ok(GameMessage::PlayerTrapActivate(PlayerTrapActivate::from_bytes(&mut cur)?)),
|
|
|
|
|
|
GuildcardSend::CMD => Ok(GameMessage::GuildcardSend(GuildcardSend::from_bytes(&mut cur)?)),
|
|
|
|
|
|
GuildcardRecv::CMD => Ok(GameMessage::GuildcardRecv(GuildcardRecv::from_bytes(&mut cur)?)),
|
|
|
_ => Err(PacketParseError::UnknownMessage(byte[0],
|
|
|
_ => Err(PacketParseError::UnknownMessage(byte[0],
|
|
|
{
|
|
|
{
|
|
|
let mut b = vec![0; len[0] as usize * 4];
|
|
|
let mut b = vec![0; len[0] as usize * 4];
|
|
@ -313,6 +334,8 @@ impl PSOPacketData for GameMessage { |
|
|
GameMessage::PlayerTrapSet(data) => data.as_bytes(),
|
|
|
GameMessage::PlayerTrapSet(data) => data.as_bytes(),
|
|
|
GameMessage::PlayerTrapActivate(data) => data.as_bytes(),
|
|
|
GameMessage::PlayerTrapActivate(data) => data.as_bytes(),
|
|
|
GameMessage::PlayerChangedFloor(data) => data.as_bytes(),
|
|
|
GameMessage::PlayerChangedFloor(data) => data.as_bytes(),
|
|
|
|
|
|
GameMessage::GuildcardSend(data) => data.as_bytes(),
|
|
|
|
|
|
GameMessage::GuildcardRecv(data) => data.as_bytes(),
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|