ErrCode.php 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772
  1. <?php
  2. namespace loyalsoft;
  3. /**
  4. * 错误码及错误描述字典
  5. * @author gwang
  6. */
  7. class ErrCode {
  8. /**
  9. * 交互成功
  10. */
  11. const ok = 0;
  12. //
  13. // <editor-fold defaultstate="collapsed" desc=" 基础错误码 10xx ">
  14. /**
  15. * 未知原因错误
  16. */
  17. const err_unknownn = 1001;
  18. /**
  19. * 内部错误
  20. */
  21. const err_innerfault = 1002;
  22. /**
  23. * 数据库操作失败
  24. */
  25. const err_db = 1003;
  26. /**
  27. * 内存操作失败
  28. */
  29. const err_mem = 1004;
  30. /**
  31. * 断言失败
  32. */
  33. const err_assert = 1005;
  34. /**
  35. * 消息内容非法(不满足tk校验的条件)
  36. */
  37. const err_illegal = 1011;
  38. /**
  39. * 消息内容缺少校验值
  40. */
  41. const err_signo = 1012;
  42. /**
  43. * 消息超时
  44. */
  45. const err_outtime = 1021;
  46. /**
  47. * Just重试
  48. */
  49. const err_retry = 1024;
  50. /**
  51. * 客户端版本过低-整包更
  52. */
  53. const clientversionlow_err = 1031;
  54. /**
  55. * 客户端版本过低-增量更
  56. */
  57. const clientnewversion_msg = 1032;
  58. /**
  59. * 客户端打印信息并且退出
  60. */
  61. const clientPrintMsg_Halt = 1033;
  62. /**
  63. * 功能码非法
  64. */
  65. const ope_err = 1210;
  66. /**
  67. * 操作码非法
  68. */
  69. const cmd_err = 1211;
  70. /**
  71. * 参数非法
  72. */
  73. const paras_err = 1212;
  74. /**
  75. * 参数不足
  76. */
  77. const parasnotenough_msg = 1213;
  78. /**
  79. * 内容包含敏感词
  80. */
  81. const sensword_msg = 1234;
  82. /**
  83. * 服务器正在维护中
  84. */
  85. const err_server_maintaining = 1301;
  86. /**
  87. * 服务器正在升级,请过会儿再来。
  88. */
  89. const err_server_updating = 1302;
  90. /**
  91. * 已经在其他地方登录
  92. */
  93. const err_anotherlogin = 1303;
  94. /**
  95. * 功能暂未开放
  96. */
  97. const function_notopen_msg = 1801;
  98. /**
  99. * 方法尚未实现
  100. */
  101. const err_method_notimplement = 1802;
  102. /**
  103. * 方法已过时, 废弃的.
  104. */
  105. const err_method_obsoleted = 1803;
  106. /**
  107. * 游戏常量数据错误
  108. */
  109. const err_const_no = 1825;
  110. // </editor-fold>
  111. //
  112. // // <editor-fold defaultstate="collapsed" desc=" 商城/付费 88xx ">
  113. /**
  114. * 尚未首付
  115. */
  116. const pay_firstpayno_err = 8801;
  117. /**
  118. * 已经领取首付
  119. */
  120. const pay_firstpaygetted = 8802;
  121. /**
  122. * 系统繁忙
  123. */
  124. const pay_systembusy_err = 8803;
  125. /**
  126. * 不是黄钻或已经领取黄钻礼包
  127. */
  128. const pay_vipnewerno = 8804;
  129. /**
  130. * amt数值小于等于0
  131. */
  132. const pay_m_amtzero_err = 8805;
  133. /**
  134. * 价格异常
  135. */
  136. const pay_price_err = 8806;
  137. /**
  138. * 支付类型异常
  139. */
  140. const pay_m_type_err = 8807;
  141. /**
  142. * 商品常量数据错误-货物内容
  143. */
  144. const pay_shopItem_cosnt_goods_err = 8808;
  145. /**
  146. * 商城 已达刷新次数上限
  147. */
  148. const pay_refresh_times = 8809;
  149. /**
  150. * 神秘商城 - 购买次数已达上限
  151. */
  152. const pay_secretshop_buytimes = 8810;
  153. /**
  154. * 神秘商城 - 物品数据错误
  155. */
  156. const pay_secretshop_noitem_err = 8811;
  157. /**
  158. * 充值 - 订单不存在
  159. */
  160. const pay_order_no = 8812;
  161. /**
  162. * 充值 - 付款状态不正确 正在重新查询...
  163. */
  164. const pay_order_paystatus = 8813;
  165. /**
  166. * 充值 - 此订单已经发货, 无需重复请求
  167. */
  168. const pay_order_drawed = 8814;
  169. /**
  170. * 充值 - 订单uid不符
  171. */
  172. const pay_order_uid = 8815;
  173. /**
  174. * 神秘商城 - 免费刷新时间未到
  175. */
  176. const pay_secretshopt_freeRefresh_Time = 8816;
  177. const pay_order_product_id = 8817;
  178. const pay_fail = 8818;
  179. /**
  180. * 不能重复购买
  181. */
  182. const pay_repeatbuy = 8819;
  183. // </editor-fold>
  184. //
  185. // <editor-fold defaultstate="collapsed" desc=" not enough 系列 ">
  186. /**
  187. * 金币不足
  188. */
  189. const notenough_gold_msg = 3014;
  190. /**
  191. * 宝石不足
  192. */
  193. const notenough_cash_msg = 3015;
  194. /**
  195. * 友情点不足
  196. */
  197. const notenough_friendshippoint = 3016;
  198. /**
  199. * 玩家荣誉值不足[荣誉值兑换]
  200. */
  201. const notenough_honour = 3032;
  202. /**
  203. * 元宝不足
  204. */
  205. const notenought_yuanbao = 3040;
  206. /**
  207. * 玩家体力值不足
  208. */
  209. const notenough_tili = 3046;
  210. /**
  211. * 晶石不足
  212. */
  213. const notenough_spar = 3047;
  214. /**
  215. * 资源点不足
  216. */
  217. const notenough_resPoint = 3048;
  218. // </editor-fold>
  219. //
  220. // <editor-fold defaultstate="collapsed" desc=" user 31xx ">
  221. /**
  222. * 玩家未登录
  223. */
  224. const user_login_err = 3101;
  225. /**
  226. * 玩家不存在
  227. */
  228. const user_no_err = 3102;
  229. /**
  230. * 玩家数据损坏
  231. */
  232. const user_data_broken_err = 3103;
  233. /**
  234. * 连续登录天数不够
  235. */
  236. const user_contigiftno_msg = 3104;
  237. /**
  238. * 已经领取连续登录礼包
  239. */
  240. const user_contigiftfalse_msg = 3105;
  241. /**
  242. * 设置新手引导进度失败
  243. */
  244. const user_settutorialscompletedfail_err = 3106;
  245. /**
  246. * 玩家等级不足
  247. */
  248. const user_levelnotenough_msg = 3107;
  249. /**
  250. * 找不到玩家的交互体数据
  251. */
  252. const user_interact_no_err = 3108;
  253. /**
  254. * 找不到玩家的分区记录
  255. */
  256. const user_zoneinfo_no_err = 3109;
  257. /**
  258. * 玩家昵称已经存在,请换一个再试
  259. */
  260. const user_nicknameexist = 3110;
  261. /**
  262. * 没有这种奖励类型
  263. */
  264. const user_reward_typeno = 3031;
  265. // </editor-fold>
  266. //
  267. // <editor-fold defaultstate="collapsed" desc=" 英雄错误码 33xx ">
  268. /**
  269. * 玩家没有这个英雄
  270. */
  271. const hero_no = 3301;
  272. /**
  273. * 找不到英雄升级消耗数据
  274. */
  275. const hero_level_const_no_err = 3302;
  276. /**
  277. * 英雄碎片不足
  278. */
  279. const hero_segment_not_enough = 3303;
  280. /**
  281. * 缺少英雄的常量数据
  282. */
  283. const hero_const_no_err = 3304;
  284. /**
  285. * 英雄强化--已经达到最大等阶
  286. */
  287. const hero_strength_maxstrengthlevel = 3305;
  288. /**
  289. * 英雄升级--已经达到当前最大等级
  290. */
  291. const hero_upgrade_maxupgradelevel = 3306;
  292. /**
  293. * 英雄升级--消耗的数据错误(道具或者卡牌不存在)
  294. */
  295. const hero_upgrade_cost = 3307;
  296. /**
  297. * 英雄升星--已经达到最大星级
  298. */
  299. const hero_star_maxstarlevel = 3308;
  300. /**
  301. * 英雄升星--消耗英雄参数错误
  302. */
  303. const hero_star_costhero = 3309;
  304. /**
  305. * 英雄升星--消耗道具数量不充足
  306. */
  307. const hero_star_notengoughitem = 3310;
  308. /**
  309. * 英雄升星--升星消耗的常量数据不存在
  310. */
  311. const hero_star_level_const_no_err = 3311;
  312. /**
  313. * 英雄升星--全局变量缺失该英雄属性对应的升星消耗道具信息
  314. */
  315. const hero_star_noglobal_costitem = 3312;
  316. /**
  317. * 英雄升星--消耗道具与消耗道具数量的常量配置不匹配
  318. */
  319. const hero_star_conststr_itemnotmathnum = 3313;
  320. /**
  321. * 英雄好感度---缺少对应好感度的消耗设置的常量数据
  322. */
  323. const hero_favor_cost_const_no = 3314;
  324. /**
  325. * 英雄好感度---解锁目标好感度参数错误
  326. */
  327. const hero_favor_targetfavor_para = 3315;
  328. /**
  329. * 英雄分解---传递消耗英雄参数错误
  330. */
  331. const hero_separate_cost_hero = 3316;
  332. /**
  333. * 英雄升阶---缺少对应等阶的消耗设置的常量数据
  334. */
  335. const hero_strength_cost_const_no = 3317;
  336. /**
  337. * 英雄技能__当前技能等级已经达到上限
  338. */
  339. const hero_upgradeSkill_maxLevel = 3318;
  340. /**
  341. * 英雄技能__该技能升级的消耗常量配置不存在
  342. */
  343. const hero_upgradeSkill_cost_const_no = 3319;
  344. /**
  345. * 英雄打分 -- 已经给次英雄打过分了
  346. */
  347. const hero_scoreit_hasscored = 3320;
  348. /**
  349. * 英雄升级——消耗的常量配置不存在
  350. */
  351. const hero_upgrade_cost_const_no = 3321;
  352. /**
  353. * 玩家已经存在一个此类的英雄
  354. */
  355. const hero_existSameHero_err = 3322;
  356. /**
  357. * 玩家神血的消耗常量数据不存在
  358. */
  359. const hero_godblood_level_const_no = 3323;
  360. /**
  361. * 玩家神血的血脉达到定级
  362. */
  363. const hero_godblood_maxlevel = 3324;
  364. /**
  365. * 玩家神血 强化,消耗道具不足
  366. */
  367. const hero_godblood_notengoughitem = 3325;
  368. /**
  369. * 玩家已经解锁
  370. */
  371. const hero_lockState = 3326;
  372. /**
  373. * 言灵已达到可装备的最大数量
  374. */
  375. const hero_yanling_full = 3327;
  376. /**
  377. * 英雄身上找不到这个言灵
  378. */
  379. const hero_yanling_notfound = 3328;
  380. /**
  381. * 言灵等级配置缺失
  382. */
  383. const hero_yanling_levelconst_no = 3329;
  384. /**
  385. * 言灵等级已达上限
  386. */
  387. const hero_yanling_levelMax = 3330;
  388. /**
  389. * 重复言灵
  390. */
  391. const hero_yanling_repeat = 3331;
  392. /**
  393. * 言灵星级达到最大值
  394. */
  395. const hero_yanling_starMax = 3332;
  396. /**
  397. * 错误的言灵
  398. */
  399. const hero_yanling_errorYanling = 3333;
  400. /**
  401. * 不能突破
  402. */
  403. const hero_yanling_canotTupo = 3334;
  404. /**
  405. * 言灵进化
  406. */
  407. const yanling_canotevolve = 3335;
  408. /**
  409. * 该言灵不能被消耗
  410. */
  411. const yanling_canotconsume = 3336;
  412. //
  413. // </editor-fold>
  414. //
  415. // <editor-fold defaultstate="collapsed" desc=" 仓库/背包 34xx ">
  416. /**
  417. * 该目标不能放入仓库
  418. */
  419. const store_putinto = 3401;
  420. /**
  421. * 仓库没有这个道具
  422. */
  423. const store_itemno_err = 3402;
  424. /**
  425. * 道具不可使用
  426. */
  427. const store_itemcantuse = 3404;
  428. /**
  429. * 道具数量不足
  430. */
  431. const store_itemnotenough = 3405;
  432. /**
  433. * 移除道具失败!
  434. */
  435. const store_removefail = 3407;
  436. /**
  437. * 道具不能分解
  438. */
  439. const store_itemcantdecompose = 3408;
  440. /**
  441. * 装备已经在别的英雄身上装备
  442. */
  443. const store_equipWeared_err = 3409;
  444. /**
  445. * 装备没有在此英雄身上装备
  446. */
  447. const store_noequip_err = 3410;
  448. /**
  449. * 未知装备类型
  450. */
  451. const store_equip_type = 3411;
  452. /**
  453. * 言灵召唤书常量数据有误
  454. */
  455. const store_book_info = 3412;
  456. /**
  457. * 言灵进阶数据有问题
  458. */
  459. const store_yanlingGrade_cfg = 3413;
  460. /**
  461. * 言灵已经进阶至最高
  462. */
  463. const store_yanlingGrade_max = 3414;
  464. /**
  465. * 背包空间不足!
  466. */
  467. const store_bagSpaceNotEnough = 3415;
  468. /**
  469. * 没有该武器
  470. */
  471. const store_weapon_err = 3416;
  472. /**
  473. * 请先提升玩家等级
  474. */
  475. const store_GemResearchLvUp_UserLevelLimit = 3417;
  476. /**
  477. * 请先提升宝石研究等级
  478. */
  479. const store_GemComplose_ResearchLevelLimit = 3418;
  480. /**
  481. * 合成宝石的图纸不足
  482. */
  483. const store_GemComploseTuZhiNotEnough = 3419;
  484. /**
  485. * 合成宝石的材料不足
  486. */
  487. const store_GemComploseMaterialNotEnough = 3420;
  488. /**
  489. * 合成宝石需要消耗的宝石材料不足
  490. */
  491. const store_ComploseGemNotEnough = 3421;
  492. /**
  493. * 言灵身上没有宝石
  494. */
  495. const store_YanLingNotGem = 3422;
  496. /**
  497. * 言灵已经装备了宝石
  498. */
  499. const store_YanLingHaveGem = 3423;
  500. /**
  501. * 不能买该武器
  502. */
  503. const store_weaponCantBuy = 3424;
  504. /**
  505. * 储物间不能再次扩容
  506. */
  507. const store_expandStorage = 3425;
  508. /**
  509. * 不存在该储物格子
  510. */
  511. const store_NotHaveStorage = 3426;
  512. /**
  513. * 当前储物间已满
  514. */
  515. const store_StorageEnough = 3427;
  516. /**
  517. * 药瓶不足
  518. */
  519. const store_bettleitemNumNotEnough = 3428;
  520. /**
  521. * 言灵升级不能使用自己
  522. */
  523. const store_notRemoveYanlingSelf = 3429;
  524. /**
  525. * 没有该言灵
  526. */
  527. const store_NotHaveYanling = 3430;
  528. /**
  529. * 存在不能被消耗的武器
  530. */
  531. const store_WeaponCanotConsume = 3431;
  532. // </editor-fold>
  533. //
  534. // <editor-fold defaultstate="collapsed" desc=" 任务错误码 35xx系列 ">
  535. /**
  536. * 找不到任务数据
  537. */
  538. const task_no = 3501;
  539. /**
  540. * 任务进度尚未完成
  541. */
  542. const task_progress_not_complete = 3502;
  543. /**
  544. * 任务奖励已经领取
  545. */
  546. const task_reward_geted = 3503;
  547. /**
  548. * 日常任务活跃点数不足
  549. */
  550. const task_activePoint_notenough = 3504;
  551. /**
  552. * 任务卡未找到
  553. */
  554. const taskCard_no = 3510;
  555. /**
  556. * 任务卡-不可堆叠
  557. */
  558. const taskCard_no_pile = 3511;
  559. /**
  560. * 任务卡-状态错误
  561. */
  562. const taskCard_state = 3512;
  563. /**
  564. * 任务卡-不可激活多张同种类任务卡
  565. */
  566. const taskCard_active_multi = 3513;
  567. /**
  568. * 任务卡-同时激活数量达到上限(9)
  569. */
  570. const taskCard_active_max = 3514;
  571. /**
  572. * 任务卡-此卡已售罄
  573. */
  574. const taskCard_selled = 3515;
  575. /**
  576. * 任务卡-收集的道具数量尚未满足条件
  577. */
  578. const taskCard_gainItem_no = 3516;
  579. // </editor-fold>
  580. //
  581. // <editor-fold defaultstate="collapsed" desc=" 交互操作 36xx ">
  582. //
  583. // </editor-fold>
  584. //
  585. // <editor-fold defaultstate="collapsed" desc=" 好友 37xx ">
  586. /**
  587. * 不存在该好友
  588. */
  589. const friend_no_err = 3701;
  590. /**
  591. * 不存在好友的平台信息
  592. */
  593. const friend_noplat_err = 3702;
  594. /**
  595. * 已经领取该好友礼物
  596. */
  597. const friend_gift = 3703;
  598. /**
  599. * 已到达当天领取好友礼物上限
  600. */
  601. const friend_maxgift = 3704;
  602. /**
  603. * 获取不到好友礼物几率常量数据
  604. */
  605. const friend_giftrent_const_no_err = 3705;
  606. // </editor-fold>
  607. //
  608. // <editor-fold defaultstate="collapsed" desc=" 任务 38xx ">
  609. /**
  610. * 不存在该任务
  611. */
  612. const goal_const_no_err = 3801;
  613. /**
  614. * 未找到该任务信息
  615. */
  616. const goal_nogoaldata_err = 3802;
  617. /**
  618. * 任务尚未完成
  619. */
  620. const goal_notcomplete = 3803;
  621. /**
  622. * 任务奖励已领取
  623. */
  624. const goal_rewarded = 3804;
  625. // </editor-fold>
  626. //
  627. // <editor-fold defaultstate="collapsed" desc=" 活动 39xx ">
  628. /**
  629. * 不存在该活动礼包
  630. */
  631. const active_const_no_err = 3901;
  632. /**
  633. * 活动领取非法
  634. */
  635. const active_illegal = 3902;
  636. /**
  637. * 礼包已领取
  638. */
  639. const active_hasgetted = 3903;
  640. /**
  641. * 在线礼包常量数据不存在
  642. */
  643. const onlinegift_constno_err = 3904;
  644. /**
  645. * 在线礼包时间未到
  646. */
  647. const onlinegift_timenotenough = 3905;
  648. /**
  649. * 在线礼包id错误
  650. */
  651. const onlinegift_wrongid = 3906;
  652. /**
  653. * 免费抽奖类型不存在
  654. */
  655. const lottery_typenotexist = 3907;
  656. /**
  657. * 剩余免费抽奖次数不够了
  658. */
  659. const lottery_freenotenough = 3908;
  660. /**
  661. * 连续签到常量数据不存在
  662. */
  663. const checkin_const_no = 3909;
  664. /**
  665. * 连续签到活动已过期
  666. */
  667. const checkin_outofday = 3910;
  668. /**
  669. * 连续签到奖励已领取
  670. */
  671. const checkin_giftgetted = 3911;
  672. /**
  673. * 连续签到奖励礼包id不存在
  674. */
  675. const checkin_giftidno = 3912;
  676. /**
  677. * 连续签到天数不够.
  678. */
  679. const chekin_daysnotenough = 3913;
  680. /**
  681. * 完成新手引导的大礼包找不到常量数据。
  682. */
  683. const Guide_completeGiftNo = 3914;
  684. /**
  685. * 不存在的抽奖次数
  686. */
  687. const lottery_notexistLotterCount = 3915;
  688. /**
  689. * 不存在的抽奖消耗财富类型
  690. */
  691. const lottery_notexistLotterCostType = 3916;
  692. /**
  693. * 未能生成中奖物品
  694. */
  695. const lottery_noselecteditem = 3917;
  696. /**
  697. * 已经留下回归密码了
  698. */
  699. const active_returncode_leaved = 3921;
  700. /**
  701. * 密码格式不合法
  702. */
  703. const active_returncode_illegal = 3922;
  704. /**
  705. * 新手七天礼包,想要领取的礼包索引有误
  706. */
  707. const active_new7_wrongindex = 3923;
  708. /**
  709. * 活动 - 激活码 渠道错误.
  710. */
  711. const active_activecode_plat = 3924;
  712. /**
  713. * 活动 - 激活码 无效
  714. */
  715. const active_activecode_format = 3925;
  716. /**
  717. * 没有充值返利常量数据
  718. * * */
  719. const active_rechargereward_const_no = 3926;
  720. /**
  721. * 充值返利活动未开启
  722. * * */
  723. const active_rechargereward_notopen = 3927;
  724. /**
  725. * 充值返利,领取奖励,充值金额不足
  726. * * */
  727. const active_rechargereward_notenough = 3928;
  728. /**
  729. * 充值返利,领取奖励,当前开启的活动key与mem中存储的key不一致
  730. * * */
  731. const active_rechargereward_keynotsuit = 3929;
  732. /**
  733. * 充值返利,您已经领取过此奖励
  734. * * */
  735. const active_rechargereward_hasgetted = 3930;
  736. /**
  737. * 玩家充值返利数据错误
  738. * * */
  739. const active_rechargereward_userinfoerr = 3931;
  740. /**
  741. * 回归奖励已经领取
  742. */
  743. const active_returnreward_drawed = 3932;
  744. /**
  745. * 回归奖励验证失败
  746. */
  747. const active_returnreward_VerifyFailed = 3933;
  748. /**
  749. * 回归奖励验证的时候通讯失败,请稍后再试
  750. */
  751. const active_returnreward_VerifyConnectionFailed = 3934;
  752. /**
  753. * 回归奖励,这组回归密码已经被使用过啦.
  754. */
  755. const active_returnreward_codeused = 3935;
  756. /**
  757. * 预约礼包活动已经结束
  758. */
  759. const active_reserve_reward_outtime = 3936;
  760. /**
  761. * 激活码礼包已经过期
  762. */
  763. const active_activecode_outtime = 3937;
  764. /**
  765. * 开服七日活动 - 任务状态异常
  766. */
  767. const active_day7_taskstate_err = 3938;
  768. /**
  769. * 开服七日活动 - 找不到常量数据
  770. */
  771. const active_day7_const_no_err = 3939;
  772. /**
  773. * 开服七日活动 - 总天数不足
  774. */
  775. const active_day7_totaldays = 3940;
  776. /**
  777. * 开服七日活动 - 找不到任务
  778. */
  779. const active_day7_taskno_err = 3941;
  780. /**
  781. * 抽奖 - 保底奖励, 次数不满足
  782. */
  783. const lottery_baodi_times_lt = 3942;
  784. /**
  785. * 抽奖 - 卡槽尚未解锁
  786. */
  787. const err_lottery_slot_locked = 3943;
  788. /**
  789. * 抽奖 - 卡槽使用中
  790. */
  791. const err_lottery_slot_not_emputy = 3944;
  792. /**
  793. * 抽奖 - 搜索尚未结束
  794. */
  795. const err_lottery_slot_time = 3945;
  796. /**
  797. * 抽奖 - 卡槽数据异常
  798. */
  799. const err_lottery_slot_emputy = 3946;
  800. /**
  801. * 抽奖 - 卡槽已经解锁
  802. */
  803. const err_lottery_slot_unlocked = 3947;
  804. /**
  805. * 抽奖 - 达到每次次数限制
  806. */
  807. const err_lottery_daily_limit = 3948;
  808. /**
  809. * 宝箱 - 数量不足
  810. */
  811. const box_not_enough = 3950;
  812. /**
  813. * 活动 - 此活动尚未开放
  814. */
  815. const active_time = 3951;
  816. /**
  817. * 活动 - 兑换码已经使用过了
  818. */
  819. const active_activecode_used = 3952;
  820. /**
  821. * 活动不存在
  822. */
  823. const active_activeNoExistent = 3953;
  824. /**
  825. * 抽奖次数已经达到上限
  826. */
  827. const active_NewUserActiveNumLimit = 3954;
  828. /**
  829. * 每日购买体力次数限制
  830. */
  831. const active_BuyTiliNumLimit = 3955;
  832. /**
  833. *
  834. */
  835. const active_FirstRechargeRewardRepeat = 3956;
  836. /**
  837. * 金币购买次数超出最大值
  838. */
  839. const active_goldExchangeNum_maxLimit = 3957;
  840. // </editor-fold>
  841. //
  842. // <editor-fold defaultstate="collapsed" desc=" 战斗错误码 40xx ">
  843. /**
  844. * 关卡挑战 - 掉落奖励与后台不匹配
  845. */
  846. const err_arenas_rewardIllegal = 4003;
  847. /**
  848. * 关卡挑战 - 难度参数错误
  849. */
  850. const err_arenas_difficulty = 4004;
  851. /**
  852. * 关卡挑战记录非法
  853. */
  854. const err_arenas_logillegal = 4005;
  855. /**
  856. * 错误的关卡索引
  857. */
  858. const err_arenasgate_indexillegal = 4006;
  859. /**
  860. * 关卡挑战体力值不足,无法战斗
  861. */
  862. const err_arenasgate_nocount = 4007;
  863. /**
  864. * 战场解锁星数不足,无法扫荡该关卡
  865. */
  866. const err_arenas_unlockstarnotenough = 4008;
  867. /**
  868. * 关卡的挑战次数已达上限
  869. */
  870. const err_arenas_normalgate_numno = 4009;
  871. /**
  872. * 错误的扫荡次数
  873. */
  874. const err_arenasgate_errSweepCount = 4010;
  875. /**
  876. * 关卡星星奖励的常量数据不存在!
  877. */
  878. const err_arenas_starreward_const_no = 4011;
  879. /**
  880. * 关卡星星奖励--奖励已经领取
  881. */
  882. const err_arenas_hasgetstarreward = 4012;
  883. /**
  884. * 关卡星星奖励--星星数量不足无法领取奖励
  885. */
  886. const err_arenas_starreward_starNotEnough = 4013;
  887. /**
  888. * 无尽关卡模式——常量数据丢失
  889. */
  890. const err_gateForever_const_no = 4014;
  891. /**
  892. * 无尽关卡模式—挑战次数已达上限
  893. */
  894. const err_gateForever_countIsFull = 4015;
  895. /**
  896. * 无尽关卡模式—挑战次数非法
  897. */
  898. const err_gateForever_countillegal = 4016;
  899. /**
  900. * 副本开启中
  901. */
  902. const carbon_opened = 4017;
  903. /**
  904. * 副本未开启
  905. */
  906. const carbon_closed = 4018;
  907. /**
  908. * 副本挑战的关卡索引错误
  909. */
  910. const carbon_gateIndex = 4019;
  911. /**
  912. * 副本-难度等级错误
  913. */
  914. const carbon_wrongdifficult = 4020;
  915. /**
  916. * 竞技场 - 指定的pvp对手不存在
  917. */
  918. const pvp_wrongMather = 4021;
  919. /**
  920. * 竞技场 - 刷新过于频繁
  921. */
  922. const pvp_refresh_time = 4022;
  923. /**
  924. * 竞技场 - 错误的体力充值数量
  925. */
  926. const pvp_tili_chargenum = 4023;
  927. /**
  928. * 竞技场 - 挑战票不足.
  929. */
  930. const pvp_no_tickets = 4024;
  931. /**
  932. * 竞技场 - 刷新对手花费数据对不上.
  933. */
  934. const pvp_refresh_cost_ilegal = 4030;
  935. /**
  936. * 竞技场 - 刷新对手已达次数上限
  937. */
  938. const pvp_refresh_max = 4029;
  939. /**
  940. * 竞技场 - 挑战票购买, 跟预期的值对不上
  941. */
  942. const pvp_ticket_cost_ilegal = 4028;
  943. /**
  944. * 竞技场 - 道具已售罄
  945. */
  946. const pvp_item_soldout = 4027;
  947. /**
  948. * 竞技场 - 活跃值不够
  949. */
  950. const pvp_coinnotenough = 4026;
  951. /**
  952. * 剧情关卡 - 剧情关卡不能重复挑战,只能挑战一次
  953. */
  954. const story_repeatfight = 4025;
  955. /**
  956. * 剧情关卡 - 星数奖励领取条件不够
  957. */
  958. const err_arenas_starrwd_star = 4031;
  959. // </editor-fold>
  960. //
  961. // <editor-fold defaultstate="collapsed" desc=" 排行榜错误码 41xx ">
  962. /**
  963. * 排行榜 - 战斗力解锁条件尚未达成
  964. */
  965. const rank_fpower_unlocked = 4101;
  966. /**
  967. * 排行榜 - 奖励已经领取了
  968. */
  969. const rank_reward_hasgetted = 4102;
  970. /**
  971. * 排行榜 - 通关帮奖励解锁条件尚未达成
  972. */
  973. const rank_passsgate_unlocked = 4103;
  974. // </editor-fold>
  975. //
  976. // <editor-fold defaultstate="collapsed" desc=" 邮件错误码 42xx ">
  977. /**
  978. * 邮件 - 错误的邮件id
  979. */
  980. const email_wrongid = 4201;
  981. /**
  982. * 邮件 - 未找到指定邮件
  983. */
  984. const email_not_found = 4202;
  985. /**
  986. * 邮件 - 不存在附件
  987. */
  988. const email_no_appendix = 4203;
  989. /**
  990. * 邮件 - 附件已领取
  991. */
  992. const email_appendix_drawed = 4204;
  993. // </editor-fold>
  994. //
  995. // <editor-fold defaultstate="collapsed" desc="战斗错误码">
  996. //
  997. /**
  998. * 无尽塔 - 错误的关卡索引
  999. */
  1000. const Fight_endlessTower_index = 4341;
  1001. //
  1002. // </editor-fold>
  1003. //
  1004. // <editor-fold defaultstate="collapsed" desc=" 拍卖 47xx ">
  1005. /**
  1006. * 拍卖物品的常量数据不存在
  1007. */
  1008. const auction_const_no = 4701;
  1009. /**
  1010. * 当天拍卖物品的数据不存在
  1011. */
  1012. const auction_curdaynotexist = 4702;
  1013. /**
  1014. * 竞价的时候超过时间限制
  1015. */
  1016. const auction_timeout = 4703;
  1017. /**
  1018. * 拍卖一件不在拍品列表中的物品
  1019. */
  1020. const auction_noexistautionItem = 4704;
  1021. /**
  1022. * 拍卖一件不在拍品列表中的物品
  1023. */
  1024. const auction_pricelowthancurprice = 4705;
  1025. /**
  1026. * 拍品尚未开始拍卖
  1027. */
  1028. const auction_beforstart = 4706;
  1029. /**
  1030. * 拍品已经结束拍卖
  1031. */
  1032. const auction_end = 4707;
  1033. /**
  1034. * 出价低于当前价
  1035. */
  1036. const auction_failprice = 4708;
  1037. /**
  1038. * 上传拍品价格太低
  1039. */
  1040. const auction_loadpricelow = 4709;
  1041. // </editor-fold>
  1042. //
  1043. // <editor-fold defaultstate="collapsed" desc="公会错误码 - 48xx开始">
  1044. /**
  1045. * 玩家等级不足
  1046. */
  1047. const err_guild_userlevel = 4800;
  1048. /**
  1049. * 您已经属于一个公会成员了.
  1050. */
  1051. const err_guild_userhasbeenaguildmember = 4801;
  1052. /**
  1053. * 解散公会后的24小时冷却时间尚未过去.
  1054. */
  1055. const err_guild_dissmisscodingtime = 4802;
  1056. /**
  1057. * 同名公会已存在
  1058. */
  1059. const err_guild_nameexists = 4803;
  1060. /**
  1061. * 创建公会时所传公会名称参数为空.
  1062. */
  1063. const err_guild_nameEmputy = 4804;
  1064. /**
  1065. * 金币不足
  1066. */
  1067. const err_msg_goldnotenough = 4805;
  1068. /**
  1069. * 找不到公会数据
  1070. */
  1071. const err_guild_guildinfono = 4806;
  1072. /**
  1073. * 成员已满
  1074. */
  1075. const err_guild_memberfull = 4807;
  1076. /**
  1077. * 申请队列已满
  1078. */
  1079. const err_guild_applyListFull = 4808;
  1080. /**
  1081. * 公会未开启一键加入功能
  1082. */
  1083. const err_guild_quickinclosed = 4809;
  1084. /**
  1085. * 玩家不属于此公会
  1086. */
  1087. const err_guild_usernotguildmember = 4810;
  1088. /**
  1089. * 找不到玩家的公会信息
  1090. */
  1091. const err_guild_userguildinfono = 4811;
  1092. /**
  1093. * 玩家不是该公会的会长或是干部
  1094. */
  1095. const err_guild_usernotchairman = 4812;
  1096. /**
  1097. * 解散工会的时候, 公会不为空
  1098. */
  1099. const err_guild_notEmputy = 4813;
  1100. /**
  1101. * 会长不能开除自己.
  1102. */
  1103. const err_guild_cannotfireyourself = 4814;
  1104. /**
  1105. * 申请信息未找到
  1106. */
  1107. const err_guild_appmsgnotfount = 4815;
  1108. /**
  1109. * 申请信息已经处理过了
  1110. */
  1111. const err_guild_applymsgdealed = 4816;
  1112. /**
  1113. * 玩家不存在
  1114. */
  1115. const err_user_no = 4817;
  1116. /**
  1117. * 无权限
  1118. */
  1119. const err_guild_nopermission = 4818;
  1120. /**
  1121. * 副会长名额已满
  1122. */
  1123. const err_guild_viceChairmanFull = 4819;
  1124. // /**
  1125. // * 操作码非法
  1126. // */
  1127. // const err_msg_cmd = 4820;
  1128. /**
  1129. * 徽章不能为null
  1130. */
  1131. const err_guild_imgEmputy = 4821;
  1132. /**
  1133. * 不能删除会长
  1134. */
  1135. const err_guild_cannotfireychairman = 4822;
  1136. /**
  1137. * 下一任会长必须是本公会的会员
  1138. */
  1139. // const err_guild_lastchairmanidnoexist = 4823;
  1140. /**
  1141. * 玩家已经是该职位
  1142. */
  1143. const err_guild_positionconflict = 4824;
  1144. /**
  1145. * 干部名额已满
  1146. */
  1147. const err_guild_OfficermanFull = 4825;
  1148. /**
  1149. * 没有限权设置此职位
  1150. */
  1151. const err_guild_cannotsetpositioncon = 4826;
  1152. /**
  1153. * 申请信息已经存在请稍候在申请
  1154. */
  1155. const err_guild_applymsgalwaysexist = 4827;
  1156. /**
  1157. * 申请信息被拒接
  1158. */
  1159. const err_guild_applymsgrejected = 4828;
  1160. /**
  1161. * 会长登陆时间信息发生改变无法弹劾,请刷新数据
  1162. */
  1163. const err_guild_notsatisfiedaccusecondition = 4829;
  1164. /**
  1165. * 不在弹劾有效时间内
  1166. */
  1167. const err_guild_noaccusevalidtimeperiod = 4830;
  1168. /**
  1169. * 弹劾 冷却中请稍候在弹劾
  1170. */
  1171. const err_guild_accusecooling = 4831;
  1172. /**
  1173. * 不允许申请加入该公会
  1174. */
  1175. const err_guild_noallowaddguild = 4832;
  1176. /**
  1177. * 会长没有被弹劾
  1178. */
  1179. const err_guild_chairmannoaccused = 4833;
  1180. /**
  1181. * 不允许反复弹劾
  1182. */
  1183. const err_guild_noallowagainaccuse = 4834;
  1184. /**
  1185. * 请求捐献数据不能为null
  1186. */
  1187. const err_guild_requestdonatecannotnull = 4835;
  1188. /**
  1189. * 请求捐献 时间不到
  1190. */
  1191. const err_guild_lessthannextrequestdonate = 4836;
  1192. /**
  1193. * 没有卡牌常量数据
  1194. */
  1195. const err_guild_nosegment = 4837; //这个暂时用着,卡牌那应该有这个错误码
  1196. /**
  1197. * 不能请求该类型的卡牌
  1198. */
  1199. const err_guild_thiscardcannotrequestordonate = 4838; //这个暂时用着,卡牌那应该有这个错误码
  1200. /**
  1201. * 请求卡牌数量过多
  1202. */
  1203. const err_guild_requestcardnumtomuch = 4839; //这个暂时用着,卡牌那应该有这个错误码
  1204. /**
  1205. * 玩家没有足够的卡牌可以捐献
  1206. */
  1207. const err_guild_noenoughcardinfo = 4840; //这个暂时用着,卡牌那应该有这个错误码
  1208. /**
  1209. * 卡牌类型不一致
  1210. */
  1211. const err_guild_cardtypeinconformity = 4841;
  1212. /**
  1213. * 今天捐献卡牌数量已经达到最大值
  1214. */
  1215. const err_guild_donatecardnumreachlimit = 4842;
  1216. /**
  1217. * 已经超过捐献时间无法捐献
  1218. */
  1219. const err_guild_overdonatetime = 4843;
  1220. /**
  1221. * 玩家背包中没有该类型的碎片
  1222. */
  1223. const err_guild_usersegementnothechip = 4844;
  1224. /**
  1225. * 英雄合成碎片与参数id不一致
  1226. */
  1227. const err_guild_herochiptypeinconformity = 4846;
  1228. /**
  1229. * 不存在该英雄
  1230. */
  1231. const err_guild_nohero = 4847;
  1232. /**
  1233. * 该贡献度礼包没有开放
  1234. */
  1235. const err_guild_contributionGiftnoopen = 4848;
  1236. /**
  1237. * 该公会钻石礼包没有开放
  1238. */
  1239. const err_guild_cashGiftnoopen = 4849;
  1240. /**
  1241. * 贡献度不够
  1242. */
  1243. const err_guild_contributionnosatisfy = 4850;
  1244. /**
  1245. * 缺少礼包常量数据
  1246. */
  1247. const err_guild_noguildgift = 4851;
  1248. /**
  1249. * 公会消息没有该卡牌的信息
  1250. */
  1251. const err_guild_guildjournalnothechipinfo = 4852;
  1252. /**
  1253. * 公会邮件内容不能为null
  1254. */
  1255. const err_guild_mailcontentcannotbenull = 4853;
  1256. /**
  1257. * 公会公告编辑冷却时间中
  1258. */
  1259. const err_guild_AnnouncementEditCooling = 4854;
  1260. /**
  1261. * 公会战 已经存在邀请数据,不能再次邀请
  1262. */
  1263. const err_guild_fightInvitealreadyexisted = 4855;
  1264. /**
  1265. * 公会战 邀请信息不存在
  1266. */
  1267. const err_guild_fightInvitenoexisted = 4856;
  1268. /**
  1269. * 公会战 在战斗中
  1270. */
  1271. const err_guild_fighting = 4857;
  1272. /**
  1273. * 公会战 在战斗中
  1274. */
  1275. const err_guild_applyconditionnoenough = 4858;
  1276. // </editor-fold>
  1277. //
  1278. // <editor-fold defaultstate="collapsed" desc=" 商城错误码 49xx">
  1279. /**
  1280. * 限购礼包-购买数量已达上限
  1281. */
  1282. const shop_limit_max = 4901;
  1283. /**
  1284. * 月卡已购买,失效前不可再次购买
  1285. */
  1286. const shop_monthlyvip_buyed = 4902;
  1287. /**
  1288. * 每日特惠奖励不能重复领取
  1289. */
  1290. const shop_daliySpecialRewardNotRepeat = 4903;
  1291. /**
  1292. * 首充奖励不能重复领取
  1293. */
  1294. const shop_firstRechargeNotRepeat = 4904;
  1295. /**
  1296. * 充值返利奖励不能重复领取
  1297. */
  1298. const shop_RechargeRebateRewardNotRepeat = 4905;
  1299. /**
  1300. * 不足
  1301. */
  1302. const shop_RechargeRebateRmbNotEnough = 4906;
  1303. /*
  1304. * 不是免费领取的礼包
  1305. */
  1306. const shop_limit_NotFree = 4907;
  1307. /*
  1308. * 超时
  1309. */
  1310. const shop_limit_TsMax = 4908;
  1311. // </editor-fold>
  1312. // <editor-fold defaultstate="collapsed" desc=" 学院错误码 51xx">
  1313. /**
  1314. * 不存在该任务卡
  1315. */
  1316. const college_notExistTaskCard = 5101;
  1317. /**
  1318. * 任务卡状态错误
  1319. */
  1320. const college_TaskCardStateError = 5102;
  1321. /**
  1322. * 一个年级下的课程数量错误
  1323. */
  1324. const college_courseNumError = 5103;
  1325. /**
  1326. * 一个课程下的任务卡数量错误
  1327. */
  1328. const college_taskCardNumError = 5104;
  1329. /**
  1330. * 学院积分奖励不能重复领取
  1331. */
  1332. const college_taskScoreRewardRepeatReceive = 5105;
  1333. /**
  1334. * 学院课程奖励不能重复领取
  1335. */
  1336. const college_CourseRewardRepeatReceive = 5106;
  1337. /**
  1338. * 没有解锁
  1339. */
  1340. const college_CourseNotUnlocked = 5107;
  1341. // </editor-fold>
  1342. //
  1343. // <editor-fold defaultstate="collapsed" desc="地图错误码52xx">
  1344. //
  1345. /**
  1346. * 地图-目的地据点尚未解锁
  1347. */
  1348. const map_NotUnlocked = 5201;
  1349. /**
  1350. * 地图-目的地据点已经解锁
  1351. */
  1352. const map_Unlocked = 5202;
  1353. // </editor-fold>
  1354. //
  1355. // <editor-fold defaultstate="collapsed" desc=" 反射方法 ">
  1356. /**
  1357. * 辅助方法, 将所有错误码信息转换到CSV文本中.
  1358. * 用法: 先在本文件中用ctrl + H 全部替换掉 'c onst ' -> 's tatic $'
  1359. * 然后再调用本方法,即可在同目录下生成ErrCode.txt, 里面包含了所需信息.
  1360. * @throws \Exception
  1361. * @author gwang
  1362. */
  1363. static function L() {
  1364. $class = new \ReflectionClass(__CLASS__); # 建立这个类的反射对象
  1365. $properties = $class->getProperties(\ReflectionProperty::IS_STATIC); # 拉取所有静态属性
  1366. $fileName = __DIR__ . "/ErrCode.txt"; # 输出文件名
  1367. $fd = fopen($fileName, "w");
  1368. if (false === $fd) { # 打开文件失败
  1369. throw new \Exception("打开$fileName 失败");
  1370. }
  1371. foreach ($properties as &$p) {
  1372. $d = preg_replace('/[\*|\/|\s+]/', '', $p->getDocComment()); # 处理下注释
  1373. $type = (strpos($p->getName(), 'err') === false ? 0 : 1); # errorType: 0 继续, 1 重启
  1374. $n = fputs($fd, $p->getName() . ";" . $p->getValue() . ";$type;$d" . PHP_EOL); # 写入文件
  1375. if (false === $n) { # 写入时失败
  1376. throw new Exception("写入$fileName 时失败");
  1377. }
  1378. }
  1379. fclose($fd);
  1380. }
  1381. /**
  1382. * 辅助方法, 将所有错误码信息转换到CS文件中.
  1383. * 用法: 先在本文件中用ctrl + H 全部替换掉 'c onst ' -> 's tatic $'
  1384. * 然后再调用本方法,即可在同目录下生成ErrCode.cs, 里面包含了所有错误信息.
  1385. * @throws \Exception
  1386. * @author gwang
  1387. */
  1388. static function M() {
  1389. $class = new \ReflectionClass(__CLASS__); # 建立这个类的反射对象
  1390. $properties = $class->getProperties(\ReflectionProperty::IS_STATIC); # 拉取所有静态属性
  1391. $fileName = __DIR__ . "/ErrCode.cs"; # 输出文件名
  1392. $fd = fopen($fileName, "w");
  1393. if (false === $fd) { # 打开文件失败
  1394. throw new \Exception("打开$fileName 失败");
  1395. }
  1396. $classHead = <<<HEAD
  1397. /// <summary>
  1398. /// 错误码
  1399. /// </summary>
  1400. class ErrCode
  1401. {
  1402. HEAD;
  1403. $classEnd = <<<END
  1404. }
  1405. END;
  1406. $cst = 'const';
  1407. fputs($fd, $classHead); # 类头
  1408. foreach ($properties as &$p) {
  1409. $d = preg_replace('/[\*|\/|\s+]/', '', $p->getDocComment()); # 提取注释
  1410. $pname = $p->getName(); # 字段名称
  1411. $pvalue = $p->getValue(); # 错误码
  1412. $filed = <<<FILED
  1413. /// <summary>
  1414. /// {$d}
  1415. /// </summary>
  1416. public {$cst} int {$pname} = {$pvalue};
  1417. FILED;
  1418. $n = fputs($fd, $filed); # 写入错误编号
  1419. if (false === $n) { # 写入时失败
  1420. throw new Exception("写入$fileName 时失败");
  1421. }
  1422. }
  1423. fputs($fd, $classEnd); # 类尾
  1424. fclose($fd);
  1425. }
  1426. // </editor-fold>
  1427. }
  1428. //ErrCode::L();
  1429. //ErrCode::M();