forked from pangbox/packetdoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ksy
41 lines (37 loc) · 815 Bytes
/
index.ksy
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
#pragma.template root
---
meta:
id: pangya_packet
title: PangYa Packet
endian: le
imports:
- 'loginservice/index'
- 'gameservice/index'
- 'messageservice/index'
- 'common/origin'
- 'common/version'
doc: |
This is the root definition of all PangYa packets.
params:
- id: type
type: u1
enum: service
- id: origin
type: u1
enum: packet_origin::origin
- id: version
type: u1
enum: packet_version::version
seq:
- id: packet
type:
switch-on: type
cases:
service::loginservice: loginservice_packet(origin, version)
service::gameservice: gameservice_packet(origin, version)
service::messageservice: messageservice_packet(origin, version)
enums:
service:
0: loginservice
1: gameservice
2: messageservice