main.proto 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. syntax="proto3";
  2. package protos;
  3. import "structs.proto";
  4. /// 逻辑服务器之外(大厅,对应进程 tajmahal )的到客户端的协议
  5. /// 无法识别
  6. message S_NotFound {
  7. }
  8. /// 心跳
  9. message C_Heartbeat {
  10. int64 ts = 1;
  11. }
  12. message S_Heartbeat {
  13. int64 ts = 1;
  14. }
  15. /// 登录逻辑服务器
  16. message C_Login {
  17. string token = 1;
  18. }
  19. message S_Login {
  20. string nickname = 1;
  21. int32 headerIcon = 2;
  22. string remoteIP = 3;
  23. int32 level = 4;
  24. int32 email = 5;
  25. int64 birthday = 6;
  26. int64 score = 8;
  27. string curName = 9; // 当前使用称号
  28. repeated Item items = 10; // 道具(背包)
  29. map<string, int64> assets = 12; // 币,数量
  30. map<int32, string> icons = 13; // 道具图标,一类一个
  31. map<string, string> wallets = 14; // 钱包地址
  32. string verServer = 16;
  33. string verClient = 18;
  34. }
  35. /// 登出逻辑服务器
  36. message C_Logout {
  37. }
  38. message S_Logout {
  39. }
  40. /// 进入游戏场景
  41. message C_EnterGame {
  42. int64 gameId = 1;
  43. }
  44. message S_EnterGame {
  45. int64 gameId = 1;
  46. }
  47. /// 离开游戏
  48. message C_LeaveGame {
  49. int32 gameId = 1;
  50. }
  51. message S_LeaveGame {
  52. int64 gameId = 1;
  53. }
  54. /// 用户信息设置
  55. message C_UserInfo {
  56. string nickname = 1;
  57. int64 birthday = 2;
  58. }
  59. message S_UserInfo {
  60. string nickname = 1;
  61. int64 birthday = 2;
  62. }
  63. /// 客户端设置
  64. message C_Settings {
  65. int32 bgVolume = 1;
  66. int32 fgVolume = 2;
  67. string lang = 3;
  68. }
  69. message S_Settings {
  70. int32 bgVolume = 1;
  71. int32 fgVolume = 2;
  72. string lang = 3;
  73. }
  74. /// 游戏内重设密码
  75. message C_UpdatePassword {
  76. string oldPassword = 1;
  77. string newPassword = 2;
  78. }
  79. message S_UpdatePassword {
  80. string password = 1;
  81. }
  82. /// 刷新资产数
  83. message C_UpdateAssets {
  84. }
  85. message S_UpdateAssets {
  86. map<string, int64> assets = 1;
  87. }