Browse Source

trade packets

pull/3/head
jake 4 years ago
parent
commit
a2ecb14d82
  1. 16
      src/packet/messages.rs
  2. 30
      src/packet/ship.rs

16
src/packet/messages.rs

@ -661,10 +661,12 @@ pub struct BoxDropRequest {
//}
//#[pso_message(0xA6)]
//pub struct TradeRequest {
//}
#[pso_message(0xA6)]
pub struct TradeRequest {
unknown1: u32,
unknown2: u32,
unknown3: u32,
}
//#[pso_message(0xA8)]
//pub struct BossInteractionGolDragon {
@ -1058,7 +1060,7 @@ pub enum GameMessage {
//BossInteractionOlgaFlow(BossInteractionOlgaFlow),
//BossInteractionOlgaFlow2(BossInteractionOlgaFlow2),
//BossInteractionOlgaFlow3(BossInteractionOlgaFlow3),
//TradeRequest(TradeRequest),
TradeRequest(TradeRequest),
//BossInteractionGolDragon(BossInteractionGolDragon),
//BossInteractionBarbaRay(BossInteractionBarbaRay),
//BossInteractionBarbaRay2(BossInteractionBarbaRay2),
@ -1223,7 +1225,7 @@ impl PSOPacketData for GameMessage {
//BossInteractionOlgaFlow::CMD => Ok(GameMessage::BossInteractionOlgaFlow(BossInteractionOlgaFlow::from_bytes(&mut cur)?)),
//BossInteractionOlgaFlow2::CMD => Ok(GameMessage::BossInteractionOlgaFlow2(BossInteractionOlgaFlow2::from_bytes(&mut cur)?)),
//BossInteractionOlgaFlow3::CMD => Ok(GameMessage::BossInteractionOlgaFlow3(BossInteractionOlgaFlow3::from_bytes(&mut cur)?)),
//TradeRequest::CMD => Ok(GameMessage::TradeRequest(TradeRequest::from_bytes(&mut cur)?)),
TradeRequest::CMD => Ok(GameMessage::TradeRequest(TradeRequest::from_bytes(&mut cur)?)),
//BossInteractionGolDragon::CMD => Ok(GameMessage::BossInteractionGolDragon(BossInteractionGolDragon::from_bytes(&mut cur)?)),
//BossInteractionBarbaRay::CMD => Ok(GameMessage::BossInteractionBarbaRay(BossInteractionBarbaRay::from_bytes(&mut cur)?)),
//BossInteractionBarbaRay2::CMD => Ok(GameMessage::BossInteractionBarbaRay2(BossInteractionBarbaRay2::from_bytes(&mut cur)?)),
@ -1390,7 +1392,7 @@ impl PSOPacketData for GameMessage {
//GameMessage::BossInteractionOlgaFlow(data) => data.as_bytes(),
//GameMessage::BossInteractionOlgaFlow2(data) => data.as_bytes(),
//GameMessage::BossInteractionOlgaFlow3(data) => data.as_bytes(),
//GameMessage::TradeRequest(data) => data.as_bytes(),
GameMessage::TradeRequest(data) => data.as_bytes(),
//GameMessage::BossInteractionGolDragon(data) => data.as_bytes(),
//GameMessage::BossInteractionBarbaRay(data) => data.as_bytes(),
//GameMessage::BossInteractionBarbaRay2(data) => data.as_bytes(),

30
src/packet/ship.rs

@ -583,3 +583,33 @@ pub struct FullCharacterData {
pub struct SaveOptions {
pub options: u32,
}
#[derive(PSOPacketData, Clone, Copy, Default)]
pub struct TradeItem {
pub item_data: [u8; 12],
pub item_id: u32,
pub item_data2: [u8; 4],
}
#[pso_packet(0xD0)]
pub struct ItemsToTrade {
pub trade_target: u8,
pub unknown2: u8,
pub count: u16,
pub items: [TradeItem; 32],
}
#[pso_packet(0xD1)]
pub struct AcknowledgeTrade {
}
#[pso_packet(0xD2)]
pub struct TradeConfirmed {
}
#[pso_packet(0xD4)]
pub struct CancelTrade {
}
Loading…
Cancel
Save