Browse Source

tek packets

pull/3/head
andy 4 years ago
parent
commit
fe1fa0ec65
  1. 19
      src/packet/messages.rs

19
src/packet/messages.rs

@ -742,10 +742,7 @@ pub struct BuyItem {
#[pso_message(0xB8)] #[pso_message(0xB8)]
pub struct TekRequest { pub struct TekRequest {
item_index: u8,
_unknown1: u8,
_unknown2: u8,
_unknown3: u8,
item_id: u32,
} }
#[pso_message(0xB9)] #[pso_message(0xB9)]
@ -755,10 +752,10 @@ pub struct TekPreview {
pub item_bytes2: [u8; 4], pub item_bytes2: [u8; 4],
} }
//#[pso_message(0xBA)]
//pub struct TekAccept {
//}
#[pso_message(0xBA)]
pub struct TekAccept {
pub item_id: u32,
}
#[pso_message(0xBB)] #[pso_message(0xBB)]
pub struct BankRequest { pub struct BankRequest {
@ -1075,7 +1072,7 @@ pub enum GameMessage {
BuyItem(BuyItem), BuyItem(BuyItem),
TekRequest(TekRequest), TekRequest(TekRequest),
TekPreview(TekPreview), TekPreview(TekPreview),
//TekAccept(TekAccept),
TekAccept(TekAccept),
BankRequest(BankRequest), BankRequest(BankRequest),
BankInteraction(BankInteraction), BankInteraction(BankInteraction),
//PlayerSoldItem(PlayerSoldItem), //PlayerSoldItem(PlayerSoldItem),
@ -1240,7 +1237,7 @@ impl PSOPacketData for GameMessage {
BuyItem::CMD => Ok(GameMessage::BuyItem(BuyItem::from_bytes(&mut cur)?)), BuyItem::CMD => Ok(GameMessage::BuyItem(BuyItem::from_bytes(&mut cur)?)),
TekRequest::CMD => Ok(GameMessage::TekRequest(TekRequest::from_bytes(&mut cur)?)), TekRequest::CMD => Ok(GameMessage::TekRequest(TekRequest::from_bytes(&mut cur)?)),
TekPreview::CMD => Ok(GameMessage::TekPreview(TekPreview::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)?)), BankRequest::CMD => Ok(GameMessage::BankRequest(BankRequest::from_bytes(&mut cur)?)),
BankInteraction::CMD => Ok(GameMessage::BankInteraction(BankInteraction::from_bytes(&mut cur)?)), BankInteraction::CMD => Ok(GameMessage::BankInteraction(BankInteraction::from_bytes(&mut cur)?)),
//PlayerSoldItem::CMD => Ok(GameMessage::PlayerSoldItem(PlayerSoldItem::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::BuyItem(data) => data.as_bytes(),
GameMessage::TekRequest(data) => data.as_bytes(), GameMessage::TekRequest(data) => data.as_bytes(),
GameMessage::TekPreview(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::BankRequest(data) => data.as_bytes(),
GameMessage::BankInteraction(data) => data.as_bytes(), GameMessage::BankInteraction(data) => data.as_bytes(),
//GameMessage::PlayerSoldItem(data) => data.as_bytes(), //GameMessage::PlayerSoldItem(data) => data.as_bytes(),

Loading…
Cancel
Save