HotfixMessage.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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(1, IsRequired = true)]
  12. public string Account;
  13. [ProtoMember(2, IsRequired = true)]
  14. public string Password;
  15. }
  16. [Message(HotfixOpcode.R2C_Login)]
  17. [ProtoContract]
  18. public partial class R2C_Login: IResponse
  19. {
  20. [ProtoMember(90, IsRequired = true)]
  21. public int Error { get; set; }
  22. [ProtoMember(91, IsRequired = true)]
  23. public string Message { get; set; }
  24. [ProtoMember(1, IsRequired = true)]
  25. public string Address;
  26. [ProtoMember(2, IsRequired = true)]
  27. public long Key;
  28. }
  29. [Message(HotfixOpcode.C2G_LoginGate)]
  30. [ProtoContract]
  31. public partial class C2G_LoginGate: IRequest
  32. {
  33. [ProtoMember(1, IsRequired = true)]
  34. public long Key;
  35. }
  36. [Message(HotfixOpcode.G2C_LoginGate)]
  37. [ProtoContract]
  38. public partial class G2C_LoginGate: IResponse
  39. {
  40. [ProtoMember(90, IsRequired = true)]
  41. public int Error { get; set; }
  42. [ProtoMember(91, IsRequired = true)]
  43. public string Message { get; set; }
  44. [ProtoMember(1, IsRequired = true)]
  45. public long PlayerId;
  46. }
  47. [Message(HotfixOpcode.G2C_TestHotfixMessage)]
  48. [ProtoContract]
  49. public partial class G2C_TestHotfixMessage: IMessage
  50. {
  51. [ProtoMember(1, IsRequired = true)]
  52. public string Info;
  53. }
  54. [Message(HotfixOpcode.C2M_TestActorRequest)]
  55. [ProtoContract]
  56. public partial class C2M_TestActorRequest: MessageObject, IActorRequest
  57. {
  58. [ProtoMember(1, IsRequired = true)]
  59. public string Info;
  60. }
  61. [Message(HotfixOpcode.M2C_TestActorResponse)]
  62. [ProtoContract]
  63. public partial class M2C_TestActorResponse: MessageObject, IActorResponse
  64. {
  65. [ProtoMember(90, IsRequired = true)]
  66. public int Error { get; set; }
  67. [ProtoMember(91, IsRequired = true)]
  68. public string Message { get; set; }
  69. [ProtoMember(1, IsRequired = true)]
  70. public string Info;
  71. }
  72. [Message(HotfixOpcode.PlayerInfo)]
  73. [ProtoContract]
  74. public partial class PlayerInfo: IMessage
  75. {
  76. }
  77. [Message(HotfixOpcode.C2G_PlayerInfo)]
  78. [ProtoContract]
  79. public partial class C2G_PlayerInfo: IRequest
  80. {
  81. }
  82. [Message(HotfixOpcode.G2C_PlayerInfo)]
  83. [ProtoContract]
  84. public partial class G2C_PlayerInfo: IResponse
  85. {
  86. [ProtoMember(90, IsRequired = true)]
  87. public int Error { get; set; }
  88. [ProtoMember(91, IsRequired = true)]
  89. public string Message { get; set; }
  90. [ProtoMember(1)]
  91. public List<PlayerInfo> PlayerInfos = new List<PlayerInfo>();
  92. }
  93. }
  94. namespace ETModel
  95. {
  96. [BsonKnownTypes(typeof(C2M_TestActorRequest))]
  97. [BsonKnownTypes(typeof(M2C_TestActorResponse))]
  98. public partial class MessageObject {}
  99. }
  100. namespace ETModel
  101. {
  102. public partial class MessageObject {}
  103. }