From 9a042e99954afbd06f8fe86b7bc5c700ea848d66 Mon Sep 17 00:00:00 2001 From: jake Date: Wed, 18 Dec 2019 21:52:21 -0800 Subject: [PATCH] lobbyemote and talktonpc messages --- src/packet/messages.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/packet/messages.rs b/src/packet/messages.rs index fdbfa77..579e833 100644 --- a/src/packet/messages.rs +++ b/src/packet/messages.rs @@ -70,6 +70,16 @@ pub struct PlayerLoadedIn { pub struct PlayerDoneChangingMap { } +#[pso_message(0x52)] +pub struct TalkToNpc { + unknown1: u32, + unknown2: u32, +} + +#[pso_message(0x58)] +pub struct LobbyEmote { + emote: u32, +} #[pso_message(0xAE)] pub struct UnknownAE { @@ -90,6 +100,8 @@ pub enum GameMessage { PlayerChangedMap2(PlayerChangedMap2), PlayerDoneChangingMap(PlayerDoneChangingMap), TellOtherPlayerMyLocation(TellOtherPlayerMyLocation), + LobbyEmote(LobbyEmote), + TalkToNpc(TalkToNpc), UnknownAE(UnknownAE), } @@ -109,6 +121,8 @@ impl PSOPacketData for GameMessage { PlayerChangedMap2::CMD if len[0] == 2 => Ok(GameMessage::PlayerChangedMap2(PlayerChangedMap2::from_bytes(&mut cur)?)), PlayerDoneChangingMap::CMD => Ok(GameMessage::PlayerDoneChangingMap(PlayerDoneChangingMap::from_bytes(&mut cur)?)), TellOtherPlayerMyLocation::CMD => Ok(GameMessage::TellOtherPlayerMyLocation(TellOtherPlayerMyLocation::from_bytes(&mut cur)?)), + LobbyEmote::CMD => Ok(GameMessage::LobbyEmote(LobbyEmote::from_bytes(&mut cur)?)), + TalkToNpc::CMD => Ok(GameMessage::TalkToNpc(TalkToNpc::from_bytes(&mut cur)?)), UnknownAE::CMD => Ok(GameMessage::UnknownAE(UnknownAE::from_bytes(&mut cur)?)), _ => Err(PacketParseError::UnknownMessage(byte[0], { @@ -129,6 +143,8 @@ impl PSOPacketData for GameMessage { GameMessage::PlayerChangedMap2(data) => data.as_bytes(), GameMessage::PlayerDoneChangingMap(data) => data.as_bytes(), GameMessage::TellOtherPlayerMyLocation(data) => data.as_bytes(), + GameMessage::LobbyEmote(data) => data.as_bytes(), + GameMessage::TalkToNpc(data) => data.as_bytes(), GameMessage::UnknownAE(data) => data.as_bytes(), } }