-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.nmp
49 lines (40 loc) · 1.55 KB
/
test.nmp
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
PlayerInfoUpdateActions -> Enum[SInt8]:
{0x01} AddPlayer, {0x02} InitializeChat, {0x04} UpdateGameMode, {0x08} UpdateListed,
{0x10} UpdateLatency, {0x20} UpdateDisplayName
Property -> Struct:
name: String[32767]
value: String[32767]
isSigned: Bool
@ isSigned:
signature: String[32767]
PlayerAction -> Struct[actions: SInt8]:
@ actioans & PlayerInfoUpdateActions.AddPlayer:
name: String[16]
propertyCount: VInt32
properties: Array[propertyCount, Property]
@ actions & PlayerInfoUpdateActions.InitializeChat:
hasSignatureData: Bool
@ hasSignatureData: # Should use an optional type here, since it's a single optional field
chatSessionId: UUID
publicKeyExpiryTime: SInt64
encodedPublicKeySize: ConstrainU[VInt32, 512]
encodedPublicKey: Array[encodedPublicKeySize, UInt8]
publicKeySignatureSize: ConstrainU[VInt32, 4096]
publicKeySignature: Array[publicKeySignatureSize, UInt8]
@ actions & PlayerInfoUpdateActions.UpdateGameMode:
gameMode: VInt32
@ actions & PlayerInfoUpdateActions.UpdateListed:
listed: Bool
@ actions & PlayerInfoUpdateActions.UpdateLatency:
ping: VInt32
@ actions & PlayerInfoUpdateActions.UpdateDisplayName:
hasDisplayName: Bool
@ hasDisplayName: # Should use an optional type here, since it's a single optional field
displayName: String[5]
PlayerInfo -> Struct[actions: SInt8]:
uuid: UUID
action: PlayerAction[actions]
PlayerInfoUpdate(0, 0x3C) -> Client:
actions: SInt8
playerCount: VInt32
playerActions: Array[playerCount, PlayerInfo[actions]]