Compare commits
No commits in common. "0bd4396bd11534169bd5a6a5b357c90b0f550991" and "7276b875c445f10dc5030b96d8bdfd12e873f8fc" have entirely different histories.
0bd4396bd1
...
7276b875c4
@ -700,7 +700,6 @@ pub enum TradeRequestCommand {
|
|||||||
RemoveItem(u32, u32),
|
RemoveItem(u32, u32),
|
||||||
Confirm,
|
Confirm,
|
||||||
FinalConfirm,
|
FinalConfirm,
|
||||||
Cancel,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PSOPacketData for TradeRequestCommand {
|
impl PSOPacketData for TradeRequestCommand {
|
||||||
@ -738,9 +737,6 @@ impl PSOPacketData for TradeRequestCommand {
|
|||||||
4 => {
|
4 => {
|
||||||
Ok(TradeRequestCommand::FinalConfirm)
|
Ok(TradeRequestCommand::FinalConfirm)
|
||||||
},
|
},
|
||||||
5 => {
|
|
||||||
Ok(TradeRequestCommand::Cancel)
|
|
||||||
},
|
|
||||||
_ => {
|
_ => {
|
||||||
Err(PacketParseError::InvalidValue)
|
Err(PacketParseError::InvalidValue)
|
||||||
},
|
},
|
||||||
@ -788,12 +784,6 @@ impl PSOPacketData for TradeRequestCommand {
|
|||||||
.chain(std::iter::repeat(0).take(11))
|
.chain(std::iter::repeat(0).take(11))
|
||||||
.collect()
|
.collect()
|
||||||
},
|
},
|
||||||
TradeRequestCommand::Cancel=> {
|
|
||||||
vec![5u8]
|
|
||||||
.into_iter()
|
|
||||||
.chain(std::iter::repeat(0).take(11))
|
|
||||||
.collect()
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1586,15 +1576,3 @@ impl PSOPacketData for GameMessage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod test {
|
|
||||||
use super::*;
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_trade_request_cancel() {
|
|
||||||
let data = vec![166, 4, 0, 0, 5, 4, 0, 0, 157, 58, 113, 0, 1, 0, 0, 0];
|
|
||||||
let _pkt = GameMessage::from_bytes(&mut std::io::Cursor::new(data)).unwrap();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user