HotfixMessage.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. }