From 35e91b38f12b480959b7dcbbd1e12670670f4d93 Mon Sep 17 00:00:00 2001 From: Andy Newjack Date: Sat, 2 May 2020 18:28:29 -0300 Subject: [PATCH 1/3] rename tech -> tek and uncomment requests --- src/packet/messages.rs | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/packet/messages.rs b/src/packet/messages.rs index a02bd7a..370dcd2 100644 --- a/src/packet/messages.rs +++ b/src/packet/messages.rs @@ -722,13 +722,16 @@ pub struct PhotonChairMove { // unknown3: u8, //} -//#[pso_message(0xB8)] -//pub struct TechItem { - -//} +#[pso_message(0xB8)] +pub struct TekRequest { + item_index: u8, + _unknown1: u8, + _unknown2: u8, + _unknown3: u8, +} //#[pso_message(0xBA)] -//pub struct TechWeaponAccept { +//pub struct TekAccept { //} @@ -1037,8 +1040,8 @@ pub enum GameMessage { PhotonChairMove(PhotonChairMove), //ShopRequest(ShopRequest), //BuyItem(BuyItem), - //TechItem(TechItem), - //TechWeaponAccept(TechWeaponAccept), + TekRequest(TekRequest), + //TekAccept(TekAccept), //BankRequest(BankRequest), //BankInteraction(BankInteraction), //PlayerSoldItem(PlayerSoldItem), @@ -1199,8 +1202,8 @@ impl PSOPacketData for GameMessage { PhotonChairMove::CMD => Ok(GameMessage::PhotonChairMove(PhotonChairMove::from_bytes(&mut cur)?)), //ShopRequest::CMD => Ok(GameMessage::ShopRequest(ShopRequest::from_bytes(&mut cur)?)), //BuyItem::CMD => Ok(GameMessage::BuyItem(BuyItem::from_bytes(&mut cur)?)), - //TechItem::CMD => Ok(GameMessage::TechItem(TechItem::from_bytes(&mut cur)?)), - //TechWeaponAccept::CMD => Ok(GameMessage::TechWeaponAccept(TechWeaponAccept::from_bytes(&mut cur)?)), + TekRequest::CMD => Ok(GameMessage::TekRequest(TekRequest::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)?)), @@ -1363,8 +1366,8 @@ impl PSOPacketData for GameMessage { GameMessage::PhotonChairMove(data) => data.as_bytes(), //GameMessage::ShopRequest(data) => data.as_bytes(), //GameMessage::BuyItem(data) => data.as_bytes(), - //GameMessage::TechItem(data) => data.as_bytes(), - //GameMessage::TechWeaponAccept(data) => data.as_bytes(), + GameMessage::TekRequest(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 683c2e49b1b350b74f87f826cdfb0c833c63d7f3 Mon Sep 17 00:00:00 2001 From: Andy Newjack Date: Sat, 9 May 2020 13:46:02 -0300 Subject: [PATCH 2/3] add tek preview packets --- src/packet/messages.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/packet/messages.rs b/src/packet/messages.rs index 370dcd2..fd3133b 100644 --- a/src/packet/messages.rs +++ b/src/packet/messages.rs @@ -730,6 +730,14 @@ pub struct TekRequest { _unknown3: u8, } +#[pso_message(0xB9)] +pub struct TekPreview { + pub item_bytes: [u8; 12], + pub item_id: u32, + pub item_bytes2: [u8; 4], + pub padding: [u8; 8], +} + //#[pso_message(0xBA)] //pub struct TekAccept { @@ -1041,6 +1049,7 @@ pub enum GameMessage { //ShopRequest(ShopRequest), //BuyItem(BuyItem), TekRequest(TekRequest), + TekPreview(TekPreview), //TekAccept(TekAccept), //BankRequest(BankRequest), //BankInteraction(BankInteraction), @@ -1203,6 +1212,7 @@ impl PSOPacketData for GameMessage { //ShopRequest::CMD => Ok(GameMessage::ShopRequest(ShopRequest::from_bytes(&mut cur)?)), //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)?)), //BankRequest::CMD => Ok(GameMessage::BankRequest(BankRequest::from_bytes(&mut cur)?)), //BankInteraction::CMD => Ok(GameMessage::BankInteraction(BankInteraction::from_bytes(&mut cur)?)), @@ -1367,7 +1377,8 @@ impl PSOPacketData for GameMessage { //GameMessage::ShopRequest(data) => data.as_bytes(), //GameMessage::BuyItem(data) => data.as_bytes(), GameMessage::TekRequest(data) => data.as_bytes(), - GameMessage::TekAccept(data) => data.as_bytes(), + GameMessage::TekPreview(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 0363cb6e34536a8b169d0c1c75fc0653097c7787 Mon Sep 17 00:00:00 2001 From: Andy Newjack Date: Fri, 29 May 2020 16:33:37 -0300 Subject: [PATCH 3/3] remove padding --- src/packet/messages.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/packet/messages.rs b/src/packet/messages.rs index fd3133b..5dee9e3 100644 --- a/src/packet/messages.rs +++ b/src/packet/messages.rs @@ -735,7 +735,6 @@ pub struct TekPreview { pub item_bytes: [u8; 12], pub item_id: u32, pub item_bytes2: [u8; 4], - pub padding: [u8; 8], } //#[pso_message(0xBA)]