From 683c2e49b1b350b74f87f826cdfb0c833c63d7f3 Mon Sep 17 00:00:00 2001 From: Andy Newjack Date: Sat, 9 May 2020 13:46:02 -0300 Subject: [PATCH] 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(),