battle_report.proto 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. // message结构的属性名请使用 驼峰小写字母开始
  2. syntax = "proto3";
  3. option go_package = "/pb";
  4. package pb;
  5. import "base_type.proto";
  6. // 战报信息
  7. message ReportInfo {
  8. // 个人收藏战报列表
  9. repeated ReportLike list = 1;
  10. // 未读战报数量
  11. int32 count = 2;
  12. }
  13. // 战报组列表
  14. message ReportGroupList {
  15. repeated ReportGroup list = 1;
  16. }
  17. // 收藏战报信息
  18. message ReportLike {
  19. // 收藏类型 1:战报组 2:单个战报
  20. int32 likeType = 1;
  21. // 收藏ID
  22. string likeID = 2;
  23. // 战报列表, likeType=2时,只会有一个战报
  24. repeated Report list = 3;
  25. }
  26. // 战报组
  27. message ReportGroup {
  28. // 战报组ID
  29. string groupID = 1;
  30. // 分类ID 1:开拓 2:交战
  31. int32 category = 2;
  32. // 战报列表
  33. repeated Report list = 3;
  34. // 是否已读
  35. bool isRead = 4;
  36. }
  37. // 战报信息
  38. message Report {
  39. // 战报ID
  40. string reportID = 1;
  41. // 战斗类型 1:遭遇战 2:守军战 3: 攻城-驻城部队战 4:攻城-耐久战
  42. int32 battleType = 2;
  43. // 坐标点
  44. Point point = 3;
  45. // 地块配置ID 显示地块对象名称
  46. int32 configID = 4;
  47. // 时间
  48. int64 time = 5;
  49. // 是否是防守方
  50. bool isDefender = 6;
  51. // 进攻方
  52. BattleReportTeam attacker = 7;
  53. // 防守方
  54. BattleReportTeam defender = 8;
  55. // 战斗结果 0:胜利 1:失败 -1:平局
  56. int32 result = 9;
  57. // 战果
  58. ReportResult reportResult = 10;
  59. // 战斗录像ID
  60. string battleRecordID = 11;
  61. }
  62. // 战果
  63. message ReportResult {
  64. // 资源列表
  65. AssetList rewards = 1;
  66. // 耐久扣除数量
  67. int32 durability = 2;
  68. }
  69. // 战报队伍
  70. message BattleReportTeam {
  71. // 玩家ID
  72. int64 playerID = 1;
  73. // 玩家昵称
  74. string playerName = 2;
  75. // 联盟ID
  76. int64 leagueID = 3;
  77. // 联盟名称
  78. string leagueName = 4;
  79. // 战斗对象列表
  80. repeated BattleReportObject list = 5;
  81. }
  82. // 战报的基础战斗对象
  83. message BattleReportObject {
  84. // 对象唯一ID
  85. int64 id = 1;
  86. // 对象配置表ID
  87. int32 objConfigID = 2;
  88. // 对象类型 1:英雄 2:怪物
  89. int32 battleObjType = 3;
  90. // 等级
  91. int32 level = 4;
  92. // 星级
  93. int32 star = 5;
  94. // 阵容ID
  95. int32 lineupID = 6;
  96. // 是否阵亡
  97. bool isDead = 7;
  98. // 兵种ID 士兵-兵种表兵种ID
  99. int32 troopsID = 8;
  100. // 总兵力
  101. int32 totalSoldier = 9;
  102. // 剩余兵力
  103. int32 remainSoldier = 10;
  104. // 最大生命值
  105. int64 maxHealth = 11;
  106. // 剩余生命值万分比
  107. int32 health = 12;
  108. }
  109. // 收藏战报请求
  110. message ReportLikeRequest {
  111. // 收藏类型 1:战报组 2:单个战报
  112. int32 likeType = 1;
  113. // 收藏ID likeType=1时,值为战报组ID; likeType=2时,值为战报ID
  114. string likeID = 2;
  115. // 是否收藏 true:收藏 false:取消收藏
  116. bool isLike = 3;
  117. }