status_code.go 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. package code
  2. // 基础状态码
  3. const (
  4. OK int32 = 0 // is ok
  5. Error int32 = 1 // error
  6. )
  7. // 内部错误码
  8. const (
  9. PIDError int32 = 100 // pid错误
  10. DataNotFound int32 = 101 // 数据未找到
  11. DBError int32 = 102 // db error
  12. UIDGetError int32 = 103 // 玩家id传入错误
  13. RecordNotFound int32 = 104 // 记录未找到
  14. DataMarshalError int32 = 105 // 数据序列化错误
  15. RequestParamsError int32 = 106 // 请求参数错误
  16. RouteNotFound int32 = 107 // 路由未找到
  17. RouteTypeError int32 = 108 // 路由请求类型错误
  18. RouteIsDisabled int32 = 109 // 路由已禁用
  19. )
  20. // 节点错误码
  21. const (
  22. NodeIsMaxOfOnlineUser int32 = 201 // 游戏服已经达到最大人数
  23. NodeIsClosed int32 = 202 // 游戏服已关闭,请留意开服公告
  24. NodeIsMaintain int32 = 203 // 游戏已维护中,请留意开服公告
  25. NodeChangeStateError int32 = 204 // 修改游戏服状态错误
  26. NodeRateLimiter int32 = 205 // 请求频率太快,请稍后再试
  27. NodeRequestError int32 = 206 // 节点请求错误
  28. NodeLeagueNotFound int32 = 207 // 联盟节点未找到
  29. NodeMapNotFound int32 = 208 // 地图节点未找到
  30. NodeMapIsMaintain int32 = 209 // 地图维护中
  31. NodeMapIsClosed int32 = 210 // 地图已关闭
  32. NodeMapChangeStateError int32 = 211 // 修改地图状态错误
  33. )
  34. // 业务通用错误码
  35. const (
  36. TimesLimit int32 = 302 // 次数不足
  37. LevelLimit int32 = 303 // 最大等级
  38. IllegalString int32 = 304 // 非法字符串
  39. StringLengthOutOfRange int32 = 305 // 字符串长度超出范围
  40. EmptyString int32 = 306 // 空字符串
  41. DuplicateName int32 = 307 // 重名
  42. RankNotExists int32 = 308 // 排行榜不存在
  43. RewardAlreadyClaim int32 = 309 // 奖励已领取
  44. DuplicateRequest int32 = 310 // 重复的请求
  45. PlayerDetailNotFound int32 = 311 // 玩家信息不存在
  46. OperationTooFast int32 = 314 // 操作太快
  47. IllegalArgument int32 = 315 // 非法参数
  48. )
  49. // TODO 业务专用错误码往下面排
  50. // 错误码 = (100 + 模块号) * 1000 + 错误号
  51. // 错误号 = 子模块号 * 100 + 序列号
  52. // 配置不存在专用
  53. const (
  54. ConfigNotFound_LordLevel int32 = 10101 // 配置不存在:主角等级
  55. ConfigNotFound_Hero int32 = 10201 // 配置不存在:英雄
  56. ConfigNotFound_HeroStar int32 = 10202 // 配置不存在:英雄星级
  57. ConfigNotFound_HeroTeam int32 = 10203 // 配置不存在:英雄队伍
  58. ConfigNotFound_Item int32 = 10301 // 道具不存在配置中
  59. ConfigNotFound_ItemCraft int32 = 10302 // 道具合成配置不存在
  60. ConfigNotFound_ItemPool int32 = 10303 // 道具池配置不存在
  61. ConfigNotFound_ItemChest int32 = 10304 // 配置不存在:宝箱
  62. ConfigNotFound_Medicine int32 = 10305 // 配置不存在:药品
  63. ConfigNotFound_DropPool int32 = 10306 // 配置不存在:掉落池
  64. ConfigNotFound_FacilityQueue int32 = 10401 // 配置不存在:建筑队列
  65. ConfigNotFound_FacilityLevel int32 = 10402 // 配置不存在:建筑等级
  66. ConfigNotFound_Recruit int32 = 10501 // 配置不存在:招募
  67. ConfigNotFound_MapMarch int32 = 10601 // 配置不存在:地图行军
  68. ConfigNotFound_MapBuild int32 = 10602 // 配置不存在:地图建筑
  69. ConfigNotFound_MapMarchState int32 = 10603 // 配置不存在:地图行军状态
  70. ConfigNotFound_Quest int32 = 10701 // 任务配置未找到
  71. ConfigNotFound_QuestGroup int32 = 10702 // 任务组配置未找到
  72. ConfigNotFound_Mail int32 = 10801 // 邮件配置未找到
  73. ConfigNotFound_Equip int32 = 10901 // 装备配置不存在
  74. ConfigNotFound_EquipLevel int32 = 10902 // 装备等级配置不存在
  75. ConfigNotFound_EquipQuality int32 = 10903 // 装备品质配置未找到
  76. ConfigNotFound_EquipQualityDown int32 = 10904 // 装备降品配置未找到
  77. ConfigNotFound_EquipAttrBase int32 = 10905 // 装备基础属性配置不存在
  78. ConfigNotFound_EquipAttrExtra int32 = 10906 // 装备附加属性配置不存在
  79. ConfigNotFound_SkillPool int32 = 11001 // 技能池配置不存在
  80. ConfigNotExist_SkillLevel int32 = 11002 // 技能等级配置不存在
  81. ConfigNotExist_Conscript int32 = 11101 // 士兵等级配置不存在
  82. ConfigNotExist_ConscriptType int32 = 11102 // 士兵兵种配置不存在
  83. ConfigNotExist_ConscriptUp int32 = 11103 // 升级士兵配置不存在
  84. ConfigNotFound_Chapter int32 = 11201 // 探险配置不存在
  85. ConfigNotFound_ChapterReward int32 = 11202 // 探险奖励配置不存在
  86. ConfigNotFound_ChapterLevel int32 = 11301 // 关卡配置不存在
  87. ConfigNotFound_Shop int32 = 11401 // 商店配置不存在
  88. ConfigNotFound_ShopGoods int32 = 11402 // 商品库配置不存在
  89. ConfigNotFound_LeagueStorage int32 = 11501 // 联盟仓库配置不存在
  90. )
  91. // 账号错误码
  92. const (
  93. AccountInputParamsError int32 = 100000 // 传入参数错误
  94. AccountNameLenError int32 = 100001 // 帐号名长度错误
  95. AccountPasswordLenShort int32 = 100002 // 密码长度错误
  96. AccountNameIsExist int32 = 100003 // 注册失败,帐号名已存在
  97. AccountUnmarshalError int32 = 100004 // token序列化错误
  98. AccountTokenValidateError int32 = 100005 // token验证错误
  99. AccountTokenIsExpired int32 = 100006 // token已经过期
  100. AccountSDKAuthFail int32 = 100007 // 平台帐号验证失败
  101. AccountLoginSDKResponseError int32 = 100008 // 帐号登录sdk返回错误
  102. AccountLoginSignError int32 = 100009 // 帐号登录错误0x000 (签名验证错误)
  103. AccountLoginPIDError int32 = 100010 // 帐号登录错误0x001 (sdk_id)
  104. AccountLoginSDKNotFound int32 = 100011 // 帐号登录错误0x002 (sdkConfig)
  105. AccountLoginParamsError int32 = 100012 // 帐号登录错误0x003 (登录时客户端传入的参数错误)
  106. AccountLoginResponseError int32 = 100013 // 帐号登录错误0x004 (登录时sdk返回的错误)
  107. AccountLoginBindUserError int32 = 100014 // 登录时绑定用户Id失败
  108. AccountLoginServerError int32 = 100015 // 登录时指定的游戏服务不可用
  109. AccountLoginErrorKicked int32 = 100016 // 登录时异常
  110. AccountLoginTimeout int32 = 100017 // 登录超时,请重新登录 (游戏服重启了,需重新登录)
  111. )
  112. const (
  113. PlayerNotLogin int32 = 101000 // 玩家未登录
  114. PlayerDuplicateLogin int32 = 101001 // 玩家重复登录 (踢下线)
  115. PlayerHasLoggedIn int32 = 101002 // 玩家已经登录
  116. PlayerCreateFail int32 = 101003 // 创建玩家失败 (db异常)
  117. PlayerNotFound int32 = 101004 // 玩家未找到
  118. PlayerLoginServerError int32 = 101005 // 玩家登录游戏服错误
  119. PlayerNameLengthShort int32 = 101006 // 昵称长度不能小于2个字
  120. PlayerNameLengthLong int32 = 101007 // 昵称长度不能大于8个字
  121. PlayerIDError int32 = 101008 // 玩家ID错误
  122. PlayerNameIllegal int32 = 101009 // 昵称仅可使用中文数字字母
  123. PlayerNameInMaskWord int32 = 101010 // 昵称中带有敏感字符
  124. PlayerOrderCreateFail int32 = 101013 // 创建订单失败
  125. PlayerOrderIdError int32 = 101014 // 订单ID错误
  126. )
  127. // 英雄错误码
  128. const (
  129. HeroIDNotFound int32 = 102001 // 英雄id未找到
  130. HeroNotExist int32 = 102002 // 不存在该英雄
  131. HeroCapacityLimit int32 = 102003 // 英雄容量上限
  132. HeroCannotRecruit int32 = 102004 // 英雄无法招募
  133. HeroCannotReborn int32 = 102005 // 英雄无法重生
  134. HeroIsBusy int32 = 102006 // 英雄很忙
  135. HeroAttrPointLack int32 = 102007 // 英雄属性点不足
  136. HeroNotInTeam int32 = 102008 // 英雄不在阵型上
  137. HeroStarLimit int32 = 102009 // 英雄进阶上限
  138. HeroStarMismatch int32 = 102010 // 英雄进阶不匹配
  139. HeroEnergyLack int32 = 102011 // 英雄体力不足
  140. HeroResetFail int32 = 102012 // 英雄属性无需重置
  141. HeroSkillStudyFail int32 = 102013 // 英雄技能学习失败
  142. HeroEquipNotWear int32 = 102014 // 英雄未穿戴装备
  143. HeroNotWearThisEquip int32 = 102015 // 英雄未穿戴该装备
  144. HeroEnergyOverflow int32 = 102016 // 英雄体力超出上限,无法使用
  145. HeroStarNotEnough int32 = 102017 // 升星英雄不足
  146. HeroRecoveryHpError int32 = 102018 // 英雄恢复生命值错误
  147. HeroNotNeedRecovery int32 = 102019 // 暂无可治疗英雄
  148. )
  149. // 队伍状态码 // TODO 需要更新
  150. const (
  151. TeamNotUnlock int32 = 102020 // 部队未解锁
  152. TeamIndexError int32 = 102021 // 部队索引位置错误
  153. TeamIndexNotUnlock int32 = 102022 // 部队位置未解锁
  154. TeamIndexHasHero int32 = 102023 // 阵型索引位置已有英雄
  155. TeamIsBusy int32 = 102024 // 部队正忙
  156. TeamArmExceed int32 = 102025 // 部队超出兵力上限
  157. TeamCostExceed int32 = 102026 // 部队超出统御上限
  158. TeamIndexNotChange int32 = 102027 // 部队位置无变化
  159. TeamLineupIndexError int32 = 102028 // 阵型索引位置错误
  160. TeamMemberLimit int32 = 102029 // 队伍成员上限
  161. TeamTroopsNumError int32 = 102030 // 补兵数量错误
  162. TeamHeroAlreadyUp int32 = 102031 // 当前英雄已上阵
  163. TeamAlreadySameHero int32 = 102032 // 上阵相同英雄
  164. TeamIsEmpty int32 = 102033 // 队伍无人上阵
  165. TeamLineupTypeError int32 = 102034 // 阵容类型错误
  166. TeamLineupNotUnlock int32 = 102035 // 阵容队伍未解锁
  167. TeamNotNeedAddTroops int32 = 102036 // 当前兵力已满
  168. TeamNotCommander int32 = 102037 // 当前队伍没有上阵主将
  169. TeamHeroIniury int32 = 102038 // 队伍英雄已重伤
  170. )
  171. // 道具错误码
  172. const (
  173. ItemDataNotFound int32 = 103000 // 道具数据未找到
  174. ItemIdNotExist int32 = 103001 // 道具不存在背包中
  175. ItemUseTypeError int32 = 103003 // 道具使用类型错误 (类型没有实现或配置错误)
  176. ItemUseSelectIDError int32 = 103004 // 道具使用选择id错误
  177. ItemUseNumError int32 = 103005 // 道具使用数量错误
  178. ItemNotEnough int32 = 103006 // 道具数量不够
  179. ItemCanNotUse int32 = 103007 // 道具不能使用
  180. ItemNotForSell int32 = 103008 // 道具不可出售
  181. ItemNumError int32 = 103009 // 道具数量错误
  182. ItemUseFail int32 = 103010 // 道具使用失败
  183. ItemDecreaseFail int32 = 103011 // 道具扣除失败
  184. ItemUseSelectIdError int32 = 103012 // 使用时选择的道具id错误
  185. ItemAddFail int32 = 103013 // 道具添加失败
  186. ItemGoldNotEnough int32 = 103014 // 金币不足
  187. ItemCraftSelf int32 = 103016 // 不能合成当前道具
  188. ItemUseNumLimit int32 = 103018 // 使用次数已达上限
  189. ItemTypeError int32 = 103019 // 道具类型错误
  190. ItemAddOnceNumLimit int32 = 103020 // 道具单次添加数量超过上限
  191. ItemCraftEmpty int32 = 103021 // 合成不能为空
  192. ItemCraftNotCan int32 = 103022 // 当前道具不能合成
  193. ItemCraftNotExist int32 = 103023 // 合成消耗不存在
  194. ItemUseOnceLimit int32 = 103024 // 超出单次使用数量上限
  195. )
  196. // 货币错误码
  197. const (
  198. CurrencyNumError int32 = 104001 // 货币数量错误
  199. CurrencyTypeError int32 = 104002 // 货币类型错误
  200. CurrencyNotEnough int32 = 104003 // 货币数量不够
  201. LeagueCurrencyNotSupport int32 = 104004 // 联盟货币不支持
  202. )
  203. // 任务错误码
  204. const (
  205. QuestFinish int32 = 105004 // 任务已经结束
  206. QuestNotFound int32 = 105006 // 任务未找到
  207. QuestNotFinished int32 = 105007 // 任务未完成不能领取
  208. QuestGroupRewardNotExist int32 = 105008 // 任务组不存在章节奖励
  209. )
  210. // 邮件错误码
  211. const (
  212. MailDataNotFound int32 = 106001 // 邮件数据未找到
  213. MailRequestDataError int32 = 106002 // 邮件请求参数错误
  214. MailTypeError int32 = 106003 // 邮件类型错误
  215. MailCollectFail int32 = 106004 // 邮件收藏失败
  216. MailToPlayerError int32 = 106005 // 邮件接收玩家信息错误
  217. MailToPlayerNotEmpty int32 = 106006 // 邮件接收玩家不能为空
  218. MailToPlayerNumLimitExceeded int32 = 106007 // 邮件接收玩家数量超过上限
  219. MailFromPlayerError int32 = 106008 // 邮件发送玩家错误
  220. MailTitleError int32 = 106009 // 邮件标题长度不符
  221. MailContentError int32 = 106011 // 邮件内容长度不符
  222. MailContentTooLong int32 = 106012 // 邮件内容过长
  223. MailRewardHadTake int32 = 106013 // 邮件奖励已经被领取
  224. MailNotRead int32 = 106015 // 邮件未读取,不能删除
  225. MailNotClaim int32 = 106016 // 邮件奖励未领取,不能删除
  226. MailRewardEmpty int32 = 106017 // 暂无可领取邮件
  227. MailNumLimit int32 = 106018 // 邮件数量已达上限
  228. MailDelFail int32 = 106019 // 邮件删除失败
  229. MailReadFail int32 = 106020 // 暂无可读取邮件
  230. MailNotCanTop int32 = 106021 // 当前邮件暂不支持置顶
  231. MailDecreeNoCanDel int32 = 106022 // 法令邮件不能删除
  232. MailAlreadyDel int32 = 106023 // 邮件已删除
  233. MailDelNotExist int32 = 106024 // 暂无可删除邮件
  234. )
  235. // 资产错误码
  236. const (
  237. AssetTypeError int32 = 107001 // 资产类型错误
  238. AssetIsEmpty int32 = 107002 // 资源为空(检查配置)
  239. )
  240. // 聊天室错误码
  241. const (
  242. ChatGetListTooFast int32 = 108001 // 获取历史聊天记录请求太快
  243. ChatSendTypeError int32 = 108002 // 聊天室发送类型错误
  244. ChatEmojiError int32 = 108003 // 聊天室表情包错误
  245. ChatSendTextTooFast int32 = 108004 // 聊天室发送消息太快
  246. ChatSendTextIsEmpty int32 = 108005 // 聊天室不允许发空消息
  247. ChatChannelNotAvailable int32 = 108006 // 聊天室频道不可用
  248. ChatRoomAddFail int32 = 108007 // 聊天组添加失败
  249. ChatGroupNameIsEmpty int32 = 108008 // 群组名称不能为空
  250. ChatSendTextTooLong int32 = 108009 // 聊天发送消息太长
  251. ChatTextIllegal int32 = 108010 // 聊天内容不可用(只能是数字、字符、中文)
  252. ChatGroupNameTooLong int32 = 108011 // 聊天群组名称太长
  253. ChatGroupNameIllegal int32 = 108012 // 聊天群组名称包含非法字符
  254. ChatGroupInviteNotFriend int32 = 108013 // 聊天群组只能邀请好友
  255. ChatGroupMemberLimit int32 = 108014 // 聊天群组人数超过限制
  256. ChatGroupCreateLimit int32 = 108015 // 聊天群组创建数量超过限制
  257. ChatGroupNotFound int32 = 108016 // 聊天群组不存在
  258. ChatGroupPermissionDenied int32 = 108017 // 群组权限不足
  259. ChatGroupInviteNotFound int32 = 108018 // 群组邀请不存在,或者已被删除
  260. ChatGroupHaveCountLimit int32 = 108019 // 拥有的群数量达到限制
  261. ChatSendLvNotEnough int32 = 108020 // 等级不足,不能发言
  262. ChatPrivateBlackList int32 = 108021 // 在黑名单中,不能私聊
  263. ChatGroupCreateLvNotEnough int32 = 108022 // 领主等级不足,不能创建群组
  264. FriendAddLvNotEnough int32 = 108101 // 领主等级不足,无法添加好友
  265. FriendNumLimit int32 = 108102 // 好友数量已经达到上限
  266. FriendRepeatAdd int32 = 108103 // 已经是好友了
  267. FriendNotFound int32 = 108104 // 好友不存在
  268. FriendInviteNotFound int32 = 108105 // 好友邀请不存在,或者已被删除
  269. FriendAddSelf int32 = 108106 // 不能添加自己
  270. FriendApplyRepeatAdd int32 = 108107 // 对方已经向你发起了好友申请
  271. BlackListNotFound int32 = 108201 // 玩家不在黑名单中
  272. BlackListRepeatAdd int32 = 108202 // 玩家已经在黑名单中,不需要重复拉黑
  273. BlackListNumLimit int32 = 108203 // 黑名单数量已经达到上限
  274. ComplaintContentEmpty int32 = 108301 // 举报内容不能为空
  275. ComplaintContextIllegal int32 = 108302 // 举报内容包含非法字符
  276. ComplaintTooFast int32 = 108303 // 举报过于频繁
  277. ComplaintContentTooLong int32 = 108304 // 举报内容过长
  278. )
  279. // 活动错误码
  280. const (
  281. ActivityNotFound int32 = 109001 // 活动未找到
  282. ActivityRequestNotFound int32 = 109002 // 活动请求对象未找到
  283. ActivityUnmarshalDataError int32 = 109003 // 解析活动数据错误
  284. ActivityMarshalDataError int32 = 109004 // 编码活动数据错误
  285. ActivityNotOpen int32 = 109005 // 活动未开启
  286. ActivityQuestNotFound int32 = 109006 // 活动任务未找到
  287. ActivityQuestStateWrong int32 = 109007 // 活动任务状态不对
  288. )
  289. // 战斗错误码
  290. const (
  291. BattleValidateFail int32 = 110001 // 战斗校验失败
  292. BattleTeamEmpty int32 = 110002 // 出战队伍为空
  293. BattleFightNoMatch int32 = 110003 // 出战英雄不匹配
  294. BattleFighterIsDead int32 = 110004 // 战斗武将已阵亡
  295. )
  296. // 装备错误码
  297. const (
  298. EquipNotFound int32 = 111002 // 装备不存在
  299. EquipEnhanceFail int32 = 111003 // 装备强化失败
  300. EquipGUIDHasWear int32 = 111004 // 装备GUID已穿戴
  301. EquipBindHeroError int32 = 111005 // 武器与绑定的英雄错误
  302. EquipPlayerLevelNotEnough int32 = 111007 // 装备强化,玩家等级不够
  303. EquipCostGoldNotEnough int32 = 111008 // 装备强化,扣除金币不够
  304. EquipCostItemNotEnough int32 = 111009 // 装备强化,扣除道具不够
  305. EquipQualityError int32 = 111010 // 装备品质错误
  306. EquipQualityIsMax int32 = 111011 // 装备品质已达到最高
  307. EquipQualityConditionError int32 = 111013 // 装备品质提升被合并的条件错误
  308. EquipQualityBeMergeIsWear int32 = 111014 // 装备品质,被合并的装备正在穿戴中
  309. EquipGUIDError int32 = 111015 // 装备guid错误
  310. EquipDecreaseError int32 = 111016 // 装备guid删除错误
  311. EquipQualityNotDown int32 = 111018 // 装备不能降品
  312. EquipCannotStrong int32 = 111019 // 装备未穿戴不能强化
  313. EquipLevelNotEnough int32 = 111020 // 装备等级不足
  314. EquipNoSpecialSkill int32 = 111021 // 装备没有专属技能
  315. EquipSpecialSkillIsUnlock int32 = 111022 // 装备专属技能已解锁
  316. EquipLevelMax int32 = 111025 // 装备等级到最大等级
  317. )
  318. // 充值错误码
  319. const (
  320. PayChargeIDError int32 = 112001 // 充值项id错误
  321. PayChargeTypeError int32 = 112002 // 充值项类型错误
  322. PayChargeParamsError int32 = 112003 // 充值项参数错误
  323. PayChargeLimit int32 = 112004 // 充值限购
  324. )
  325. // GM 错误码
  326. const (
  327. GMEnableClose int32 = 113001 // 后台添加道具开关关闭
  328. GMItemTypeError int32 = 113002 // 后台添加道具传进来的道具类型非法
  329. )
  330. // 技能错误码
  331. const (
  332. SkillNotExists int32 = 115000 // 技能不存在
  333. SkillStudyFull int32 = 115002 // 技能学习已满
  334. SkillAlreadyStudy int32 = 115003 // 技能已学习
  335. SkillIndexWrong int32 = 115004 // 技能位置出错
  336. SkillLevelLimit int32 = 115005 // 技能等级限制
  337. SkillEvolveLimit int32 = 115006 // 技能已达最大阶级
  338. SkillMismatch int32 = 115007 // 技能不匹配
  339. SkillUpCostError int32 = 115009 // 技能升级消耗错误
  340. SkillNotUnlock int32 = 115010 // 技能未解锁
  341. SkillLevelMax int32 = 115011 // 技能已达最大等级
  342. )
  343. // 城建错误码
  344. const (
  345. FacilityNotUnlock int32 = 116000 // 建筑未解锁
  346. FacilityIsUpgrading int32 = 116001 // 建筑正在升级
  347. FacilityQueueFull int32 = 116002 // 建筑队列已满
  348. FacilityLevelLimit int32 = 116003 // 建筑已达最大等级
  349. FacilityNotInQueue int32 = 116004 // 建筑没有在升级队列中
  350. FacilityQueueRepeatUnlock int32 = 116005 // 建筑队列已经解锁,不需要重复解锁
  351. FacilityUpLordLevelNotEnough int32 = 116006 // 领主等级不够,不能升级
  352. FacilityQueueUnlockOrder int32 = 116007 // 建筑队列须按顺序解锁
  353. FacilityUpPreConditionNotMet int32 = 116008 // 建筑升级前置条件未满足
  354. ConscriptNumLimit int32 = 116100 // 征兵数量上限
  355. ConscriptNoAction int32 = 116101 // 征兵未进行
  356. ConscriptNumLack int32 = 116102 // 征兵数量不足
  357. ConscriptNotSame int32 = 116105 // 征兵兵种不一致
  358. ConscriptLevelLimit int32 = 116106 // 征兵等级未解锁
  359. ConscriptHandling int32 = 116107 // 征兵中
  360. ConscriptUpgradeHandling int32 = 116108 // 征兵升级中
  361. ConscriptMaxLevel int32 = 116110 // 当前士兵已达最大等级
  362. ConscriptUpCostEmpty int32 = 116111 // 升级消耗不存在
  363. ConscriptUpNumLack int32 = 116112 // 升级数量不足
  364. ConscriptNotUp int32 = 116113 // 当前暂无升级士兵
  365. )
  366. // 联盟错误码
  367. const (
  368. LeagueAlreadyJoin int32 = 117000 // 已经加入联盟
  369. LeagueCreateLevelNotEnough int32 = 117001 // 等级不满足要求
  370. LeagueJoinFail int32 = 117002 // 创建联盟失败
  371. LeagueNameEmpty int32 = 117003 // 请输入联盟名称
  372. LeagueNameLimit int32 = 117004 // 联盟名称过长
  373. LeagueAbbNameEmpty int32 = 117005 // 请输入联盟简称
  374. LeagueAbbNameLimit int32 = 117006 // 联盟简称过长
  375. LeagueNameHasSpecial int32 = 117007 // 名字包含特殊字符
  376. LeagueNotExist int32 = 117008 // 联盟不存在
  377. LeagueNameExist int32 = 117009 // 该名称已被占用,请更换其他名字
  378. LeagueAbbNameExist int32 = 117010 // 该简称已被占用,请更换其他名字
  379. LeagueNotJoin int32 = 117011 // 你还没加入联盟
  380. LeagueAlreadyExist int32 = 117012 // 联盟已存在
  381. LeagueMembersLimit int32 = 117013 // 联盟成员数已达上限
  382. LeagueMembersEmpty int32 = 117014 // 联盟成员列表不存在
  383. LeagueLeaderNotQuit int32 = 117015 // 盟主不能退出联盟
  384. LeagueMemberNotExist int32 = 117016 // 联盟成员不存在
  385. LeaguePermissionDenied int32 = 117017 // 联盟操作权限不足
  386. LeagueNotCanOpSelf int32 = 117018 // 不能操作自己
  387. LeagueAlreadyJoinOther int32 = 117019 // 已经加入其他联盟
  388. LeagueApplyRepeat int32 = 117020 // 请勿重复申请
  389. LeagueApplyNotExist int32 = 117021 // 入会申请不存在
  390. LeagueQuitCD int32 = 117022 // 退出联盟冷却中
  391. LeagueSearchNotExist int32 = 117023 // 搜索联盟不存在
  392. LeagueMailDataNotExist int32 = 117024 // 联盟邮件数据不存在
  393. LeagueNotInMap int32 = 117025 // 联盟未加入地图
  394. LeagueNameNotChange int32 = 117026 // 联盟名称未改变
  395. LeagueExpNotEnough int32 = 117027 // 联盟经验不足
  396. LeagueMaxLevel int32 = 117028 // 联盟已达最大等级
  397. LeagueLevelConfigNotExist int32 = 117029 // 联盟等级配置不存在
  398. LeagueFlagBgNotExist int32 = 117030 // 联盟背景配置不存在
  399. LeagueFlagBgError int32 = 117031 // 联盟背景类型错误
  400. LeagueFlagIconNotExist int32 = 117032 // 联盟图标配置不存在
  401. LeagueFlagIconError int32 = 117033 // 联盟图标类型错误
  402. LeagueNeedLevelNotEnough int32 = 117034 // 加入所需主城等级不足
  403. LeagueJobNotExist int32 = 117035 // 联盟职位不存在
  404. LeagueNoCanSetSelfJob int32 = 117036 // 不能设置自己职位
  405. LeagueMemberHasJob int32 = 117037 // 已为官无法任命
  406. LeaguePermissionNotExist int32 = 117038 // 分配权限不存在
  407. LeaguePermissionNoCanSet int32 = 117039 // 职位存在不能设置权限
  408. LeagueLogDataNotExist int32 = 117040 // 联盟日志数据不存在
  409. LeagueNotLeader int32 = 117041 // 您不是盟主
  410. LeagueTransferNotMember int32 = 117042 // 转让玩家不是联盟成员
  411. LeagueTransferExist int32 = 117043 // 当前已存在转让申请
  412. LeagueTransferNotExist int32 = 117044 // 不存在转让申请
  413. LeagueImpeachNotEnd int32 = 117045 // 当前弹劾未结束
  414. LeagueImpeachNotEnough int32 = 117046 // 弹劾条件不满足
  415. LeagueImpeachSelf int32 = 117047 // 盟主不能弹劾自己
  416. LeagueLeaderNotCanSet int32 = 117048 // 不能设置为盟主
  417. LeagueResidenceNotExist int32 = 117049 // 联盟驻地不存在
  418. LeagueResidenceBuilding int32 = 117050 // 联盟驻地建造中
  419. LeagueResidenceHadMember int32 = 117051 // 当前位置已入驻
  420. LeagueTaxRateNotEnough int32 = 117052 // 税率调整次数不足
  421. LeagueTaxRateValueError int32 = 117053 // 税率调整值不合法
  422. LeagueFundBonusMinValueError int32 = 117054 // F币数量不合法
  423. LeagueFundBonusRemainCountNotEnough int32 = 117055 // F币分配剩余数量不足
  424. LeagueFundBonusCountNotEnough int32 = 117056 // F币数量不足
  425. LeagueImpeachNotKick int32 = 117057 // 联盟弹劾中 不能踢出
  426. LeagueImpeachNotTransfer int32 = 117058 // 联盟弹劾中 不能转让
  427. )
  428. const (
  429. MapLeague_TechNotUnlock int32 = 117100 // 科技未解锁
  430. MapLeague_TechUpPreConditionNotMet int32 = 117101 // 科技升级前置条件未满足
  431. MapLeague_TechUpLevelLimit int32 = 117102 // 科技已达最大等级
  432. MapLeague_TechUpCostNotEnough int32 = 117103 // 科技升级消耗不足
  433. MapLeague_CastleNotExist int32 = 117201 // 城池不存在
  434. MapLeague_CastleAlreadyHasLord int32 = 117202 // 城池已有城主
  435. MapLeague_CastleAlreadyHasOther int32 = 117203 // 已经任命其他城池的城主
  436. MapLeague_BuildNotFound int32 = 117204 // 联盟建筑不存在
  437. MapBuild_AlreadyDiscarding int32 = 117205 // 联盟建筑正在摧毁中
  438. MapLeague_BuildSystemCannotDiscard int32 = 117206 // 系统建筑不可摧毁
  439. MapLeague_NotCanDiscard int32 = 117207 // 当前建筑不可摧毁
  440. )
  441. const (
  442. MapUnsupportMarchType int32 = 118000 // 不支持的行军类型
  443. MapTeamNotFound int32 = 118001 // 部队不存在
  444. MapTeamNotMarchable int32 = 118002 // 部队不能行军
  445. MapPathFindFail int32 = 118003 // 地图寻路失败
  446. MapLeaguePointNotFound int32 = 118004 // 找不到联盟驻地点
  447. MapTeamNotRetreatable int32 = 118005 // 部队不能撤退
  448. MapTeamNotMarching int32 = 118006 // 部队不在行军中
  449. MapResOccupyFail_HasOwner int32 = 118007 // 资源占领失败: 非中立资源
  450. MapResOccupyFail_SameLeague int32 = 118008 // 资源占领失败: 盟友资源
  451. MapObjectTypeUnkown int32 = 118009 // 未知的地图对象类型
  452. MapRes_NotFound int32 = 118010 // 地图资源不存在
  453. MapRes_NotAlive int32 = 118011 // 地图资源消失
  454. MapRes_NotMyOwn int32 = 118012 // 地图资源不是我的
  455. MapRes_IsGathering int32 = 118013 // 资源正在采集中
  456. MapRes_NotMyLeague int32 = 118014 // 资源不属于同盟
  457. MapResSnatchFail_Neutral int32 = 118015 // 资源掠夺失败: 中立资源
  458. MapResSnatchFail_SameLeague int32 = 118016 // 资源掠夺失败: 盟友资源
  459. MapTile_NotWalkable int32 = 118017 // 地块不可行走
  460. MapTile_HasBlock int32 = 118018 // 地块有阻档
  461. MapBuild_NumLimit int32 = 118019 // 建筑数量限制
  462. MapRelocate_Cooldown int32 = 118020 // 迁城失败:冷却中
  463. MapRelocate_NoLeague int32 = 118021 // 迁城失败:未加入联盟
  464. MapRelocate_BaseNotFound int32 = 118022 // 迁城失败:没有地基
  465. MapRelocate_HasMarch int32 = 118023 // 迁城失败:有部队在地图中
  466. MapRelocate_BaseBuilding int32 = 118024 // 迁城失败:地基建造中
  467. MapMarchFail_GrainLack int32 = 118025 // 行军失败:粮草不足
  468. MapRelocate_NoMainCity int32 = 118026 // 迁城失败:没有主城
  469. MapRelocate_NoLeaguePoint int32 = 118027 // 迁城失败:没有联盟驻地
  470. MapBuild_NoSiegeBase int32 = 118028 // 没有攻城地基
  471. MapBuild_NoBelongedLeague int32 = 118029 // 建筑不属于联盟
  472. MapBuild_IsBuilding int32 = 118030 // 建筑正在建造中
  473. MpaCastle_NotFound int32 = 118031 // 城池不存在
  474. MapBuild_NoSiegeCamp int32 = 118032 // 没有攻城大营
  475. MapStartWar_SiegeCampBuilding int32 = 118033 // 攻城大营建造中
  476. MapStartWar_AlreadyStart int32 = 118034 // 已经宣战
  477. MapBuild_NotFound int32 = 118035 // 地图建筑不存在
  478. MapMarch_Unstopable int32 = 118036 // 行军不可终止
  479. MapRetreat_NotRedeploy int32 = 118037 // 撤退失败:不是调动点
  480. MapMarch_BattleState int32 = 118038 // 队伍战斗中
  481. MapDeclareWar_Cooldown int32 = 118039 // 宣战CD中
  482. MapBuild_NotMyLeague int32 = 118040 // 不是同盟建筑
  483. MapMarch_RedeployTargetUnable int32 = 118041 // 行军调动目标无效
  484. MapCastle_NotMyLeague int32 = 118042 // 不是同盟城池
  485. MapMarch_NotAllocArm int32 = 118043 // 没有分配兵力
  486. MapBuild_NotBuildable int32 = 118044 // 不可建造
  487. MapBuild_NoOverride int32 = 118045 // 没有覆盖建筑
  488. MapBuild_NotBelongedPlayer int32 = 118046 // 建筑不属于玩家
  489. MapBuild_NotLeagueBuild int32 = 118047 // 不是联盟建筑
  490. MapBuild_NotPlayerBuild int32 = 118048 // 不是个人建筑
  491. MapAssemble_NotFound int32 = 118049 // 未找到集结信息
  492. MapAssemble_NotLeader int32 = 118050 // 不是你的集结队伍
  493. MapAssemble_KickLeader int32 = 118051 // 不能踢出队长
  494. MapAssemble_NotInAssemble int32 = 118052 // 不在集结队伍中
  495. MapAssemble_MarchNotStandby int32 = 118053 // 集结队伍不在主城
  496. MapAssemble_InvalidTargetType int32 = 118054 // 目标不可集结
  497. MapAssemble_TargetNotFound int32 = 118055 // 集结目标不存在
  498. MapAssemble_TargetInSameLeague int32 = 118056 // 集结目标属于同盟
  499. MapAssemble_NotInSameLeague int32 = 118057 // 集结队伍不属于同盟
  500. MapAssemble_AlreayDepart int32 = 118058 // 集结队伍已出发
  501. MapAssemble_FullMember int32 = 118059 // 集结队伍已满员
  502. MapAssemble_MarchBusy int32 = 118060 // 行军对象繁忙无法集结
  503. MapAssemble_MarchInjure int32 = 118061 // 行军对象重伤无法集结
  504. MapAssemble_SingleMember int32 = 118062 // 单人队伍不能出发
  505. MapAssemble_MemberNotArrive int32 = 118063 // 成员未到达不能出发
  506. MapMarchStateNotRetreatable int32 = 118064 // 当前状态不可撤退
  507. MapAssemble_AlreadyJoin int32 = 118065 // 已经加入集结队伍
  508. MapGetPointFail int32 = 118066 // 获取坐标失败
  509. MapBuild_AreaContainObtical int32 = 118067 // 领地包含障碍物
  510. MapBuild_AreaIntersectSystem int32 = 118068 // 领地与系统领地重合
  511. MapBuild_AreaIntersectEnemy int32 = 118069 // 领地与敌方领地重合
  512. MapBuild_AreaNoLink int32 = 118070 // 领地未连接
  513. MapStopWar_NotInWar int32 = 118071 // 未宣战
  514. MapEnter_MapNotOpen int32 = 118100 // 地图未开启
  515. MapBornPoint_NotFound int32 = 118101 // TODO 找不到出生点
  516. MapMark_AlreadyExist int32 = 118102 // 地图标记已存在
  517. MapMark_NotExist int32 = 118103 // 地图标记不存在
  518. MapMark_NotChange int32 = 118104 // 地图标记内容
  519. MapMark_NumLimit int32 = 118105 // 地图标记数量已达上限
  520. MapMark_TitleLenLimit int32 = 118106 // 地图标记标题长度不符
  521. MapMark_DescLenLimit int32 = 118107 // 地图标记描述长度不符
  522. MapMark_CommandNotExist int32 = 118108 // 地图标记指令不存在
  523. MapBuild_FoundateCooldown int32 = 118109 // 地基建造冷却中
  524. )
  525. // 探险
  526. const (
  527. ChapterRewardStarNotEnough int32 = 119003 // 探险章节星数不满足
  528. ChapterNotUnlocked int32 = 119004 // 当前章节未解锁
  529. ChapterLevelNotUnlocked int32 = 119005 // 当前关卡未解锁
  530. ChapterRewardAlreadyReceived int32 = 119006 // 奖励已领取
  531. ChapterLevelError int32 = 119007 // 关卡ID错误
  532. ChapterLevelCountNotEnough int32 = 119009 // 关卡挑战次数不足
  533. ChapterStaminaNotEnough int32 = 119010 // 精力不足
  534. ChapterLevelNotFullStar int32 = 119011 // 关卡未满星
  535. ChapterLineupNotFound int32 = 119012 // 探险阵容不存在
  536. ChapterBattleResultVerifyFail int32 = 119013 // 探险战斗结果校验失败
  537. ChapterBattleFail int32 = 119014 // 探险挑战失败
  538. ChapterMonsterGroupConfigError int32 = 119015 // 探险怪物组配置错误
  539. ChapterLevelBuyTimesNotEnough int32 = 119016 // 当前关卡购买次数不足
  540. ChapterLevelBuyTimesError int32 = 119017 // 购买次数错误
  541. ChapterBattleError int32 = 119018 // 探险战斗异常
  542. )
  543. const (
  544. BattleReportNotExist int32 = 120000 // 战报不存在
  545. )
  546. const (
  547. GMTypeError = 121000 // gm类型错误
  548. )
  549. const (
  550. ShopNotOpen int32 = 122001 // 商店未开启
  551. ShopNotFound int32 = 122002 // 商店数据不存在
  552. ShopBuyNumError int32 = 122003 // 购买次数错误
  553. ShopBuyNumLimit int32 = 122004 // 购买次数已达上限
  554. ShopTypeError int32 = 122005 // 商店类型错误
  555. )
  556. const (
  557. MainChapterConfigNotFound int32 = 123000 // 主线章节配置不存在
  558. MainChapterRewardGot int32 = 123001 // 当前章节奖励已领取
  559. MainChapterNotOpen int32 = 123002 // 当前章节未开启
  560. )
  561. const (
  562. PlayerNameEmpty = 124000 // 玩家名称不能为空
  563. PlayerNameLimit = 124001 // 玩家名称长度不符合
  564. PlayerNameSame = 124002 // 玩家名称无更改
  565. PlayerNameExist = 124003 // 玩家名称已存在
  566. PlayerChangeNameCD = 124004 // 玩家名称改名冷却中
  567. PlayerDescLenLimit = 124005 // 简介长度不符
  568. )
  569. const (
  570. ShowConfigNotExist = 125000 // 外显配置不存在
  571. ShowTypeError = 125001 // 外显类型错误
  572. ShowTypeNotExist = 125002 // 外显类型不存在
  573. ShowNotUnlock = 125003 // 外显未解锁
  574. ShowExpire = 125004 // 外显已过期
  575. ShowAlreadyActive = 125005 // 外显已激活
  576. ShowActiveTypeError = 125006 // 当前激活类型错误
  577. )
  578. const (
  579. LanguageNotExist = 126000 // 设置语言不存在
  580. ShowDataLenNoSame = 126001 // 展示数据长度不一致
  581. ShowDataTypeNotExist = 126002 // 展示数据类型不存在
  582. ShowDataCountLimit = 126003 // 展示数量超出上限
  583. )