You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Message2Server.proto 1.6 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // Message2Server
  2. syntax = "proto3";
  3. package protobuf;
  4. import "MessageType.proto";
  5. message PlayerMsg
  6. {
  7. int64 player_id = 1;
  8. oneof job_type
  9. {
  10. StudentType student_type = 2;
  11. TrickerType tricker_type = 3;
  12. }
  13. PlayerType player_type = 4;
  14. }
  15. message MoveMsg
  16. {
  17. int64 player_id = 1;
  18. double angle = 2;
  19. int64 time_in_milliseconds = 3;
  20. }
  21. message PropMsg
  22. {
  23. int64 player_id = 1;
  24. PropType prop_type = 2;
  25. }
  26. message SendMsg
  27. {
  28. int64 player_id = 1;
  29. int64 to_player_id = 2;
  30. oneof message
  31. {
  32. string text_message = 3;
  33. bytes binary_message = 4;
  34. }
  35. }
  36. message AttackMsg // 相当于攻击
  37. {
  38. int64 player_id = 1;
  39. double angle = 2;
  40. }
  41. message IDMsg
  42. {
  43. int64 player_id = 1;
  44. }
  45. message TreatAndRescueMsg
  46. {
  47. int64 player_id = 1;
  48. int64 to_player_id = 2;
  49. }
  50. message SkillMsg
  51. {
  52. int64 player_id = 1;
  53. int32 skill_id = 2;
  54. }
  55. // 基本继承于THUAI5,为了使发送的信息尽可能不被浪费,暂定不发这类大包。
  56. // message MessageToServer
  57. // {
  58. // MessageType messageType = 1;
  59. // int64 playerID = 2; // 消息发送者的playerID
  60. // PlayerType playerType = 3;
  61. // HumanType humanType= 4;
  62. // TrickerType trickerType = 5;
  63. // double angle = 6; // messageType为Move, Attack时的角度
  64. // PropType propType = 7; // messageType为PickProp时要捡起的道具类型,防止多个道具堆叠时出现问题
  65. // int64 timeInMilliseconds = 8;//时间参数
  66. // int64 ToPlayerID = 9; // messageType为Send时要发送的对象的ID
  67. // string message = 10; // messageType为Send时发送的消息内容
  68. // }