You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

175 lines
7.1 KiB

  1. ----------------------------- 信息服 ---------------------------
  2. cc.exports.OpcodeGetUserInfoReq = 2001 --查询自己的信息
  3. cc.exports.OpcodeGetUserInfoAck = 2002
  4. cc.exports.OpcodeGetBaseInfoReq = 2003 --查询自己的信息
  5. cc.exports.OpcodeGetBaseInfoAck = 2004
  6. cc.exports.OpcodeUpdateUserInfoReq = 2005 --更新用户完整信息
  7. cc.exports.OpcodeUpdateUserInfoAck = 2006
  8. cc.exports.OpcodeUpdateNicknameReq = 2017 --更新昵称
  9. cc.exports.OpcodeUpdateNicknameAck = 2018
  10. cc.exports.OpcodeUpdateAvatarReq = 2019 --更新头像
  11. cc.exports.OpcodeUpdateAvatarAck = 2020
  12. cc.exports.OpcodeGetMultiUserInfoReq = 2021 --查询所有玩家
  13. cc.exports.OpcodeGetMultiUserInfoAck = 2022
  14. cc.exports.OpcodeVerifyRealNameReq = 2013 --实名认证
  15. cc.exports.OpcodeVerifyRealNameAck = 2014
  16. cc.exports.OpcodeSetUserLocationReq = 2031
  17. cc.exports.OpcodeSetUserLocationAck = 2032
  18. cc.exports.OpcodeClearUserLocationReq = 2033
  19. cc.exports.OpcodeClearUserLocationAck = 2034
  20. cc.exports.OpcodeNearBySearchReq = 2035
  21. cc.exports.OpcodeNearBySearchAck = 2036
  22. G_EapProtos["UserInfo"] = {
  23. nPID = {1, "uint32"}, -- 用户ID
  24. strNickname = {2, "string"}, -- 昵称
  25. nGender = {3, "uint32"}, -- 性别
  26. nFaceID = {4, "sint32"}, -- 头像id
  27. strAvatar = {5, "string"}, -- avatar字符串
  28. nBirthday = {6, "uint32"}, -- 出生日期
  29. strEmail = {7, "string"}, -- email
  30. strCountry = {8, "string"}, -- 国家
  31. strProvince = {9, "string"}, -- 省
  32. strCity = {10, "string"}, -- 市
  33. nPostCode = {11, "uint32"}, -- 邮编
  34. strIDName = {12, "string"}, -- 真实姓名
  35. strIDCard = {13, "string"}, -- 身份证号
  36. strIDPhone = {14, "string"}, -- 手机号
  37. }
  38. G_EapProtos[OpcodeGetUserInfoReq] = {
  39. nPID = {1, "uint32"}, -- 用户ID
  40. strTicket = {2, "string"}, -- 通行证(如果为空,则使用应用秘钥进行验证)
  41. nAppID = {3, "uint32"}, -- 应用ID(系统分配)
  42. strAppSecret = {4, "string"}, -- 应用秘钥(系统分配)
  43. }
  44. G_EapProtos[OpcodeGetUserInfoAck] = {
  45. nRet = {1, "sint32"}, -- 0成功, -1失败, -2通行证错误, -3通行证失效, -20001无用户信息
  46. user = {2, "UserInfo"}, -- 完整信息
  47. }
  48. -- 查询用户基本信息(仅昵称、性别、头像、人物秀、身份证号)
  49. G_EapProtos[OpcodeGetBaseInfoReq] = {
  50. nPID = {1, "uint32"}, -- 用户ID
  51. strTicket = {2, "string"}, -- 通行证
  52. nAppID = {3, "uint32"}, -- 应用ID(系统分配)
  53. strAppSecret = {4, "string"}, -- 应用秘钥(系统分配)
  54. }
  55. G_EapProtos[OpcodeGetBaseInfoAck] = {
  56. nRet = {1, "sint32"}, -- 0成功, -1失败, -2通行证错误, -3通行证失效, -20001无用户信息
  57. user = {2, "UserInfo"}, -- 基本信息
  58. }
  59. -- 批量查询玩家基础信息
  60. G_EapProtos[OpcodeGetMultiUserInfoReq] = {
  61. nPID = {1, "uint32"}, -- 用户ID
  62. strTicket = {2, "string"}, -- 通行证
  63. vecPID = {3, "uint32", "repeated"}, -- 要查询的用户ID列表,最大查询个数100
  64. nAppID = {4, "uint32"}, -- 应用ID(系统分配)
  65. strAppSecret = {5, "string"}, -- 应用秘钥(系统分配)
  66. }
  67. G_EapProtos[OpcodeGetMultiUserInfoAck] = {
  68. nPID = {1, "uint32"}, -- 用户ID
  69. nRet = {2, "sint32"}, -- 0成功, -1失败, -2通行证错误, -3通行证失效
  70. vecUsers = {3, "UserInfo", "repeated"}, -- 简要信息集
  71. }
  72. G_EapProtos[OpcodeUpdateUserInfoReq] = {
  73. strTicket = {1, "string"}, -- 通行证(如果为空,则使用应用秘钥进行验证)
  74. newInfo = {2, "UserInfo"}, -- 完整信息
  75. nAppID = {3, "uint32"}, -- 应用ID(系统分配)
  76. strAppSecret = {4, "string"}, -- 应用秘钥(系统分配)
  77. }
  78. G_EapProtos[OpcodeUpdateUserInfoAck] = {
  79. nRet = {1, "sint32"}, -- 1成功(修改), 0成功(新增), -1失败, -2通行证错误, -3通行证失效, -20002昵称重复
  80. nPID = {2, "uint32"}, -- 用户ID
  81. }
  82. -- 更新昵称
  83. G_EapProtos[OpcodeUpdateNicknameReq] = {
  84. nPID = {1, "uint32"}, -- 用户ID
  85. strTicket = {2, "string"}, -- 通行证
  86. strNickname = {3, "string"}, -- 新的昵称
  87. }
  88. G_EapProtos[OpcodeUpdateNicknameAck] = {
  89. nPID = {1, "uint32"}, -- 用户ID
  90. nRet = {2, "sint32"}, -- 1成功(修改), 0成功(新增), -1失败, -2通行证错误, -3通行证失效, -20002昵称重复
  91. }
  92. --更新头像
  93. G_EapProtos[OpcodeUpdateAvatarReq] = {
  94. nPID = {1, "uint32"}, -- 用户ID
  95. strTicket = {2, "string"}, -- 通行证
  96. strAvatar = {3, "string"}, -- 新的形象
  97. }
  98. G_EapProtos[OpcodeUpdateAvatarAck] = {
  99. nPID = {1, "uint32"}, -- 用户ID
  100. nRet = {2, "sint32"}, -- 1成功(修改), 0成功(新增), -1失败, -2通行证错误, -3通行证失效
  101. }
  102. G_EapProtos[OpcodeVerifyRealNameReq] = {
  103. nPID = {1, "uint32"}, -- 用户ID
  104. strTicket = {2, "string"}, -- 通行证
  105. strName = {3, "string"}, -- 真实姓名
  106. strIDCard = {4, "string"}, -- 身份证号
  107. strPhone = {5, "string"}, -- 验证手机号(3要素验证时用)
  108. bSkip = {6, "bool"}, -- 是否跳过第三方验证, true:跳过验证,仅对身份证号做规则验证
  109. }
  110. G_EapProtos[OpcodeVerifyRealNameAck] = {
  111. nPID = {1, "uint32"}, -- 用户ID
  112. nRet = {2, "sint32"}, -- 0成功, -1失败, -2通行证错误, -3通行证失效, -20003实名认证失败
  113. }
  114. -- 设置用户的位置信息
  115. G_EapProtos[OpcodeSetUserLocationReq] = {
  116. nPID = {1, "uint32"}, -- 用户ID
  117. strTicket = {2, "string"}, -- 通行证
  118. fLat = {3, "double"}, -- 纬度
  119. fLng = {4, "double"}, -- 经度
  120. }
  121. G_EapProtos[OpcodeSetUserLocationAck] = {
  122. nRet = {1, "sint32"}, -- 0成功, -1失败, -2通行证错误, -3通行证失效
  123. nPID = {2, "uint32"}, -- 用户ID
  124. }
  125. -- 清除用户的位置信息
  126. G_EapProtos[OpcodeClearUserLocationReq] = {
  127. nPID = {1, "uint32"}, -- 用户ID
  128. strTicket = {2, "string"}, -- 通行证
  129. }
  130. G_EapProtos[OpcodeClearUserLocationAck] = {
  131. nRet = {1, "sint32"}, -- 0成功, -1失败, -2通行证错误, -3通行证失效
  132. nPID = {2, "uint32"}, -- 用户ID
  133. }
  134. -- 查找周边的人
  135. G_EapProtos[OpcodeNearBySearchReq] = {
  136. nPID = {1, "uint32"}, -- 用户ID
  137. strTicket = {2, "string"}, -- 通行证
  138. fLat = {3, "double"}, -- 纬度
  139. fLng = {4, "double"}, -- 经度
  140. nMaxDistance = {5, "uint32"}, -- 最大查找范围(单位:米)
  141. nMaxUser = {6, "uint32"}, -- 最大查找用户数
  142. }
  143. G_EapProtos["UserDistance"] = {
  144. nPID = {1, "uint32"}, -- 用户ID
  145. nDistance = {2, "uint32"}, -- 距离
  146. }
  147. G_EapProtos[OpcodeNearBySearchAck] = {
  148. nRet = {1, "sint32"}, -- 0成功, -1失败, -2通行证错误, -3通行证失效
  149. nPID = {2, "uint32"}, -- 用户ID
  150. Users = {3, "UserDistance", "repeated"}, -- 周边的用户信息
  151. }