From fe1fa0ec657b4fb4f697b90671dd8d6ea110b376 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 11 Nov 2020 15:52:16 -0400 Subject: [PATCH 1/2] tek packets --- src/packet/messages.rs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/packet/messages.rs b/src/packet/messages.rs index af9034f..7f8708b 100644 --- a/src/packet/messages.rs +++ b/src/packet/messages.rs @@ -742,10 +742,7 @@ pub struct BuyItem { #[pso_message(0xB8)] pub struct TekRequest { - item_index: u8, - _unknown1: u8, - _unknown2: u8, - _unknown3: u8, + item_id: u32, } #[pso_message(0xB9)] @@ -755,10 +752,10 @@ pub struct TekPreview { pub item_bytes2: [u8; 4], } -//#[pso_message(0xBA)] -//pub struct TekAccept { - -//} +#[pso_message(0xBA)] +pub struct TekAccept { + pub item_id: u32, +} #[pso_message(0xBB)] pub struct BankRequest { @@ -1075,7 +1072,7 @@ pub enum GameMessage { BuyItem(BuyItem), TekRequest(TekRequest), TekPreview(TekPreview), - //TekAccept(TekAccept), + TekAccept(TekAccept), BankRequest(BankRequest), BankInteraction(BankInteraction), //PlayerSoldItem(PlayerSoldItem), @@ -1240,7 +1237,7 @@ impl PSOPacketData for GameMessage { BuyItem::CMD => Ok(GameMessage::BuyItem(BuyItem::from_bytes(&mut cur)?)), TekRequest::CMD => Ok(GameMessage::TekRequest(TekRequest::from_bytes(&mut cur)?)), TekPreview::CMD => Ok(GameMessage::TekPreview(TekPreview::from_bytes(&mut cur)?)), - //TekAccept::CMD => Ok(GameMessage::TekAccept(TekAccept::from_bytes(&mut cur)?)), + TekAccept::CMD => Ok(GameMessage::TekAccept(TekAccept::from_bytes(&mut cur)?)), BankRequest::CMD => Ok(GameMessage::BankRequest(BankRequest::from_bytes(&mut cur)?)), BankInteraction::CMD => Ok(GameMessage::BankInteraction(BankInteraction::from_bytes(&mut cur)?)), //PlayerSoldItem::CMD => Ok(GameMessage::PlayerSoldItem(PlayerSoldItem::from_bytes(&mut cur)?)), @@ -1407,7 +1404,7 @@ impl PSOPacketData for GameMessage { GameMessage::BuyItem(data) => data.as_bytes(), GameMessage::TekRequest(data) => data.as_bytes(), GameMessage::TekPreview(data) => data.as_bytes(), - // GameMessage::TekAccept(data) => data.as_bytes(), + GameMessage::TekAccept(data) => data.as_bytes(), GameMessage::BankRequest(data) => data.as_bytes(), GameMessage::BankInteraction(data) => data.as_bytes(), //GameMessage::PlayerSoldItem(data) => data.as_bytes(), From 3a1337cd127fa65ca14ec2903ca2db37b2d7dcf4 Mon Sep 17 00:00:00 2001 From: andy Date: Sat, 14 Nov 2020 14:57:05 -0400 Subject: [PATCH 2/2] pub --- src/packet/messages.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packet/messages.rs b/src/packet/messages.rs index 7f8708b..062af3c 100644 --- a/src/packet/messages.rs +++ b/src/packet/messages.rs @@ -742,7 +742,7 @@ pub struct BuyItem { #[pso_message(0xB8)] pub struct TekRequest { - item_id: u32, + pub item_id: u32, } #[pso_message(0xB9)]