HotfixMessage.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using Model;
  2. using ProtoBuf;
  3. namespace Hotfix
  4. {
  5. [Message(HotfixOpcode.C2R_Login)]
  6. [ProtoContract]
  7. public class C2R_Login : MessageObject, IRequest
  8. {
  9. [ProtoMember(1, IsRequired = true)]
  10. public string Account;
  11. [ProtoMember(2, IsRequired = true)]
  12. public string Password;
  13. }
  14. [Message(HotfixOpcode.R2C_Login)]
  15. [ProtoContract]
  16. public class R2C_Login : MessageObject, IResponse
  17. {
  18. [ProtoMember(1, IsRequired = true)]
  19. public string Address;
  20. [ProtoMember(2, IsRequired = true)]
  21. public long Key;
  22. [ProtoMember(90, IsRequired = true)]
  23. public int Error { get; set; }
  24. [ProtoMember(91, IsRequired = true)]
  25. public string Message { get; set; }
  26. }
  27. [Message(HotfixOpcode.C2G_LoginGate)]
  28. [ProtoContract]
  29. public class C2G_LoginGate : MessageObject, IRequest
  30. {
  31. [ProtoMember(1, IsRequired = true)]
  32. public long Key;
  33. }
  34. [Message(HotfixOpcode.G2C_LoginGate)]
  35. [ProtoContract]
  36. public class G2C_LoginGate : MessageObject, IResponse
  37. {
  38. [ProtoMember(1, IsRequired = true)]
  39. public long PlayerId;
  40. [ProtoMember(90, IsRequired = true)]
  41. public int Error { get; set; }
  42. [ProtoMember(91, IsRequired = true)]
  43. public string Message { get; set; }
  44. }
  45. [Message(HotfixOpcode.G2C_TestHotfixMessage)]
  46. [ProtoContract]
  47. public class G2C_TestHotfixMessage : MessageObject, IMessage
  48. {
  49. [ProtoMember(1, IsRequired = true)]
  50. public string Info;
  51. }
  52. }