-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPacket.proto
891 lines (780 loc) · 19.7 KB
/
Packet.proto
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
package Packet;
enum ClientId {
PlayerIdentification = 0;
PingReply = 1;
SetBlock = 5;
FillArea = 510;
PositionandOrientation = 8;
Craft = 9;
Message = 13;
DialogClick = 14;
RequestBlob = 50;
InventoryAction = 51;
Health = 52;
MonsterHit = 53;
Shot = 54;
SpecialKey = 55;
ActiveMaterialSlot = 56;
Leave = 57;
Reload = 58;
Oxygen = 59;
Death = 60;
EntityInteraction = 61;
ServerQuery = 64;
GameResolution = 10;
ExtendedPacketCommand = 100;
}
message ClientIdentification {
optional string mdProtocolVersion = 1;
optional string username = 2;
optional string verificationKey = 3;
optional string serverPassword = 4;
}
message ClientRequestBlob {
optional StringList requestedMd5 = 1;
}
message ClientSetBlock {
optional int32 x = 1;
optional int32 y = 2;
optional int32 z = 3;
optional BlockSetMode mode = 4 [default = Destroy];
optional int32 blockType = 5; // obsolete
optional int32 materialSlot = 6;
}
message ClientFillArea {
optional int32 X1 = 1;
optional int32 X2 = 2;
optional int32 Y1 = 3;
optional int32 Y2 = 4;
optional int32 Z1 = 5;
optional int32 Z2 = 6;
optional int32 blockType = 7;
optional int32 MaterialSlot = 8;
}
message ClientPositionAndOrientation {
optional int32 playerId = 1;
optional int32 x = 2;
optional int32 y = 3;
optional int32 z = 4;
optional int32 heading = 5;
optional int32 pitch = 6;
optional int32 stance = 7;
}
message ClientMessage {
optional string message = 1;
optional int32 isTeamchat = 2;
}
enum InventoryActionType {
Click = 0;
WearItem = 1;
MoveToInventory = 2;
}
message ClientInventoryAction {
optional InventoryActionType action = 1 [default = Click];
optional InventoryPosition a = 2;
optional InventoryPosition b = 3;
}
message InventoryPosition {
optional InventoryPositionType type = 1 [default = MainArea];
optional int32 AreaX = 2;
optional int32 AreaY = 3;
optional int32 MaterialId = 4;
//WearPlace
optional int32 WearPlace = 5;
optional int32 ActiveMaterial = 6;
optional int32 GroundPositionX = 7;
optional int32 GroundPositionY = 8;
optional int32 GroundPositionZ = 9;
optional MouseEventArgs MouseArgs = 10;
}
enum InventoryPositionType {
MainArea = 0;
Ground = 1;
MaterialSelector = 2;
WearPlace = 3;
}
message MouseEventArgs {
optional int32 x = 1;
optional int32 y = 2;
optional int32 movementX = 3;
optional int32 movementY = 4;
optional int32 buttonClicked = 5;
}
message PositionAndOrientation {
optional int32 x = 1;
optional int32 y = 2;
optional int32 z = 3;
optional int32 heading = 4;
optional int32 pitch = 5;
optional int32 stance = 6;
}
enum BlockSetMode {
Destroy = 0;
Create = 1;
Use = 2; //open doors, use crafting table, etc.
UseWithTool = 3;
}
message ClientReload {}
message ClientLeave {
optional LeaveReason Reason = 1 [default = Leave];
}
enum LeaveReason {
Leave = 0;
Crash = 1;
}
//Temporary, for client-side health.
//TODO: fix because it allows cheating.
message ClientHealth {
optional int32 currentHealth = 1;
}
message ClientOxygen {
optional int32 currentOxygen = 1;
}
message ClientDialogClick {
optional string widgetId = 1;
repeated string textBoxValue = 3;
}
message ClientPingReply {}
message ClientCraft {
optional int32 X = 1;
optional int32 Y = 2;
optional int32 Z = 3;
optional int32 RecipeId = 4;
}
message ClientShot {
optional int32 FromX = 1;
optional int32 FromY = 2;
optional int32 FromZ = 3;
optional int32 ToX = 4;
optional int32 ToY = 5;
optional int32 ToZ = 6;
optional int32 WeaponBlock = 7;
optional int32 HitPlayer = 8;
optional int32 IsHitHead = 9;
optional int32 ExplodesAfter = 10;
}
message ClientSpecialKey {
optional SpecialKey key_ = 1 [default = Respawn];
}
enum SpecialKey {
Respawn = 0;
SetSpawn = 1;
TabPlayerList = 2;
SelectTeam = 3;
}
message ClientActiveMaterialSlot {
optional int32 activeMaterialSlot = 1;
}
enum DeathReason {
FallDamage = 0;
BlockDamage = 1;
Drowning = 2;
Explosion = 3;
}
message ClientDeath {
optional DeathReason reason = 1 [default = FallDamage];
optional int32 sourcePlayer = 2;
}
message ClientServerQuery {}
message ClientGameResolution {
optional int32 width = 1;
optional int32 height = 2;
}
message Client {
optional ClientId id = 1 [default = PlayerIdentification];
optional ClientIdentification identification = 2;
optional ClientSetBlock setBlock = 3;
optional ClientFillArea fillArea = 31;
optional ClientPositionAndOrientation positionAndOrientation = 4;
optional ClientMessage message = 5;
optional ClientCraft craft = 6;
optional ClientRequestBlob requestBlob = 7;
optional ClientInventoryAction inventoryAction = 8;
optional ClientHealth health = 9;
optional ClientPingReply pingReply = 10;
optional ClientDialogClick dialogClick_ = 11;
optional ClientShot shot = 12;
optional ClientSpecialKey specialKey_ = 13;
optional ClientActiveMaterialSlot activeMaterialSlot = 14;
optional ClientLeave leave = 15;
optional ClientReload reload = 16;
optional ClientOxygen oxygen = 17;
optional ClientDeath death = 18;
optional ClientServerQuery query = 19;
optional ClientGameResolution gameResolution = 20;
optional ClientEntityInteraction entityInteraction = 21;
}
message ClientEntityInteraction {
optional int32 entityId = 1;
optional EntityInteractionType interactionType = 2 [default = Use];
}
enum EntityInteractionType {
Use = 0;
Hit = 1;
}
message SoundSet {
repeated string walk = 1;
repeated string break1 = 2;
repeated string build = 3;
repeated string clone = 4;
repeated string shoot = 5;
repeated string shootEnd = 6;
repeated string reload = 7;
repeated string bounce = 8;
repeated string explosion = 9;
repeated string hitHead = 10;
repeated string hitBody = 11;
}
message AnimationSet {
repeated string shot = 1;
repeated string hit = 2;
repeated string explosion = 3;
}
message BlockType {
optional string textureIdTop = 1;
optional string textureIdBottom = 2;
optional string textureIdFront = 3;
optional string textureIdBack = 4;
optional string textureIdLeft = 5;
optional string textureIdRight = 6;
optional string textureIdForInventory = 7;
optional DrawType drawType = 8 [default = Empty];
optional WalkableType walkableType = 9 [default = Empty];
optional int32 rail = 10;
optional int32 walkSpeedFloat = 11;
optional bool isSlipperyWalk = 12;
optional SoundSet sounds = 13;
optional int32 lightRadius = 14;
optional int32 startInventoryAmount = 15;
optional int32 strength = 16;
optional string name = 17;
optional bool isBuildable = 18;
optional bool isUsable = 19;
optional bool isTool = 20;
optional string handimage = 21;
optional bool isPistol = 22;
optional int32 aimRadiusFloat = 23;
optional int32 recoilFloat = 24;
optional int32 delayFloat = 25;
optional int32 bulletsPerShotFloat = 26;
optional int32 walkSpeedWhenUsedFloat = 27;
optional bool ironSightsEnabled = 28;
optional int32 ironSightsMoveSpeedFloat = 29;
optional string ironSightsImage = 30;
optional int32 ironSightsAimRadiusFloat = 31;
optional int32 ironSightsFovFloat = 32;
optional int32 ammoMagazine = 33;
optional int32 ammoTotal = 34;
optional int32 reloadDelayFloat = 35;
optional int32 explosionRangeFloat = 36;
optional int32 explosionTimeFloat = 37;
optional int32 projectileSpeedFloat = 38; // 0 is infinite
optional bool projectileBounce = 39;
optional int32 damageBodyFloat = 40;
optional int32 damageHeadFloat = 41;
optional PistolType pistolType = 42 [default = Normal];
optional int32 damageToPlayer = 43;
optional int32 whenPlacedGetsConvertedTo = 44;
optional int32 pickDistanceWhenUsedFloat = 45;
optional InventoryType inventoryType = 46 [default = Empty];
optional WearableType wearableType = 47 [default = Empty];
optional int32 sort = 48;
optional string sortAfter = 49;
optional AnimationSet animations = 50;
}
enum DrawType {
Empty = 0;
Solid = 1;
Transparent = 2;
Fluid = 3;
Torch = 4;
Plant = 5;
OpenDoorLeft = 6;
OpenDoorRight = 7;
ClosedDoor = 8;
Ladder = 9;
Fence = 10;
HalfHeight = 11;
Flat = 12;
Cactus = 13;
}
enum WalkableType {
Empty = 0;
Fluid = 1;
Solid = 2;
}
enum InventoryType {
Empty = 0;
Block = 1;
Nature = 2;
Item = 3;
Tool = 4;
Magic = 5;
Creature = 5;
}
enum WearableType {
Empty = 0;
Head = 1;
Torso = 2;
Hands = 3;
Legs = 4;
Feet = 5;
}
enum PistolType {
Normal = 0;
Grenade = 1;
Melee = 2;
Magic = 3;
}
enum ServerId {
ServerIdentification = 0;
Ping = 1;
PlayerPing = 111;
LevelInitialize = 2;
LevelDataChunk = 3;
LevelFinalize = 4;
SetBlock = 6;
FillArea = 61;
FillAreaLimit = 62;
Message = 13;
DisconnectPlayer = 14;
Chunk_ = 15;
FiniteInventory = 16;
Season = 17;
BlobInitialize = 18;
BlobPart = 19;
BlobFinalize = 20;
HeightmapChunk = 21;
Sound = 22;
PlayerStats = 23;
Monster = 24;
ActiveMonsters = 25;
PlayerSpawnPosition = 26;
BlockTypes = 27;
SunLevels = 28;
LightLevels = 29;
CraftingRecipes = 30;
RemoveMonsters = 50;
Freemove = 51;
Dialog = 52;
Follow = 53;
Bullet = 54;
Ammo = 55;
BlockType = 56;
ChunkPart = 57;
Explosion = 58;
Projectile = 59;
Translation = 60;
QueryAnswer = 64;
ServerRedirect = 65;
EntitySpawn = 66;
EntityPosition = 67;
EntityDespawn = 68;
ExtendedPacketCommand = 100;
ExtendedPacketTick = 101;
}
message ServerIdentification {
optional string mdProtocolVersion = 1;
optional int32 assignedClientId = 2;
optional string serverName = 3;
optional string serverMotd = 4;
optional int32 mapSizeX = 7;
optional int32 mapSizeY = 8;
optional int32 mapSizeZ = 9;
optional int32 disableShadows = 11;
optional int32 playerAreaSize = 12;
optional int32 renderHint_ = 13;
optional StringList requiredBlobMd5 = 14;
optional StringList requiredBlobName = 15;
}
message StringList {
repeated string items = 1;
}
message IntString {
optional int32 key_ = 1;
optional string value_ = 2;
}
message ServerPlayerSpawnPosition {
optional int32 x = 1;
optional int32 y = 2;
optional int32 z = 3;
}
message ServerLevelInitialize {}
message ServerBlobInitialize {
//[ProtoMember(1, IsRequired = false)]
//optional byte[] hash; //TODO: currently ignored.
optional string name = 2;
optional string md5 = 3;
}
message ServerBlobPart {
optional bytes data = 1;
optional int32 islastpart = 2;
}
message ServerBlobFinalize {}
message ServerBlockTypes {}
message ServerBlockType {
optional int32 id = 1;
optional BlockType blocktype = 2;
}
message ServerSunLevels {
repeated int32 sunlevels = 1;
}
message ServerLightLevels {
repeated int32 lightlevels = 1;
}
message ServerCraftingRecipes {
repeated CraftingRecipe CraftingRecipes = 1;
}
message Ingredient {
optional int32 Type = 1;
optional int32 Amount = 2;
}
message CraftingRecipe {
repeated Ingredient ingredients = 1;
optional Ingredient output = 2;
}
message ServerLevelProgress {
//[ProtoMember(1, IsRequired = false)]
//optional byte[] Chunk;
optional int32 percentComplete = 2;
optional string status = 3;
optional int32 percentCompleteSubitem = 4;
}
message ServerLevelFinalize {}
message ServerSetBlock {
optional int32 x = 1;
optional int32 y = 2;
optional int32 z = 3;
optional int32 blockType = 4;
}
message ServerFillArea {
optional int32 x1 = 1;
optional int32 x2 = 2;
optional int32 y1 = 3;
optional int32 y2 = 4;
optional int32 z1 = 5;
optional int32 z2 = 6;
optional int32 blockType = 7;
optional int32 blockCount = 8;
}
message ServerFillAreaLimit {
optional int32 limit = 1;
}
message ServerFreemove {
optional int32 isEnabled = 1;
}
message ServerMessage {
// optional int32 playerId = 1;
optional string message = 2;
}
message ServerDisconnectPlayer {
optional string disconnectReason = 1;
}
message ServerSound {
optional string name = 1;
optional int32 x = 2;
optional int32 y = 3;
optional int32 z = 4;
}
message ServerFollow {
optional string client = 1;
optional int32 tpp = 2;
}
message ServerBullet {
optional int32 fromXFloat = 1;
optional int32 fromYFloat = 2;
optional int32 fromZFloat = 3;
optional int32 toXFloat = 4;
optional int32 toYFloat = 5;
optional int32 toZFloat = 6;
optional int32 speedFloat = 7;
}
message ServerProjectile {
optional int32 fromXFloat = 1;
optional int32 fromYFloat = 2;
optional int32 fromZFloat = 3;
optional int32 velocityXFloat = 4;
optional int32 velocityYFloat = 5;
optional int32 velocityZFloat = 6;
optional int32 blockId = 7;
optional int32 explodesAfterFloat = 8;
optional int32 sourcePlayerID = 9;
}
message ServerExplosion {
optional int32 xFloat = 1;
optional int32 yFloat = 2;
optional int32 zFloat = 3;
optional int32 isRelativeToPlayerPosition = 4;
optional int32 rangeFloat = 5;
optional int32 timeFloat = 6;
}
message ServerQueryAnswer {
optional string Name = 1;
optional string MOTD = 2;
optional int32 PlayerCount = 3;
optional int32 MaxPlayers = 4;
optional string PlayerList = 5;
optional int32 Port = 6;
optional string GameMode = 7;
optional bool Password = 8;
optional string PublicHash = 9;
optional string ServerVersion = 10;
optional int32 MapSizeX = 11;
optional int32 MapSizeY = 12;
optional int32 MapSizeZ = 13;
optional bytes ServerThumbnail = 14;
}
message ServerRedirect {
optional string IP = 1;
optional int32 Port = 2;
}
message Server {
optional ServerId id = 90 [default = ServerIdentification];
optional ServerIdentification identification = 1;
optional ServerLevelInitialize levelInitialize = 2;
optional ServerLevelProgress levelDataChunk = 3;
optional ServerLevelFinalize levelFinalize = 4;
optional ServerSetBlock setBlock = 5;
optional ServerFillArea fillArea = 51;
optional ServerFillAreaLimit fillAreaLimit = 52;
optional ServerFreemove freemove = 53;
optional ServerMessage message = 9;
optional ServerDisconnectPlayer disconnectPlayer = 10;
optional ServerChunk chunk_ = 11;
optional ServerInventory inventory = 12;
optional ServerSeason season = 13;
optional ServerBlobInitialize blobInitialize = 14;
optional ServerBlobPart blobPart = 15;
optional ServerBlobFinalize blobFinalize = 16;
optional ServerHeightmapChunk heightmapChunk = 17;
optional ServerPing ping = 18;
optional ServerPlayerPing playerPing = 181;
optional ServerSound sound = 19;
optional ServerPlayerStats playerStats = 20;
optional ServerMonsters monster = 21;
optional ServerPlayerSpawnPosition playerSpawnPosition = 22;
optional ServerBlockTypes blockTypes = 23;
optional ServerSunLevels sunLevels = 24;
optional ServerLightLevels lightLevels = 25;
optional ServerCraftingRecipes craftingRecipes = 26;
optional ServerDialog dialog = 27;
optional ServerFollow follow = 28;
optional ServerBullet bullet = 29;
optional ServerAmmo ammo = 30;
optional ServerBlockType blockType = 31;
optional ServerChunkPart chunkPart = 32;
optional ServerExplosion explosion = 33;
optional ServerProjectile projectile = 34;
optional ServerTranslatedString translation = 35;
optional ServerQueryAnswer queryAnswer = 36;
optional ServerRedirect redirect = 37;
optional ServerEntitySpawn entitySpawn = 39;
optional ServerEntityPositionAndOrientation entityPosition = 40;
optional ServerEntityDespawn entityDespawn = 41;
}
message ServerEntitySpawn {
optional int32 id = 1;
optional ServerEntity entity_ = 2;
}
message ServerEntityPositionAndOrientation {
optional int32 id = 1;
optional PositionAndOrientation positionAndOrientation = 2;
}
message ServerEntityDespawn {
optional int32 id = 1;
}
message ServerEntity {
optional PositionAndOrientation position = 1;
optional ServerEntityAnimatedModel drawModel = 2;
optional ServerEntityDrawName drawName_ = 3;
optional ServerEntityDrawText drawText = 4;
optional ServerEntityDrawBlock drawBlock = 5;
optional ServerEntityPush push = 6;
optional bool usable = 7;
optional ServerPlayerStats playerStats = 8;
optional ServerEntityDrawArea drawArea = 9;
}
message ServerEntityDrawArea {
optional int32 x = 1;
optional int32 y = 2;
optional int32 z = 3;
optional int32 sizex = 4;
optional int32 sizey = 5;
optional int32 sizez = 6;
optional int32 visibleToClientId = 7;
}
message ServerEntityAnimatedModel {
optional string model_ = 1;
optional string texture_ = 2;
optional int32 eyeHeight = 3;
optional int32 modelHeight = 4;
optional int32 downloadSkin = 5;
}
message ServerEntityDrawName {
optional string name = 1;
optional bool onlyWhenSelected = 2;
optional bool clientAutoComplete = 3;
optional string color = 4;
}
message ServerEntityDrawText {
optional string text = 1;
optional int32 dx = 2;
optional int32 dy = 3;
optional int32 dz = 4;
optional int32 rotx = 5;
optional int32 roty = 6;
optional int32 rotz = 7;
}
message ServerEntityDrawBlock {
optional int32 blockType = 1;
}
message ServerEntityPush {
optional int32 rangeFloat = 1;
}
message IntInt {
optional int32 key_ = 1;
optional int32 value_ = 2;
}
message ServerAmmo {
repeated IntInt totalAmmo = 1;
}
message ServerChunkPart {
optional bytes compressedChunkPart = 1;
}
message ServerChunk {
optional int32 x = 1;
optional int32 y = 2;
optional int32 z = 3;
optional int32 sizeX = 4;
optional int32 sizeY = 5;
optional int32 sizeZ = 6;
}
//needed for drawing shadows.
//sent before any chunks or blocks in the column.
message ServerHeightmapChunk {
optional int32 x = 1;
optional int32 y = 2;
optional int32 sizeX = 3;
optional int32 sizeY = 4;
optional bytes compressedHeightmap = 5;
}
message ServerInventory {
optional Inventory inventory = 4;
}
message ServerPlayerStats {
optional int32 currentHealth = 1;
optional int32 maxHealth = 2;
optional int32 currentOxygen = 3;
optional int32 maxOxygen = 4;
}
message ServerMonsters {
repeated ServerMonster monsters = 1;
}
message ServerMonster {
optional int32 id = 1;
optional int32 monsterType = 2;
optional PositionAndOrientation positionAndOrientation = 3;
optional int32 health = 4;
}
message ServerSeason {
//optional int32 Season;
optional int32 hour = 2; //1-24*4
optional int32 dayNightCycleSpeedup = 3; // used for predicting sun speed.
optional int32 moon = 4;
}
message ServerDialog {
optional string dialogId = 1;
optional Dialog dialog = 2;
}
message ServerPing {}
message ServerPlayerPing {
optional int32 clientId = 1;
optional int32 ping = 2;
}
message ServerTranslatedString {
optional string lang = 1;
optional string id = 2;
optional string translation = 3;
}
message Inventory {
optional Item mainArmor = 3;
optional Item boots = 4;
optional Item helmet = 5;
optional Item Gauntlet = 6;
repeated PositionItem items = 7;
optional Item dragDropItem = 8;
repeated Item rightHand = 9;
}
message Item {
optional ItemClass itemClass = 1 [default = Block];
optional string itemId = 2;
optional int32 blockId = 3;
optional int32 blockCount = 4;
}
enum ItemClass {
Block = 0;
Weapon = 1;
MainArmor = 2;
Boots = 3;
Helmet = 4;
Gauntlet = 5;
Shield = 6;
Other = 7;
}
message PositionItem {
optional string Key_ = 1;
optional Item Value_ = 2;
optional int32 x = 3;
optional int32 y = 4;
optional int32 Sort = 5;
}
message Dialog {
repeated Widget widgets = 1;
optional int32 width = 2;
optional int32 height = 3;
optional int32 isModal = 4;
}
message Widget {
optional string id = 1;
optional int32 click = 2;
optional int32 x = 3;
optional int32 y = 4;
optional int32 width = 5;
optional int32 height = 6;
optional string text = 7;
optional int32 clickKey = 8;
optional string image = 9;
optional int32 color = 10; // should mostly be white
optional DialogFont font = 11;
optional WidgetType type = 12 [default = ImageWdgt];
}
enum WidgetType {
ImageWdgt = 0;
TextWdgt = 1;
TextBoxWdgt = 2;
ButtonWdgt = 3;
}
message DialogFont {
optional string familyName = 1;
optional int32 sizeFloat = 2;
optional DialogFontStyle fontStyle = 3 [default = Regular];
optional DialogFontAlign alignment = 4 [default = Left];
optional DialogFontBaseline baseline = 5 [default = Top];
}
enum DialogFontStyle {
Regular = 0;
Bold = 1;
Italic = 2;
Underline = 4;
Strikeout = 8;
}
enum DialogFontAlign {
Left = 0;
Center = 1;
Right = 2;
}
enum DialogFontBaseline {
Top = 0;
Middle = 1;
Bottom = 2;
}