/** * 领取首付礼包 */ const cmd_pay_getfirstpaygift = 8802; // //---------- 移动端 支付API 操作码 ---- /** * 【移动端】购买物品 */ const cmd_mpay_pay = 8807; /** * 【移动端】查询游戏币余额 */ const cmd_mpay_get_balance = 8808; /** * 【移动端】购买神秘商城物品 */ const cmd_mpay_buyDynamic = 8809; /** * 【移动端】刷新神秘商城物品 */ const cmd_mpay_getDynamic = 8810; /** * 【移动端】自助检查异常订单 */ const cmd_mpay_selfCheckOrders = 8811; /** * 【移动端】查询付费记录 */ const cmd_mpay_getPayRecords = 8812; /** * 临时--正式的要根据具体功能实现 */ const cmd_mpay_PayDeliverGoods = 8813; /** * 充值领取奖励 */ const cmd_mpay_UserRechargeDrawPrize = 8814; /** * 新的首冲功能 */ const cmd_mpay_NewFirstRecharge = 8815; // // // // // // // /** * 获取分区列表 */ const cmd_user_getzonelist = 6000; /** * 玩家登录指令 */ const cmd_user_loginuserinfo = 6001; /** * 常量信息指令 */ const cmd_user_gameconstinfo = 6002; /** * 注册新用户 */ const cmd_user_registerNewRole = 6006; // // /** * 辅助方法, 将所有错误码信息转换到CSV文本中. * 用法: 先在本文件中用ctrl + H 全部替换掉 'c onst ' -> 's tatic $' * 然后再调用本方法,即可在同目录下生成ErrCode.txt, 里面包含了所需信息. * @throws \Exception * @author gwang */ static function L() { $class = new \ReflectionClass(__CLASS__); # 建立这个类的反射对象 $properties = $class->getProperties(\ReflectionProperty::IS_STATIC); # 拉取所有静态属性 $fileName = __DIR__ . "/" . str_replace('\\', '.', __CLASS__) . ".txt"; # 输出文件名 $fd = fopen($fileName, "w"); if (false === $fd) { # 打开文件失败 throw new \Exception("打开$fileName 失败"); } foreach ($properties as &$p) { $d = preg_replace('/[\*|\/|\s+]/', '', $p->getDocComment()); # 处理下注释 $type = (strpos($p->getName(), 'err') === false ? 0 : 1); # errorType: 0 继续, 1 重启 $n = fputs($fd, $p->getName() . ";" . $p->getValue() . ";$type;$d" . PHP_EOL); # 写入文件 if (false === $n) { # 写入时失败 throw new Exception("写入$fileName 时失败"); } } fclose($fd); } // }