From 80915be33b2193c9d8c02f6bcc5b65c9705ed92d Mon Sep 17 00:00:00 2001 From: reason Date: Thu, 2 Apr 2020 00:09:26 -0400 Subject: [PATCH] 0x60/0x62 Data Entry (#24) --- src/packet/messages.rs | 180 +++++++++++++++++++++++++---------------- 1 file changed, 110 insertions(+), 70 deletions(-) diff --git a/src/packet/messages.rs b/src/packet/messages.rs index 87cddac..fd155b6 100644 --- a/src/packet/messages.rs +++ b/src/packet/messages.rs @@ -32,14 +32,17 @@ pub struct GuildcardRecv { class: u8, } -//#[pso_message(0x07)] -//pub struct SymbolChat { - -//} +#[pso_message(0x07)] +pub struct SymbolChat { + unknown1: u32, + sc_data: [u8; 60], +} #[pso_message(0x0A)] pub struct MobAttack { - data: [u8; 8], + enemy_id: u16, + damage: u16, + flags: u16, } #[pso_message(0x0B)] @@ -57,10 +60,10 @@ pub struct Unknown0D { data: [u8; 8], } -//#[pso_message(0x12)] -//pub struct BossInteractionDragon { - -//} +#[pso_message(0x12)] +pub struct BossInteractionDragon { + data: [u8; 6], +} //#[pso_message(0x13)] //pub struct BossInteractionDeRolLe { @@ -82,12 +85,12 @@ pub struct Unknown0D { //} -#[pso_message(0x17)] -pub struct VolOptSecondPhase { - x: f32, - y: f32, - z: f32, -} +//#[pso_message(0x17)] +//pub struct VolOptSecondPhase { +// x: f32, +// y: f32, +// z: f32, +//} //#[pso_message(0x18)] //pub struct VolOptSecondPhase2 { @@ -182,7 +185,7 @@ pub struct PlayerFeedMag { #[pso_message(0x29)] pub struct PlayerDropItem { - item_id: u32, + item_id: u16, amount: u32, } @@ -410,32 +413,53 @@ pub struct LobbyEmote { emote: u32, } -#[pso_message(0x59)] -pub struct PickupItem { - client_id: u32, - item_id: u32, -} +//#[pso_message(0x59)] +//pub struct PickupItem { +// client_id: u16, +// item_id: u32, +//} #[pso_message(0x5A)] pub struct PickupItem2 { - item_id: u32, - area: u8, - unknown1: u32, + data: [u8; 6], } //#[pso_message(0x5D)] //pub struct SplittingStack { +// area: u16, +// unknown1: u16, +// x: f32, +// z: f32, +// item_data: u32, +// item_data2: u32, +// item_data3: u32, +// split_item_id: [u8; 9], +// item_data4: u32, +// unknown2: u32, +//} + +//#[pso_message(0x5E)] +//pub struct BuyFromShop { +// item_data: u32, +// item_data2: u32, +// item_data3: u32, +// item_id: u32, +// amount: u32, //} #[pso_message(0x5F)] -pub struct BoxDrops { - area: u8, - variety: u8, - id: u16, - x: f32, - y: f32, - +pub struct ItemDrop { + pub area: u8, + pub variety: u8, + pub unknown: u16, + pub x: f32, + pub z: f32, + pub unknown2: u32, + pub item_bytes: [u8; 12], + pub item_id: u32, + pub item_bytes2: [u8; 4], + pub unknown3: u32, } #[pso_message(0x60)] @@ -449,17 +473,18 @@ pub struct RequestItem { } #[pso_message(0x61)] -pub struct PlayerPBParticle { +pub struct MagAnimation { mag_id: u32, effect: u8, - unknown1: u32, + unknown1: u16, } -#[pso_message(0x63)] -pub struct FloorItemLimitItemDeletion { - item_id: u32, - unknown1: u32, -} +//#[pso_message(0x63)] +//pub struct FloorItemLimitItemDeletion { +// client_id: u16, +// item_id: u8, +// amount: u8, +//} #[pso_message(0x66)] pub struct PlayerUsedStarAtomizer { @@ -669,12 +694,18 @@ pub struct PhotonChairMove { //#[pso_message(0xB5)] //pub struct ShopRequest { - +// unknown1: u16, +// shop_type: u8, //} //#[pso_message(0xB7)] //pub struct BuyItem { - +// unknown1: u16, +// item_id: u8, +// unknown2: u8, +// shop_item_index: u8, +// amount: u8, +// unknown3: u8, //} //#[pso_message(0xB8)] @@ -694,12 +725,18 @@ pub struct PhotonChairMove { //#[pso_message(0xBD)] //pub struct BankInteraction { - +// item_id: u16, +// amount: u8, +// action: u8, +// item_amount: u8, +// unknown2: u8, //} //#[pso_message(0xC0)] //pub struct PlayerSoldItem { - +// client_id: u16, +// item_id: u8, +// amount: u8, //} //#[pso_message(0xC1)] @@ -720,10 +757,10 @@ pub struct DropCoordinates { drop_ID: u32, } -//#[pso_message(0xC4)] -//pub struct SortItems { - -//} +#[pso_message(0xC4)] +pub struct SortItems { + item_id: [u8; 30], +} #[pso_message(0xC5)] pub struct PlayerUsedMedicalCenter { @@ -863,17 +900,17 @@ pub enum GameMessage { PlayerActivatedSwitch(PlayerActivatedSwitch), GuildcardSend(GuildcardSend), GuildcardRecv(GuildcardRecv), - //SymbolChat(SymbolChat), + SymbolChat(SymbolChat), MobAttack(MobAttack), BoxAttack(BoxAttack), Unknown0C(Unknown0C), Unknown0D(Unknown0D), - //BossInteractionDragon(BossInteractionDragon), + BossInteractionDragon(BossInteractionDragon), //BossInteractionDeRolLe(BossInteractionDeRolLe), //BossInteractionDeRolLe2(BossInteractionDeRolLe2), //BossInteractionVolOpt(BossInteractionVolOpt), //BossInteractionVolOpt2(BossInteractionVolOpt2), - VolOptSecondPhase(VolOptSecondPhase), + //VolOptSecondPhase(VolOptSecondPhase), //VolOptSecondPhase2(VolOptSecondPhase2), //BossInteractionDarkFalz(BossInteractionDarkFalz), //PlayerKillActivated(PlayerKillActivated), @@ -925,13 +962,14 @@ pub enum GameMessage { //Unknown53(Unknown53), PlayerWarped(PlayerWarped), LobbyEmote(LobbyEmote), - PickupItem(PickupItem), + //PickupItem(PickupItem), PickupItem2(PickupItem2), //SplittingStack(SplittingStack), - BoxDrops(BoxDrops), + //BuyFromShop(BuyFromShop), + ItemDrop(ItemDrop), RequestItem(RequestItem), - PlayerPBParticle(PlayerPBParticle), - FloorItemLimitItemDeletion(FloorItemLimitItemDeletion), + MagAnimation(MagAnimation), + //FloorItemLimitItemDeletion(FloorItemLimitItemDeletion), PlayerUsedStarAtomizer(PlayerUsedStarAtomizer), SpawningMonsters(SpawningMonsters), PlayerTelepipe(PlayerTelepipe), @@ -982,7 +1020,7 @@ pub enum GameMessage { //TeamInvite(TeamInvite), //AcceptTeamInvite(AcceptTeamInvite), DropCoordinates(DropCoordinates), - //SortItems(SortItems), + SortItems(SortItems), PlayerUsedMedicalCenter(PlayerUsedMedicalCenter), //ExperienceSteal(ExperienceSteal), //ChargeAttack(ChargeAttack), @@ -1022,17 +1060,17 @@ impl PSOPacketData for GameMessage { PlayerActivatedSwitch::CMD => Ok(GameMessage::PlayerActivatedSwitch(PlayerActivatedSwitch::from_bytes(&mut cur)?)), GuildcardSend::CMD => Ok(GameMessage::GuildcardSend(GuildcardSend::from_bytes(&mut cur)?)), GuildcardRecv::CMD => Ok(GameMessage::GuildcardRecv(GuildcardRecv::from_bytes(&mut cur)?)), - //SymbolChat::CMD => Ok(GameMessage::SymbolChat(SymbolChat::from_bytes(&mut cur)?)), + SymbolChat::CMD => Ok(GameMessage::SymbolChat(SymbolChat::from_bytes(&mut cur)?)), MobAttack::CMD => Ok(GameMessage::MobAttack(MobAttack::from_bytes(&mut cur)?)), BoxAttack::CMD => Ok(GameMessage::BoxAttack(BoxAttack::from_bytes(&mut cur)?)), Unknown0C::CMD => Ok(GameMessage::Unknown0C(Unknown0C::from_bytes(&mut cur)?)), Unknown0D::CMD => Ok(GameMessage::Unknown0D(Unknown0D::from_bytes(&mut cur)?)), - //BossInteractionDragon::CMD => Ok(GameMessage::BossInteractionDragon(BossInteractionDragon::from_bytes(&mut cur)?)), + BossInteractionDragon::CMD => Ok(GameMessage::BossInteractionDragon(BossInteractionDragon::from_bytes(&mut cur)?)), //BossInteractionDeRolLe::CMD => Ok(GameMessage::BossInteractionDeRolLe(BossInteractionDeRolLe::from_bytes(&mut cur)?)), //BossInteractionDeRolLe2::CMD => Ok(GameMessage::BossInteractionDeRolLe2(BossInteractionDeRolLe2::from_bytes(&mut cur)?)), //BossInteractionVolOpt::CMD => Ok(GameMessage::BossInteractionVolOpt(BossInteractionVolOpt::from_bytes(&mut cur)?)), //BossInteractionVolOpt2::CMD => Ok(GameMessage::BossInteractionVolOpt2(BossInteractionVolOpt2::from_bytes(&mut cur)?)), - VolOptSecondPhase::CMD => Ok(GameMessage::VolOptSecondPhase(VolOptSecondPhase::from_bytes(&mut cur)?)), + //VolOptSecondPhase::CMD => Ok(GameMessage::VolOptSecondPhase(VolOptSecondPhase::from_bytes(&mut cur)?)), //VolOptSecondPhase2::CMD => Ok(GameMessage::VolOptSecondPhase2(VolOptSecondPhase2::from_bytes(&mut cur)?)), //BossInteractionDarkFalz::CMD => Ok(GameMessage::BossInteractionDarkFalz(BossInteractionDarkFalz::from_bytes(&mut cur)?)), //PlayerKillActivated::CMD => Ok(GameMessage::PlayerKillActivated(PlayerKillActivated::from_bytes(&mut cur)?)), @@ -1084,13 +1122,14 @@ impl PSOPacketData for GameMessage { //Unknown53::CMD => Ok(GameMessage::Unknown53(Unknown53::from_bytes(&mut cur)?)), PlayerWarped::CMD => Ok(GameMessage::PlayerWarped(PlayerWarped::from_bytes(&mut cur)?)), LobbyEmote::CMD => Ok(GameMessage::LobbyEmote(LobbyEmote::from_bytes(&mut cur)?)), - PickupItem::CMD => Ok(GameMessage::PickupItem(PickupItem::from_bytes(&mut cur)?)), + //PickupItem::CMD => Ok(GameMessage::PickupItem(PickupItem::from_bytes(&mut cur)?)), PickupItem2::CMD => Ok(GameMessage::PickupItem2(PickupItem2::from_bytes(&mut cur)?)), //SplittingStack::CMD => Ok(GameMessage::SplittingStack(SplittingStack::from_bytes(&mut cur)?)), - BoxDrops::CMD => Ok(GameMessage::BoxDrops(BoxDrops::from_bytes(&mut cur)?)), + //BuyFromShop::CMD => Ok(GameMessage::BuyFromShop(BuyFromShop::from_bytes(&mut cur)?)), + ItemDrop::CMD => Ok(GameMessage::ItemDrop(ItemDrop::from_bytes(&mut cur)?)), RequestItem::CMD => Ok(GameMessage::RequestItem(RequestItem::from_bytes(&mut cur)?)), - PlayerPBParticle::CMD => Ok(GameMessage::PlayerPBParticle(PlayerPBParticle::from_bytes(&mut cur)?)), - FloorItemLimitItemDeletion::CMD => Ok(GameMessage::FloorItemLimitItemDeletion(FloorItemLimitItemDeletion::from_bytes(&mut cur)?)), + MagAnimation::CMD => Ok(GameMessage::MagAnimation(MagAnimation::from_bytes(&mut cur)?)), + //FloorItemLimitItemDeletion::CMD => Ok(GameMessage::FloorItemLimitItemDeletion(FloorItemLimitItemDeletion::from_bytes(&mut cur)?)), PlayerUsedStarAtomizer::CMD => Ok(GameMessage::PlayerUsedStarAtomizer(PlayerUsedStarAtomizer::from_bytes(&mut cur)?)), SpawningMonsters::CMD => Ok(GameMessage::SpawningMonsters(SpawningMonsters::from_bytes(&mut cur)?)), PlayerTelepipe::CMD => Ok(GameMessage::PlayerTelepipe(PlayerTelepipe::from_bytes(&mut cur)?)), @@ -1141,7 +1180,7 @@ impl PSOPacketData for GameMessage { //TeamInvite::CMD => Ok(GameMessage::TeamInvite(TeamInvite::from_bytes(&mut cur)?)), //AcceptTeamInvite::CMD => Ok(GameMessage::AcceptTeamInvite(AcceptTeamInvite::from_bytes(&mut cur)?)), DropCoordinates::CMD => Ok(GameMessage::DropCoordinates(DropCoordinates::from_bytes(&mut cur)?)), - //SortItems::CMD => Ok(GameMessage::SortItems(SortItems::from_bytes(&mut cur)?)), + SortItems::CMD => Ok(GameMessage::SortItems(SortItems::from_bytes(&mut cur)?)), PlayerUsedMedicalCenter::CMD => Ok(GameMessage::PlayerUsedMedicalCenter(PlayerUsedMedicalCenter::from_bytes(&mut cur)?)), //ExperienceSteal::CMD => Ok(GameMessage::ExperienceSteal(ExperienceSteal::from_bytes(&mut cur)?)), //ChargeAttack::CMD => Ok(GameMessage::ChargeAttack(ChargeAttack::from_bytes(&mut cur)?)), @@ -1183,17 +1222,17 @@ impl PSOPacketData for GameMessage { GameMessage::PlayerActivatedSwitch(data) => data.as_bytes(), GameMessage::GuildcardSend(data) => data.as_bytes(), GameMessage::GuildcardRecv(data) => data.as_bytes(), - //GameMessage::SymbolChat(data) => data.as_bytes(), + GameMessage::SymbolChat(data) => data.as_bytes(), GameMessage::MobAttack(data) => data.as_bytes(), GameMessage::BoxAttack(data) => data.as_bytes(), GameMessage::Unknown0C(data) => data.as_bytes(), GameMessage::Unknown0D(data) => data.as_bytes(), - //GameMessage::BossInteractionDragon(data) => data.as_bytes(), + GameMessage::BossInteractionDragon(data) => data.as_bytes(), //GameMessage::BossInteractionDeRolLe(data) => data.as_bytes(), //GameMessage::BossInteractionDeRolLe2(data) => data.as_bytes(), //GameMessage::BossInteractionVolOpt(data) => data.as_bytes(), //GameMessage::BossInteractionVolOpt2(data) => data.as_bytes(), - GameMessage::VolOptSecondPhase(data) => data.as_bytes(), + //GameMessage::VolOptSecondPhase(data) => data.as_bytes(), //GameMessage::VolOptSecondPhase2(data) => data.as_bytes(), //GameMessage::BossInteractionDarkFalz(data) => data.as_bytes(), //GameMessage::PlayerKillActivated(data) => data.as_bytes(), @@ -1245,13 +1284,14 @@ impl PSOPacketData for GameMessage { //GameMessage::Unknown53(data) => data.as_bytes(), GameMessage::PlayerWarped(data) => data.as_bytes(), GameMessage::LobbyEmote(data) => data.as_bytes(), - GameMessage::PickupItem(data) => data.as_bytes(), + //GameMessage::PickupItem(data) => data.as_bytes(), GameMessage::PickupItem2(data) => data.as_bytes(), //GameMessage::SplittingStack(data) => data.as_bytes(), - GameMessage::BoxDrops(data) => data.as_bytes(), + //GameMessage::BuyFromShop(data) => data.as_bytes(), + GameMessage::ItemDrop(data) => data.as_bytes(), GameMessage::RequestItem(data) => data.as_bytes(), - GameMessage::PlayerPBParticle(data) => data.as_bytes(), - GameMessage::FloorItemLimitItemDeletion(data) => data.as_bytes(), + GameMessage::MagAnimation(data) => data.as_bytes(), + //GameMessage::FloorItemLimitItemDeletion(data) => data.as_bytes(), GameMessage::PlayerUsedStarAtomizer(data) => data.as_bytes(), GameMessage::SpawningMonsters(data) => data.as_bytes(), GameMessage::PlayerTelepipe(data) => data.as_bytes(), @@ -1302,7 +1342,7 @@ impl PSOPacketData for GameMessage { //GameMessage::TeamInvite(data) => data.as_bytes(), //GameMessage::AcceptTeamInvite(data) => data.as_bytes(), GameMessage::DropCoordinates(data) => data.as_bytes(), - //GameMessage::SortItems(data) => data.as_bytes(), + GameMessage::SortItems(data) => data.as_bytes(), GameMessage::PlayerUsedMedicalCenter(data) => data.as_bytes(), //GameMessage::ExperienceSteal(data) => data.as_bytes(), //GameMessage::ChargeAttack(data) => data.as_bytes(),