Messages.cs 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. using System.Collections.Generic;
  2. using System.Runtime.Serialization;
  3. namespace Robot.Protos
  4. {
  5. public static class MessageOpcode
  6. {
  7. public const ushort CMSG_AUTH_LOGON_PERMIT = 800;
  8. public const ushort CMSG_OTP_PASSWORD = 801;
  9. public const ushort CMSG_PPC_PASSWORD = 802;
  10. public const ushort CMSG_AUTH_LOGON_CHALLENGE = 803;
  11. public const ushort CMSG_AUTH_LOGON_PROOF = 805;
  12. public const ushort SMSG_AUTH_LOGON_CHALLENGE_RESPONSE = 900;
  13. public const ushort SMSG_REALM_LOGON_RESPONSE = 901;
  14. public const ushort SMSG_REALM_LIST = 902;
  15. public const ushort SMSG_LOCK_FOR_SAFE_TIME = 903;
  16. public const ushort SMSG_PASSWORD_PROTECT_TYPE = 904;
  17. }
  18. public static class ErrorCode
  19. {
  20. public const int REALM_AUTH_SUCCESS = 0;
  21. // Unable to connect
  22. public const int REALM_AUTH_FAILURE = 1;
  23. // Unable to connect
  24. public const int REALM_AUTH_UNKNOWN1 = 2;
  25. // This game> account has been closed and is no longer available for use.
  26. // Please go to site>/banned.html for further information.
  27. public const int REALM_AUTH_ACCOUNT_BANNED = 3;
  28. // The information you have entered is not valid.
  29. // Please check the spelling of the account name and password.
  30. // If you need help in retrieving a lost or stolen password,
  31. // see site> for more information
  32. public const int REALM_AUTH_NO_MATCH = 4;
  33. // The information you have entered is not valid.
  34. // Please check the spelling of the account name and password.
  35. // If you need help in retrieving a lost or stolen password,
  36. // see site> for more information
  37. public const int REALM_AUTH_UNKNOWN2 = 5;
  38. // This account is already logged into game.
  39. // Please check the spelling and try again.
  40. public const int REALM_AUTH_ACCOUNT_IN_USE = 6;
  41. // You have used up your prepaid time for this account.
  42. // Please purchase more to continue playing
  43. public const int REALM_AUTH_PREPAID_TIME_LIMIT = 7;
  44. // Could not log in to game> at this time. Please try again later.
  45. public const int REALM_AUTH_SERVER_FULL = 8;
  46. // Unable to validate game version.
  47. // This may be caused by file corruption or interference of another program.
  48. // Please visit site for more information and possible solutions to this
  49. // issue.
  50. public const int REALM_AUTH_WRONG_BUILD_NUMBER = 9;
  51. // Downloading
  52. public const int REALM_AUTH_UPDATE_CLIENT = 10;
  53. // Unable to connect
  54. public const int REALM_AUTH_UNKNOWN3 = 11;
  55. // This game account has been temporarily suspended.
  56. // Please go to site further information.
  57. public const int REALM_AUTH_ACCOUNT_FREEZED = 12;
  58. // Unable to connect
  59. public const int REALM_AUTH_UNKNOWN4 = 13;
  60. // Connected.
  61. public const int REALM_AUTH_UNKNOWN5 = 14;
  62. // Access to this account has been blocked by parental controls.
  63. // Your settings may be changed in your account preferences at site.
  64. public const int REALM_AUTH_PARENTAL_CONTROL = 15;
  65. }
  66. [DataContract]
  67. public class CMSG_Auth_Logon_Permit
  68. {
  69. [DataMember(Order = 1, IsRequired = true)]
  70. public byte[] Account { get; set; }
  71. [DataMember(Order = 2, IsRequired = true)]
  72. public byte[] PasswordMd5 { get; set; }
  73. }
  74. [DataContract]
  75. public class SMSG_Password_Protect_Type
  76. {
  77. [DataMember(Order = 1, IsRequired = true)]
  78. public uint Code { get; set; }
  79. [DataMember(Order = 2, IsRequired = true)]
  80. public uint SubCode { get; set; }
  81. [DataMember(Order = 3, IsRequired = true)]
  82. public uint PasswordProtectType { get; set; }
  83. [DataMember(Order = 4, IsRequired = true)]
  84. public byte[] PpcCoordinate { get; set; }
  85. }
  86. [DataContract]
  87. public class SMSG_Auth_Challenge
  88. {
  89. [DataMember(Order = 1, IsRequired = true)]
  90. public uint Num { get; set; }
  91. [DataMember(Order = 2, IsRequired = true)]
  92. public uint Seed { get; set; }
  93. [DataMember(Order = 3)]
  94. public List<uint> Random { get; set; }
  95. }
  96. [DataContract]
  97. public class CMSG_Auth_Logon_Challenge
  98. {
  99. }
  100. [DataContract]
  101. public class SMSG_Auth_Logon_Challenge_Response
  102. {
  103. [DataMember(Order = 1, IsRequired = true)]
  104. public int ErrorCode { get; set; }
  105. [DataMember(Order = 2, IsRequired = true)]
  106. public byte[] B { get; set; }
  107. [DataMember(Order = 3, IsRequired = true)]
  108. public byte[] G { get; set; }
  109. [DataMember(Order = 4, IsRequired = true)]
  110. public byte[] N { get; set; }
  111. [DataMember(Order = 5, IsRequired = true)]
  112. public byte[] S { get; set; }
  113. }
  114. [DataContract]
  115. public class CMSG_Auth_Logon_Proof
  116. {
  117. [DataMember(Order = 1, IsRequired = true)]
  118. public byte[] A { get; set; }
  119. [DataMember(Order = 2, IsRequired = true)]
  120. public byte[] M { get; set; }
  121. }
  122. }