~starkingdoms/starkingdoms

ref: a032d20ee4fdccaa715bbde2cb73b318222ad6e1 starkingdoms/protocol/src/pbuf/message_c2s.proto -rw-r--r-- 1.9 KiB
a032d20e — c0repwn3r metrics 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
syntax = "proto3";
package protocol.message_c2s;

import "state.proto";
import "goodbye_reason.proto";
import "input.proto";

message MessageC2SHello {
  enum packet_info { unknown = 0; type = 0x01; }

  uint32 version = 1;             // Version of the protocol. Currently always 1
  string requested_username = 2;  // The username that the client is requesting.
  protocol.state.State next_state = 3;           // The state the connection will go into after the handshake.

  string token = 4;
  string user = 5;
}

message MessageC2SGoodbye {
  enum packet_info { unknown = 0; type = 0x02; }

  protocol.goodbye_reason.GoodbyeReason reason = 1; // The reason the client is disconnecting the server
}

message MessageC2SChat {
  enum packet_info { unknown = 0; type = 0x03; }

  string message = 1; // The chat message to sent
}

message MessageC2SPing {
  enum packet_info { unknown = 0; type = 0x04; }
}

message MessageC2SInput {
  enum packet_info { unknown = 0; type = 0x0b; }

  bool up_pressed = 1;
  bool down_pressed = 2;
  bool left_pressed = 3;
  bool right_pressed = 4;


}

message MessageC2SAuthenticateAndBeamOut {
  enum packet_info { unknown = 0; type = 0x0c; }

  string user_id = 1; // The user ID that the client is authenticating as
  string token = 2;   // The token from the authentication server that the user is authenticating as
}

message MessageC2SMouseInput {
  enum packet_info { unknown = 0; type = 0x0d; }

  double worldpos_x = 1;
  double worldpos_y = 2;
  protocol.input.InputType button = 3;
  bool released = 4;
}

message MessageC2SModuleGrabBegin {
  enum packet_info { unknown = 0; type = 0x0e; }

  uint32 module_id = 1;
  double worldpos_x = 2;
  double worldpos_y = 3;
}

message MessageC2SModuleGrabEnd {
  enum packet_info { unknown = 0; type = 0x0f; }

  uint32 module_id = 1;
  double worldpos_x = 2;
  double worldpos_y = 3;
}

message MessageC2SModuleDetach {
  enum packet_info { unknown = 0; type = 0x10; }

  uint32 module_id = 1;
}