-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.go
305 lines (302 loc) · 10.5 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
package majsoulgo
func ErrorMessageByCode(code int) string {
err, ok := ERROR_STRINGS[code]
if !ok {
return ""
}
return err
}
const (
ERR_UNKNOWN = 1
ERR_SYSTEM_ERROR = 2
ERR_CLIENT_PACKET_PARAM = 3
ERR_NOT_DEVELOPMENT_MODE = 4
ERR_SYSTEM_COMMUNICATION = 5
ERR_METHOD_NOT_FOUND = 6
ERR_EMPTY_INPUT = 101
ERR_INVALID_INPUT = 102
ERR_CONFIG_NOT_FOUND = 104
ERR_GIFT_CODE_NOT_VALID = 105
ERR_GIFT_CODE_ALREADY_USED = 106
ERR_GIFT_CODE_GAIN_USAGEID = 107
ERR_UNSUPPORT_OAUTH2 = 108
ERR_OAUTH2_EXPIRED = 109
ERR_OAUTH2_FAILED = 110
ERR_GIFT_CODE_PROCESSING = 112
ERR_GIFT_CODE_DURATION = 113
ERR_GIFT_CODE_DISCARDED = 114
ERR_FREQUENT_PHONE_CODE = 115
ERR_PHONE_CODE_EXPIRED = 116
ERR_SECURE_OPERATION_EXPIRED = 117
ERR_BIND_SAME_PHONE = 118
ERR_PHONE_SEND_FAILED = 119
ERR_RESOURCE_NOT_ENOUGH = 501
ERR_TEXT_FORBIDDEN_WORD = 502
ERR_ACCOUNT_BANNED = 503
ERR_RESOURCE_UNIQUE = 504
ERR_ACC_DUPLICATE_SIGN_UP = 1001
ERR_ACC_NOT_SIGN_UP = 1002
ERR_ACC_PASSWORD = 1003
ERR_ACC_NOT_LOGIN = 1004
ERR_ACC_ALREADY_LOGIN = 1005
ERR_ACC_NOT_EXIST = 1006
ERR_ACC_CHAR_NOT_LOCK = 1007
ERR_ACC_CHAR_ALREADY_LOCK = 1008
ERR_ACC_TICK_BY_SAME = 1009
ERR_ACC_NICKNAME_USED = 1010
ERR_ACC_NO_NICKNAME = 1011
ERR_ACC_HAS_NICKNAME = 1012
ERR_ACC_HAS_BIND_ACCOUNT = 1013
ERR_ACC_TARGET_ACCOUNT_USED = 1014
ERR_ACC_NEED_NICKNAME_ITEM = 1015
ERR_ACC_MOD_NICKNAME_CD = 1016
ERR_ACC_ALREADY_REG_REALNAME = 1017
ERR_ROOM_NOT_EXIST = 1100
ERR_ROOM_IS_FULL = 1101
ERR_ROOM_ALREADY_LEAVE = 1102
ERR_ROOM_NOT_OWNER = 1103
ERR_ROOM_NOT_ALL_READY = 1104
ERR_ROOM_ALREADY_JOIN = 1105
ERR_ROOM_NOT_JOIN = 1106
ERR_ROOM_TARGET_NOT_JOIN = 1107
ERR_ROOM_KICK_SELF = 1108
ERR_ACC_IS_PLAYING = 1109
ERR_ROOM_NO_AVAILABLE_ID = 1110
ERR_ROOM_NO_ENOUGH_SLOT = 1111
ERR_ROOM_MODE_INVALID = 1112
ERR_TOKEN_NOT_EXIST = 1201
ERR_TOKEN_INVALID = 1202
ERR_GAME_NOT_EXIST = 1203
ERR_GAME_REFUSED = 1204
ERR_GAME_NOT_PLAYING = 1205
ERR_GAME_ALREADY_FINISH = 1206
ERR_GAME_CAN_NOT_MANUAL_TER = 1207
ERR_GAME_CREATE_FAILED = 1208
ERR_MATCH_IN_MATCHING = 1301
ERR_MATCH_NOT_IN_MATCHING = 1302
ERR_UNSUPPORT_MATCH_MODE = 1303
ERR_MATCH_GOLD_LIMIT = 1304
ERR_MATCH_LEVEL_LIMIT = 1305
ERR_MATCH_MODE_NOT_OPEN = 1306
ERR_FRIEND_NOT_FRIEND = 1401
ERR_FRIEND_IS_FRIEND = 1402
ERR_SEARCH_TIMEOUT = 1403
ERR_SEARCH_INVALID = 1404
ERR_FRIEND_APPLY_METHOD = 1405
ERR_FRIEND_MAX_APPLY = 1406
ERR_FRIEND_MAX = 1407
ERR_FRIEND_ADD_SELF = 1408
ERR_FRIEND_MAX_TARGET = 1409
ERR_BAG_NO_ITEM = 1501
ERR_BAG_NOT_ENOUGH_ITEM = 1502
ERR_BAG_ITEM_NOT_USABLE = 1503
ERR_BAG_ITEM_NOT_COMPOSE = 1504
ERR_ACHIEVEMENT_NOT_ACHIEVED = 1601
ERR_TASK_DAILY_NOT_FOUND = 1611
ERR_TASK_DAILY_NO_REFRESH = 1612
ERR_MAIL_NOT_FOUND = 1701
ERR_MAIL_NO_ATTACHMENT = 1702
ERR_MAIL_ALREADY_TAKE = 1703
ERR_LIVE_GAME_NOT_FOUND = 1801
ERR_PAYMENT_CLOSED = 1900
ERR_PAYMENT_ORDER_NOT_FOUND = 1901
ERR_PAYMENT_ORDER_HANDLED = 1902
ERR_PAYMENT_PLATFORM = 1903
ERR_PAYMENT_GOODS_NOT_FOUND = 1904
ERR_PAYMENT_GP_VERIFY = 1951
ERR_PAYMENT_WECHAT_DISABLE = 1960
ERR_PAYMENT_WECHAT_POST_FAILED = 1961
ERR_PAYMENT_ALI_DISABLE = 1970
ERR_PAYMENT_ALI_TYPE_UNSUP = 1971
ERR_REVIVE_COIN_TIME = 2001
ERR_REVIVE_COIN_LIMIT = 2002
ERR_TITLE_NOT_UNLOCK = 2003
ERR_COMMENT_ONLY_FRIEND = 2004
ERR_COMMENT_FORBID = 2005
ERR_COMMENT_SELF = 2006
ERR_COMMENT_WHEN_GAMING = 2007
ERR_COMMENT_NO_PRIV_DELETE = 2008
ERR_COMMENT_CD = 2009
ERR_CHEST_NOT_FOUND = 2010
ERR_CHEST_INVALID_COUNT = 2011
ERR_CHARACTER_UNLOCK = 2201
ERR_CHARACTER_GIFT_TYPE = 2202
ERR_CHARACTER_GIFT_COUNT_MAX = 2203
ERR_CHARACTER_SKIN_UNLOCK = 2204
ERR_CHARACTER_IS_UPGRADE = 2205
ERR_CHARACTER_LEVEL = 2206
ERR_CHARACTER_CANNOT_MARRY = 2207
ERR_ITEM_CANNOT_SELL = 2301
ERR_SHOP_GOODS_NOT_FOUND = 2401
ERR_SHOP_GOODS_BUY_LIMIT = 2402
ERR_SHOP_ZHP_UNAVAILABLE = 2431
ERR_SHOP_ZHP_REFRESH_LIMIT = 2432
ERR_CONTEST_NOT_FOUND = 2501
ERR_CONTEST_MAX_ACTIVE = 2502
ERR_CONTEST_RANDOM_CID = 2503
ERR_CONTEST_MGR_HAS_LOGINED = 2504
ERR_CONTEST_MGR_NOT_LOGIN = 2505
ERR_CONTEST_MGR_NO_PRIVILEGE = 2506
ERR_CONTEST_NOT_START = 2507
ERR_CONTEST_ALREADY_END = 2508
ERR_CONTEST_PLAYER_NOT_MATCHING = 2509
ERR_CONTEST_LOCK_BY_OTHER = 2510
ERR_CONTEST_NO_ACCESS_MATCH = 2511
ERR_CONTEST_NO_PRIV_CHAT = 2512
ERR_CONTEST_NOT_CREATOR = 2513
ERR_CONTEST_MANAGER_COUNT_LIMIT = 2514
ERR_CONTEST_CREATE_TIME_LIMIT = 2515
ERR_CONTEST_BAN_CREATE = 2516
ERR_CONTEST_SETTING_PARAM = 2517
ERR_CONTEST_LEVEL_LIMIT = 2518
ERR_CONTEST_GAME_COUNT_LIMIT = 2519
ERR_CONTEST_PROLONG_LIMIT = 2520
ERR_CONTEST_AUTO_MATCHING = 2521
)
var ERROR_STRINGS = map[int]string{
1: "ERR_UNKNOWN",
2: "ERR_SYSTEM_ERROR",
3: "ERR_CLIENT_PACKET_PARAM",
4: "ERR_NOT_DEVELOPMENT_MODE",
5: "ERR_SYSTEM_COMMUNICATION",
6: "ERR_METHOD_NOT_FOUND",
101: "ERR_EMPTY_INPUT",
102: "ERR_INVALID_INPUT",
104: "ERR_CONFIG_NOT_FOUND",
105: "ERR_GIFT_CODE_NOT_VALID",
106: "ERR_GIFT_CODE_ALREADY_USED",
107: "ERR_GIFT_CODE_GAIN_USAGEID",
108: "ERR_UNSUPPORT_OAUTH2",
109: "ERR_OAUTH2_EXPIRED",
110: "ERR_OAUTH2_FAILED",
112: "ERR_GIFT_CODE_PROCESSING",
113: "ERR_GIFT_CODE_DURATION",
114: "ERR_GIFT_CODE_DISCARDED",
115: "ERR_FREQUENT_PHONE_CODE",
116: "ERR_PHONE_CODE_EXPIRED",
117: "ERR_SECURE_OPERATION_EXPIRED",
118: "ERR_BIND_SAME_PHONE",
119: "ERR_PHONE_SEND_FAILED",
501: "ERR_RESOURCE_NOT_ENOUGH",
502: "ERR_TEXT_FORBIDDEN_WORD",
503: "ERR_ACCOUNT_BANNED",
504: "ERR_RESOURCE_UNIQUE",
1001: "ERR_ACC_DUPLICATE_SIGN_UP",
1002: "ERR_ACC_NOT_SIGN_UP",
1003: "ERR_ACC_PASSWORD",
1004: "ERR_ACC_NOT_LOGIN",
1005: "ERR_ACC_ALREADY_LOGIN",
1006: "ERR_ACC_NOT_EXIST",
1007: "ERR_ACC_CHAR_NOT_LOCK",
1008: "ERR_ACC_CHAR_ALREADY_LOCK",
1009: "ERR_ACC_TICK_BY_SAME",
1010: "ERR_ACC_NICKNAME_USED",
1011: "ERR_ACC_NO_NICKNAME",
1012: "ERR_ACC_HAS_NICKNAME",
1013: "ERR_ACC_HAS_BIND_ACCOUNT",
1014: "ERR_ACC_TARGET_ACCOUNT_USED",
1015: "ERR_ACC_NEED_NICKNAME_ITEM",
1016: "ERR_ACC_MOD_NICKNAME_CD",
1017: "ERR_ACC_ALREADY_REG_REALNAME",
1100: "ERR_ROOM_NOT_EXIST",
1101: "ERR_ROOM_IS_FULL",
1102: "ERR_ROOM_ALREADY_LEAVE",
1103: "ERR_ROOM_NOT_OWNER",
1104: "ERR_ROOM_NOT_ALL_READY",
1105: "ERR_ROOM_ALREADY_JOIN",
1106: "ERR_ROOM_NOT_JOIN",
1107: "ERR_ROOM_TARGET_NOT_JOIN",
1108: "ERR_ROOM_KICK_SELF",
1109: "ERR_ACC_IS_PLAYING",
1110: "ERR_ROOM_NO_AVAILABLE_ID",
1111: "ERR_ROOM_NO_ENOUGH_SLOT",
1112: "ERR_ROOM_MODE_INVALID",
1201: "ERR_TOKEN_NOT_EXIST",
1202: "ERR_TOKEN_INVALID",
1203: "ERR_GAME_NOT_EXIST",
1204: "ERR_GAME_REFUSED",
1205: "ERR_GAME_NOT_PLAYING",
1206: "ERR_GAME_ALREADY_FINISH",
1207: "ERR_GAME_CAN_NOT_MANUAL_TER",
1208: "ERR_GAME_CREATE_FAILED",
1301: "ERR_MATCH_IN_MATCHING",
1302: "ERR_MATCH_NOT_IN_MATCHING",
1303: "ERR_UNSUPPORT_MATCH_MODE",
1304: "ERR_MATCH_GOLD_LIMIT",
1305: "ERR_MATCH_LEVEL_LIMIT",
1306: "ERR_MATCH_MODE_NOT_OPEN",
1401: "ERR_FRIEND_NOT_FRIEND",
1402: "ERR_FRIEND_IS_FRIEND",
1403: "ERR_SEARCH_TIMEOUT",
1404: "ERR_SEARCH_INVALID",
1405: "ERR_FRIEND_APPLY_METHOD",
1406: "ERR_FRIEND_MAX_APPLY",
1407: "ERR_FRIEND_MAX",
1408: "ERR_FRIEND_ADD_SELF",
1409: "ERR_FRIEND_MAX_TARGET",
1501: "ERR_BAG_NO_ITEM",
1502: "ERR_BAG_NOT_ENOUGH_ITEM",
1503: "ERR_BAG_ITEM_NOT_USABLE",
1504: "ERR_BAG_ITEM_NOT_COMPOSE",
1601: "ERR_ACHIEVEMENT_NOT_ACHIEVED",
1611: "ERR_TASK_DAILY_NOT_FOUND",
1612: "ERR_TASK_DAILY_NO_REFRESH",
1701: "ERR_MAIL_NOT_FOUND",
1702: "ERR_MAIL_NO_ATTACHMENT",
1703: "ERR_MAIL_ALREADY_TAKE",
1801: "ERR_LIVE_GAME_NOT_FOUND",
1900: "ERR_PAYMENT_CLOSED",
1901: "ERR_PAYMENT_ORDER_NOT_FOUND",
1902: "ERR_PAYMENT_ORDER_HANDLED",
1903: "ERR_PAYMENT_PLATFORM",
1904: "ERR_PAYMENT_GOODS_NOT_FOUND",
1951: "ERR_PAYMENT_GP_VERIFY",
1960: "ERR_PAYMENT_WECHAT_DISABLE",
1961: "ERR_PAYMENT_WECHAT_POST_FAILED",
1970: "ERR_PAYMENT_ALI_DISABLE",
1971: "ERR_PAYMENT_ALI_TYPE_UNSUP",
2001: "ERR_REVIVE_COIN_TIME",
2002: "ERR_REVIVE_COIN_LIMIT",
2003: "ERR_TITLE_NOT_UNLOCK",
2004: "ERR_COMMENT_ONLY_FRIEND",
2005: "ERR_COMMENT_FORBID",
2006: "ERR_COMMENT_SELF",
2007: "ERR_COMMENT_WHEN_GAMING",
2008: "ERR_COMMENT_NO_PRIV_DELETE",
2009: "ERR_COMMENT_CD",
2010: "ERR_CHEST_NOT_FOUND",
2011: "ERR_CHEST_INVALID_COUNT",
2201: "ERR_CHARACTER_UNLOCK",
2202: "ERR_CHARACTER_GIFT_TYPE",
2203: "ERR_CHARACTER_GIFT_COUNT_MAX",
2204: "ERR_CHARACTER_SKIN_UNLOCK",
2205: "ERR_CHARACTER_IS_UPGRADE",
2206: "ERR_CHARACTER_LEVEL",
2207: "ERR_CHARACTER_CANNOT_MARRY",
2301: "ERR_ITEM_CANNOT_SELL",
2401: "ERR_SHOP_GOODS_NOT_FOUND",
2402: "ERR_SHOP_GOODS_BUY_LIMIT",
2431: "ERR_SHOP_ZHP_UNAVAILABLE",
2432: "ERR_SHOP_ZHP_REFRESH_LIMIT",
2501: "ERR_CONTEST_NOT_FOUND",
2502: "ERR_CONTEST_MAX_ACTIVE",
2503: "ERR_CONTEST_RANDOM_CID",
2504: "ERR_CONTEST_MGR_HAS_LOGINED",
2505: "ERR_CONTEST_MGR_NOT_LOGIN",
2506: "ERR_CONTEST_MGR_NO_PRIVILEGE",
2507: "ERR_CONTEST_NOT_START",
2508: "ERR_CONTEST_ALREADY_END",
2509: "ERR_CONTEST_PLAYER_NOT_MATCHING",
2510: "ERR_CONTEST_LOCK_BY_OTHER",
2511: "ERR_CONTEST_NO_ACCESS_MATCH",
2512: "ERR_CONTEST_NO_PRIV_CHAT",
2513: "ERR_CONTEST_NOT_CREATOR",
2514: "ERR_CONTEST_MANAGER_COUNT_LIMIT",
2515: "ERR_CONTEST_CREATE_TIME_LIMIT",
2516: "ERR_CONTEST_BAN_CREATE",
2517: "ERR_CONTEST_SETTING_PARAM",
2518: "ERR_CONTEST_LEVEL_LIMIT",
2519: "ERR_CONTEST_GAME_COUNT_LIMIT",
2520: "ERR_CONTEST_PROLONG_LIMIT",
2521: "ERR_CONTEST_AUTO_MATCHING",
}