tajmahal.proto 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. syntax="proto3";
  2. package protos;
  3. option go_package = ".;protos";
  4. /// 逻辑服务器之外(大厅,对应进程 tajmahal )的到客户端的协议
  5. /// 无法识别
  6. message S_NotFound {
  7. }
  8. message S_Offline {
  9. int32 reason = 1;
  10. }
  11. /// 心跳
  12. message C_Heartbeat {
  13. int64 ts = 1;
  14. }
  15. message S_Heartbeat {
  16. int64 ts = 1;
  17. }
  18. /// 登录逻辑服务器
  19. message C_Login {
  20. uint64 userId = 1;
  21. string username = 2;
  22. string token = 3;
  23. }
  24. message S_Login {
  25. uint64 userId = 1;
  26. string nickname = 2;
  27. int32 headerIcon = 3;
  28. string remoteIP = 5;
  29. int32 level = 6;
  30. string username = 7; // 手机号或邮箱
  31. int64 birthday = 10;
  32. int32 gender = 11;
  33. int64 score = 12;
  34. int64 balance = 13;
  35. string curTitle = 14; // 当前使用称号
  36. map<string, int64> balances = 18; // 币,数量
  37. map<string, string> wallets = 19; // 钱包地址
  38. string verServer = 31; // 服务端当前版本号
  39. string verClient = 33; // 客户端最新版本号
  40. int32 lang = 35; // 语言
  41. int32 volBg = 41; // 背景音量
  42. int32 volFg = 42; // 前景音量
  43. }
  44. // 背包
  45. message C_UserPack {
  46. }
  47. message S_UserPack {
  48. }
  49. // 用户称号
  50. message C_UserTitles {
  51. }
  52. message S_UserTitles {
  53. }
  54. // 身上装饰(武器)
  55. message C_UserAccessories {
  56. }
  57. message S_UserAccessories {
  58. }
  59. /// 登出逻辑服务器
  60. message C_Logout {
  61. }
  62. message S_Logout {
  63. }
  64. /// 进入游戏场景
  65. message C_EnterGame {
  66. uint64 gameId = 1;
  67. }
  68. message S_EnterGame {
  69. uint64 gameId = 1;
  70. uint64 roomId = 4; // 副本类游戏表示副本ID
  71. }
  72. /// 离开游戏
  73. message C_LeaveGame {
  74. uint32 gameId = 1;
  75. uint64 roomId = 4;
  76. }
  77. message S_LeaveGame {
  78. uint64 gameId = 1;
  79. uint64 roomId = 4;
  80. }
  81. /// 用户信息设置
  82. message C_UserInfo {
  83. string nickname = 1;
  84. int64 birthday = 2;
  85. int32 headerIcon = 3;
  86. int32 gender = 4;
  87. map<string, string> walletsAddrs = 8; // 钱包地址
  88. }
  89. message S_UserInfo {
  90. string nickname = 1;
  91. int64 birthday = 2;
  92. int32 headerIcon = 3;
  93. int32 gender = 4;
  94. map<string, string> walletsAddrs = 8;
  95. }
  96. /// 客户端设置
  97. message C_Settings {
  98. int32 bgVolume = 1;
  99. int32 fgVolume = 2;
  100. int32 lang = 3;
  101. }
  102. message S_Settings {
  103. int32 bgVolume = 1;
  104. int32 fgVolume = 2;
  105. int32 lang = 3;
  106. }
  107. /// 游戏内重设密码
  108. message C_UpdatePassword {
  109. string oldPassword = 1;
  110. string newPassword = 2;
  111. }
  112. message S_UpdatePassword {
  113. string password = 1;
  114. }
  115. /// 刷新资产数
  116. message C_UpdateAssets {
  117. }
  118. message S_UpdateAssets {
  119. map<string, int64> assets = 1;
  120. }