|
@@ -10,11 +10,12 @@ local proto_struct =
|
10
|
10
|
# 房间信息
|
11
|
11
|
.DataRoom {
|
12
|
12
|
roomId 0: integer # 房间号
|
13
|
|
- playCount 1:integer # 战斗人数
|
|
13
|
+ playCount 1:integer # 战斗人数 - 历史战绩无此字段
|
14
|
14
|
battleBoxList 2: *integer # 战斗箱子ID列表
|
15
|
|
- playerList 3: *DataRoomPlayer # 房间玩家列表
|
|
15
|
+ playerList 3: *DataRoomPlayer # 房间玩家列表 - 历史战绩仅保留战斗玩家
|
16
|
16
|
status 4: integer # 房间状态 0:等待中 1:进行中 2:结束
|
17
|
17
|
createTime 5: integer # 创建时间
|
|
18
|
+ battleTime 6: integer # 战斗开始时间
|
18
|
19
|
}
|
19
|
20
|
|
20
|
21
|
# 射击结果
|
|
@@ -25,14 +26,27 @@ local proto_struct =
|
25
|
26
|
# 战斗玩家
|
26
|
27
|
.DataBattlePlayer {
|
27
|
28
|
uid 0: integer # 玩家ID
|
28
|
|
- shotList 1: *DataBattleShot # 射击结果列表
|
|
29
|
+ seatId 1: integer # 座位ID
|
|
30
|
+ shotList 2: *DataBattleShot # 射击结果列表
|
29
|
31
|
}
|
30
|
|
- # 战斗记录
|
31
|
|
- .DataBattleRecord {
|
32
|
|
- roomInfo 0: DataRoom
|
33
|
|
- battleId 1: string
|
34
|
|
- winUid 2: integer
|
35
|
|
- battlePlayerList 3: *DataBattlePlayer # 战斗玩家列表
|
|
32
|
+
|
|
33
|
+ # 战斗 - 玩家掉落
|
|
34
|
+ .DataBattlePlayerShot {
|
|
35
|
+ uid 0: integer # 玩家ID
|
|
36
|
+ shot 1: DataBattleShot # 射击结果
|
|
37
|
+ }
|
|
38
|
+ # 战斗 - 轮次信息
|
|
39
|
+ .DataBattleRound {
|
|
40
|
+ round 0: integer # 轮次
|
|
41
|
+ shotList 1: *DataBattlePlayerShot # 玩家射击列表
|
|
42
|
+ }
|
|
43
|
+ # 战斗 - 结算
|
|
44
|
+ .DataBattleSettle {
|
|
45
|
+ roomInfo 0: DataRoom # 房间信息
|
|
46
|
+ battleId 1: string # 战斗编号
|
|
47
|
+ winUid 2: integer # 胜利玩家ID
|
|
48
|
+ rounds 3: *DataBattleRound # 战斗轮次列表 - 历史战绩没有该字段
|
|
49
|
+ battlePlayerList 4: *DataBattlePlayer # 战斗玩家列表
|
36
|
50
|
}
|
37
|
51
|
]]
|
38
|
52
|
|
|
@@ -107,23 +121,35 @@ local proto_c2s =
|
107
|
121
|
}
|
108
|
122
|
}
|
109
|
123
|
|
110
|
|
- # 获取房间对战记录列表
|
|
124
|
+ # 获取房间对战记录列表 - 每次请求返回20条
|
111
|
125
|
room_get_record_list 2620 {
|
112
|
|
- request {
|
|
126
|
+ request {
|
|
127
|
+ lastTime 0: integer # 上次拉记录battleTime最小值
|
|
128
|
+ }
|
|
129
|
+ response {
|
|
130
|
+ code 0: integer # 返回结果码
|
|
131
|
+ list 1: *DataBattleSettle # 房间对战记录列表
|
|
132
|
+ }
|
|
133
|
+ }
|
|
134
|
+
|
|
135
|
+ # 获取玩家个人对战记录 - 每次请求返回20条
|
|
136
|
+ room_get_player_record_list 2621 {
|
|
137
|
+ request {
|
|
138
|
+ lastTime 0: integer # 上次拉记录battleTime最小值
|
113
|
139
|
}
|
114
|
140
|
response {
|
115
|
141
|
code 0: integer # 返回结果码
|
116
|
|
- list 1: *DataBattleRecord # 房间对战记录列表
|
|
142
|
+ list 1: *DataBattleSettle # 房间对战记录列表
|
117
|
143
|
}
|
118
|
144
|
}
|
119
|
145
|
|
120
|
|
- # 获取房间对战记录列表
|
121
|
|
- room_get_brilliant_record_list 2621 {
|
122
|
|
- request {
|
|
146
|
+ # 获取精彩对战记录列表 - 仅返回当前最近20(配置)条记录
|
|
147
|
+ room_get_brilliant_record_list 2622 {
|
|
148
|
+ request {
|
123
|
149
|
}
|
124
|
150
|
response {
|
125
|
151
|
code 0: integer # 返回结果码
|
126
|
|
- list 1: *DataBattleRecord # 房间对战记录列表
|
|
152
|
+ list 1: *DataBattleSettle # 房间对战记录列表
|
127
|
153
|
}
|
128
|
154
|
}
|
129
|
155
|
]]
|
|
@@ -152,13 +178,20 @@ local proto_s2c =
|
152
|
178
|
changeRoomPlayer 2: *DataRoomPlayer # 变化的房间成员
|
153
|
179
|
}
|
154
|
180
|
}
|
155
|
|
-
|
|
181
|
+
|
156
|
182
|
# 坐下房间位置结果
|
157
|
183
|
on_room_seat_down 2603 {
|
158
|
184
|
request {
|
159
|
185
|
code 0: integer # 错误码
|
160
|
186
|
}
|
161
|
187
|
}
|
|
188
|
+
|
|
189
|
+ # 比赛结算
|
|
190
|
+ on_room_battle_settle 2604 {
|
|
191
|
+ request {
|
|
192
|
+ settle 0: DataBattleSettle
|
|
193
|
+ }
|
|
194
|
+ }
|
162
|
195
|
]]
|
163
|
196
|
|
164
|
197
|
local proto = {
|