HotfixMessage.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. using ProtoBuf;
  2. using ETModel;
  3. using System.Collections.Generic;
  4. using MongoDB.Bson.Serialization.Attributes;
  5. namespace ETModel
  6. {
  7. [Message(HotfixOpcode.C2R_Login)]
  8. [ProtoContract]
  9. public partial class C2R_Login: IRequest
  10. {
  11. [ProtoMember(90, IsRequired = true)]
  12. public int RpcId { get; set; }
  13. [ProtoMember(1, IsRequired = true)]
  14. public string Account;
  15. [ProtoMember(2, IsRequired = true)]
  16. public string Password;
  17. }
  18. [Message(HotfixOpcode.R2C_Login)]
  19. [ProtoContract]
  20. public partial class R2C_Login: IResponse
  21. {
  22. [ProtoMember(90, IsRequired = true)]
  23. public int Error { get; set; }
  24. [ProtoMember(91, IsRequired = true)]
  25. public string Message { get; set; }
  26. [ProtoMember(92, IsRequired = true)]
  27. public int RpcId { get; set; }
  28. [ProtoMember(1, IsRequired = true)]
  29. public string Address;
  30. [ProtoMember(2, IsRequired = true)]
  31. public long Key;
  32. }
  33. [Message(HotfixOpcode.C2G_LoginGate)]
  34. [ProtoContract]
  35. public partial class C2G_LoginGate: IRequest
  36. {
  37. [ProtoMember(90, IsRequired = true)]
  38. public int RpcId { get; set; }
  39. [ProtoMember(1, IsRequired = true)]
  40. public long Key;
  41. }
  42. [Message(HotfixOpcode.G2C_LoginGate)]
  43. [ProtoContract]
  44. public partial class G2C_LoginGate: IResponse
  45. {
  46. [ProtoMember(90, IsRequired = true)]
  47. public int Error { get; set; }
  48. [ProtoMember(91, IsRequired = true)]
  49. public string Message { get; set; }
  50. [ProtoMember(92, IsRequired = true)]
  51. public int RpcId { get; set; }
  52. [ProtoMember(1, IsRequired = true)]
  53. public long PlayerId;
  54. }
  55. [Message(HotfixOpcode.G2C_TestHotfixMessage)]
  56. [ProtoContract]
  57. public partial class G2C_TestHotfixMessage: IMessage
  58. {
  59. [ProtoMember(1, IsRequired = true)]
  60. public string Info;
  61. }
  62. [Message(HotfixOpcode.C2M_TestActorRequest)]
  63. [ProtoContract]
  64. public partial class C2M_TestActorRequest: MessageObject, IActorRequest
  65. {
  66. [ProtoMember(90, IsRequired = true)]
  67. public int RpcId { get; set; }
  68. [ProtoMember(1, IsRequired = true)]
  69. public string Info;
  70. }
  71. [Message(HotfixOpcode.M2C_TestActorResponse)]
  72. [ProtoContract]
  73. public partial class M2C_TestActorResponse: MessageObject, IActorResponse
  74. {
  75. [ProtoMember(90, IsRequired = true)]
  76. public int Error { get; set; }
  77. [ProtoMember(91, IsRequired = true)]
  78. public string Message { get; set; }
  79. [ProtoMember(92, IsRequired = true)]
  80. public int RpcId { get; set; }
  81. [ProtoMember(1, IsRequired = true)]
  82. public string Info;
  83. }
  84. [Message(HotfixOpcode.PlayerInfo)]
  85. [ProtoContract]
  86. public partial class PlayerInfo: IMessage
  87. {
  88. }
  89. [Message(HotfixOpcode.C2G_PlayerInfo)]
  90. [ProtoContract]
  91. public partial class C2G_PlayerInfo: IRequest
  92. {
  93. [ProtoMember(90, IsRequired = true)]
  94. public int RpcId { get; set; }
  95. }
  96. [Message(HotfixOpcode.G2C_PlayerInfo)]
  97. [ProtoContract]
  98. public partial class G2C_PlayerInfo: IResponse
  99. {
  100. [ProtoMember(90, IsRequired = true)]
  101. public int Error { get; set; }
  102. [ProtoMember(91, IsRequired = true)]
  103. public string Message { get; set; }
  104. [ProtoMember(92, IsRequired = true)]
  105. public int RpcId { get; set; }
  106. [ProtoMember(1)]
  107. public List<PlayerInfo> PlayerInfos = new List<PlayerInfo>();
  108. }
  109. }
  110. namespace ETModel
  111. {
  112. [BsonKnownTypes(typeof(C2M_TestActorRequest))]
  113. [BsonKnownTypes(typeof(M2C_TestActorResponse))]
  114. public partial class MessageObject {}
  115. }