Messages.cs 5.9 KB

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