-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathproto_example.proto
More file actions
205 lines (179 loc) · 3.76 KB
/
proto_example.proto
File metadata and controls
205 lines (179 loc) · 3.76 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
syntax = "proto3";
package avant;
option go_package = "/proto_res";
// PROTO_CMD_CS_REQ_EXAMPLE
message ProtoCSReqExample
{
bytes testContext = 1;
}
// PROTO_CMD_CS_RES_EXAMPLE
message ProtoCSResExample
{
bytes testContext = 1;
}
// PROTO_CMD_CS_REQ_LOGIN 登录
message ProtoCSReqLogin
{
string userId=1;
string password=2;
}
// PROTO_CMD_CS_RES_LOGIN 登录返回
message ProtoCSResLogin
{
int32 ret=1;
string sessionId=2;
}
// PROTO_CMD_CS_MAP_NOTIFY_INIT_DATA 进入地图发送init数据
message ProtoCSMapNotifyInitData
{
string userId=1;
int32 x=2;
int32 y=3;
uint64 serverTime=4;
int32 tileSize=5;
int32 width=6;
int32 height=7;
int32 mapId=8;
}
// PROTO_CMD_CS_REQ_MAP_PING 地图内客户端心跳请求
message ProtoCSReqMapPing
{
uint64 clientTime=1;
}
// PROTO_CMD_CS_RES_MAP_PONG 地图内服务器响应客户端的心跳请求
message ProtoCSResMapPong
{
uint64 clientTime=1;
uint64 serverTime=2;
}
// PROTO_CMD_CS_REQ_MAP_INPUT 地图内客户端上报输入
message ProtoCSReqMapInput
{
int32 dirX=1;
int32 dirY=2;
uint32 seq=3;
uint64 clientTime=4;
}
// PROTO_CMD_CS_MAP_NOTIFY_STATE_DATA 地图服务器同步状态给客户端
message ProtoMapPlayerPayload
{
string userId=1;
int32 x=2;
int32 y=3;
int32 vX=4;
int32 vY=5;
uint32 lastSeq=6;
uint64 lastClientTime=7;
}
message ProtoCSMapNotifyStateData
{
uint64 serverTime=1;
repeated ProtoMapPlayerPayload players=2;
}
// PROTO_CMD_CS_MAP_ENTER_REQ 进入地图请求
message ProtoCSMapEnterReq
{
uint32 mapId=1;
}
// PROTO_CMD_CS_MAP_ENTER_RES 进入地图返回
message ProtoCSMapEnterRes
{
int32 ret=1;
uint32 mapId=2;
}
// PROTO_CMD_CS_MAP_LEAVE_REQ 离开地图请求
message ProtoCSMapLeaveReq
{
int32 nothing=1;
}
// PROTO_CMD_CS_MAP_LEAVE_RES 离开地图返回
message ProtoCSMapLeaveRes
{
int32 ret=1;
}
// PROTO_CMD_CS_MAP3D_NOTIFY_INIT_DATA 进入地图3D发送init数据
message ProtoCSMap3DNotifyInitData
{
string userId=1;
int32 x=2;
int32 y=3;
uint64 serverTime=4;
int32 xSize=6;
int32 ySize=7;
int32 zSize=8;
int32 mapId=9;
int32 z=10;
}
// PROTO_CMD_CS_REQ_MAP3D_PING 地图3D内客户端心跳请求
message ProtoCSReqMap3DPing
{
uint64 clientTime=1;
}
// PROTO_CMD_CS_RES_MAP3D_PONG 地图3D内服务器响应客户端的心跳请求
message ProtoCSResMap3DPong
{
uint64 clientTime=1;
uint64 serverTime=2;
}
// PROTO_CMD_CS_REQ_MAP3D_INPUT 地图3D内客户端上报输入
message ProtoCSReqMap3DInput
{
int32 dirX=1;
int32 dirY=2;
int32 dirZ=3;
uint32 seq=4;
uint64 clientTime=5;
}
// PROTO_CMD_CS_MAP3D_NOTIFY_STATE_DATA 地图3D服务器同步状态给客户端
message ProtoMap3DPlayerPayload
{
string userId=1;
int32 x=2;
int32 y=3;
int32 z=4;
int32 vX=5;
int32 vY=6;
int32 vZ=7;
uint32 lastSeq=8;
uint64 lastClientTime=9;
}
message ProtoCSMap3DNotifyStateData
{
uint64 serverTime=1;
repeated ProtoMap3DPlayerPayload players=2;
}
// PROTO_CMD_CS_MAP3D_ENTER_REQ 进入地图3D请求
message ProtoCSMap3DEnterReq
{
uint32 mapId=1;
}
// PROTO_CMD_CS_MAP3D_ENTER_RES 进入地图3D返回
message ProtoCSMap3DEnterRes
{
int32 ret=1;
uint32 mapId=2;
}
// PROTO_CMD_CS_MAP3D_LEAVE_REQ 离开地图3D请求
message ProtoCSMap3DLeaveReq
{
int32 nothing=1;
}
// PROTO_CMD_CS_MAP3D_LEAVE_RES 离开地图3D返回
message ProtoCSMap3DLeaveRes
{
int32 ret=1;
}
// PROTO_CMD_CS_REQ_CREATE_USER 创建新账号请求
message ProtoCSReqCreateUser
{
string userId=1;
string password=2;
}
// PROTO_CMD_CS_RES_CREATE_USER 创建新账号返回
message ProtoCSResCreateUser
{
int32 ret=1;
string userId=2;
string password=3;
uint64 userRecordID=4;
}