From 396de5d9bec6d410c3cbf12d243b719c7bdc3d80 Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 14 May 2021 21:17:51 +0000 Subject: [PATCH] dont forget to commit this packet --- src/packet/messages.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/packet/messages.rs b/src/packet/messages.rs index 062af3c..19a7b91 100644 --- a/src/packet/messages.rs +++ b/src/packet/messages.rs @@ -787,12 +787,12 @@ pub struct GiveCharacterExp { exp: u32, } -//#[pso_message(0xC0)] -//pub struct PlayerSoldItem { -// client_id: u16, -// item_id: u8, -// amount: u8, -//} +#[pso_message(0xC0)] +pub struct PlayerSoldItem { + item_id: u32, + amount: u8, + // TODO: other data? +} //#[pso_message(0xC1)] //pub struct TeamInvite { @@ -1075,7 +1075,7 @@ pub enum GameMessage { TekAccept(TekAccept), BankRequest(BankRequest), BankInteraction(BankInteraction), - //PlayerSoldItem(PlayerSoldItem), + PlayerSoldItem(PlayerSoldItem), //TeamInvite(TeamInvite), //AcceptTeamInvite(AcceptTeamInvite), CreateItem(CreateItem), @@ -1240,7 +1240,7 @@ impl PSOPacketData for GameMessage { 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)?)), + PlayerSoldItem::CMD => Ok(GameMessage::PlayerSoldItem(PlayerSoldItem::from_bytes(&mut cur)?)), //TeamInvite::CMD => Ok(GameMessage::TeamInvite(TeamInvite::from_bytes(&mut cur)?)), //AcceptTeamInvite::CMD => Ok(GameMessage::AcceptTeamInvite(AcceptTeamInvite::from_bytes(&mut cur)?)), CreateItem::CMD => Ok(GameMessage::CreateItem(CreateItem::from_bytes(&mut cur)?)), @@ -1407,7 +1407,7 @@ impl PSOPacketData for GameMessage { GameMessage::TekAccept(data) => data.as_bytes(), GameMessage::BankRequest(data) => data.as_bytes(), GameMessage::BankInteraction(data) => data.as_bytes(), - //GameMessage::PlayerSoldItem(data) => data.as_bytes(), + GameMessage::PlayerSoldItem(data) => data.as_bytes(), //GameMessage::TeamInvite(data) => data.as_bytes(), //GameMessage::AcceptTeamInvite(data) => data.as_bytes(), GameMessage::CreateItem(data) => data.as_bytes(),