party.proto 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. syntax = "proto3";
  2. package protos;
  3. import "userinfo.proto";
  4. import "result.proto";
  5. message PartyJoinRequest {
  6. uint64 PartyID = 1;
  7. int32 PartyType = 2; // 1 = 糖豆人; 2 = ** ; 3 = **
  8. int32 Identidy = 3; // 身份 0 = 游戏者; 1 = 观察者
  9. }
  10. message PartyJoinResponse {
  11. Result Result = 1;
  12. uint32 PartyID = 2;
  13. int32 Identidy = 3; // 身份 0 = 游戏者; 1 = 观察者
  14. uint32 sit = 4; // 座位号
  15. }
  16. message PartyJoinPush {
  17. UserInfo UserInfo = 1;
  18. }
  19. message PartyLeaveRequest {
  20. }
  21. message PartyLeaveResponse {
  22. Result Result = 1;
  23. }
  24. message PartyLeavePush {
  25. uint32 UserID = 1;
  26. }
  27. message PartyReadyRequest {
  28. }
  29. message PartyReadyResponse {
  30. Result Result = 1;
  31. }
  32. message PartyReadyPush {
  33. uint32 UserID = 1;
  34. }
  35. message PartyFullPush {
  36. }
  37. message PartyResetPush {
  38. repeated UserInfo Users = 1;
  39. uint64 Step = 2;
  40. map<string, bytes> state = 3;
  41. string Road = 4;
  42. }
  43. message PartyFinishPush {
  44. }
  45. message PartyStageCrossRequest {
  46. uint32 StageIndex = 1; // 第几个小关
  47. }
  48. message PartyStageCrossResponse {
  49. Result Result = 1;
  50. uint32 CrossIndex = 2; // 第几个通关的
  51. }
  52. message PartyStageCrossPush {
  53. uint32 UserID = 1;
  54. uint32 StageIndex = 2; // 第几个小关
  55. uint32 CrossIndex = 3; // 第几个通关的
  56. }
  57. message PartyStageStartPush {
  58. uint32 StageIndex = 1; // 第几个小关
  59. repeated uint32 Users = 2; // 参加用户
  60. uint32 t = 3; // 时间限制
  61. }
  62. message PartyStageFinishPush {
  63. uint32 StageIndex = 1; // 第几个小关
  64. repeated uint32 Users = 2; // 过关用户
  65. }
  66. message PartyInfo {
  67. uint64 PartyID = 1;
  68. int32 PartyType = 2; // 1 = 糖豆人; 2 = ** ; 3 = **
  69. int32 GameUserCount = 3; // 游戏人数
  70. int32 ObUserCount = 4; // 观战人数
  71. int32 Status = 5; // 房间状态 0 = 已创建;1=已满员; 2=已开始; 3 = 已结束; 4 = 已解散
  72. }
  73. message PartyListRequest {
  74. int32 PartyType = 1; // 0 = 不限; 1 = 糖豆人; 2 = ** ; 3 = **
  75. }
  76. message PartyListResponse {
  77. Result Result = 1;
  78. repeated PartyInfo Parties = 2;
  79. }