terraria_protocol/packets/
update_minion_target.rs1use crate::packets::PacketBody;
2use crate::structures::Vec2;
3use crate::SliceCursor;
4
5#[derive(Debug)]
9pub struct UpdateMinionTarget {
10 pub player_id: u8,
11 pub target: Vec2,
12}
13
14impl PacketBody for UpdateMinionTarget {
15 const TAG: u8 = 99;
16
17 fn write_body(&self, cursor: &mut SliceCursor) {
18 cursor.write(&self.player_id);
19 cursor.write(&self.target);
20 }
21
22 fn from_body(cursor: &mut SliceCursor) -> Self {
23 Self {
24 player_id: cursor.read(),
25 target: cursor.read(),
26 }
27 }
28}