/**
* 未知原因错误
*/
const err_unknownn = 1001;
/**
* 内部错误
*/
const err_innerfault = 1002;
/**
* 数据库操作失败
*/
const err_db = 1003;
/**
* 内存操作失败
*/
const err_mem = 1004;
/**
* 错误: 断言失败
*/
const err_assert = 1005;
/**
* 警告: 断言失败
*/
const msg_assert = 1006;
/**
* 消息内容非法(不满足tk校验的条件)
*/
const err_illegal = 1011;
/**
* 消息内容缺少校验值
*/
const err_signo = 1012;
/**
* 消息超时
*/
const err_outtime = 1021;
/**
* Just重试
*/
const err_retry = 1024;
/**
* 客户端版本过低-整包更
*/
const clientversionlow_err = 1031;
/**
* 客户端版本过低-增量更
*/
const clientnewversion_msg = 1032;
/**
* 客户端打印信息并且退出
*/
const clientPrintMsg_Halt = 1033;
/**
* 功能码非法
*/
const ope_err = 1210;
/**
* 操作码非法
*/
const cmd_err = 1211;
/**
* 参数非法
*/
const paras_err = 1212;
/**
* 参数不足
*/
const parasnotenough_msg = 1213;
/**
* 内容包含敏感词
*/
const sensword_msg = 1234;
/**
* 服务器正在维护中
*/
const err_server_maintaining = 1301;
/**
* 服务器正在升级,请过会儿再来。
*/
const err_server_updating = 1302;
/**
* 已经在其他地方登录
*/
const err_anotherlogin = 1303;
/**
* 功能暂未开放
*/
const function_notopen_msg = 1801;
/**
* 方法尚未实现
*/
const err_method_notimplement = 1802;
/**
* 方法已过时, 废弃的.
*/
const err_method_obsoleted = 1803;
/**
* 游戏常量数据错误
*/
const err_const_no = 1825;
//
//
// //
/**
* 尚未首付
*/
const pay_firstpayno_err = 8801;
/**
* 已经领取首付
*/
const pay_firstpaygetted = 8802;
/**
* 系统繁忙
*/
const pay_systembusy_err = 8803;
/**
* 不是黄钻或已经领取黄钻礼包
*/
const pay_vipnewerno = 8804;
/**
* amt数值小于等于0
*/
const pay_m_amtzero_err = 8805;
/**
* 价格异常
*/
const pay_price_err = 8806;
/**
* 支付类型异常
*/
const pay_m_type_err = 8807;
/**
* 商品常量数据错误-货物内容
*/
const pay_shopItem_cosnt_goods_err = 8808;
/**
* 商城 已达刷新次数上限
*/
const pay_refresh_times = 8809;
/**
* 神秘商城 - 购买次数已达上限
*/
const pay_secretshop_buytimes = 8810;
/**
* 神秘商城 - 物品数据错误
*/
const pay_secretshop_noitem_err = 8811;
/**
* 充值 - 订单不存在
*/
const pay_order_no = 8812;
/**
* 充值 - 付款状态尚未同步 请稍后重新查询...
*/
const pay_order_paystatus = 8813;
/**
* 充值 - 此订单已经发货, 无需重复请求
*/
const pay_order_drawed = 8814;
/**
* 充值 - 订单uid不符
*/
const pay_order_uid = 8815;
/**
* 订单号错误
*/
const pay_order_id = 8816;
/**
* 订单 - 道具id错误
*/
const pay_order_product_id = 8817;
/**
* 支付失败(无发货逻辑)
*/
const pay_fail_nologic = 8818;
/**
* 不能重复购买
*/
const pay_repeatbuy = 8819;
/**
* 充值奖励重复领取
*/
const pay_repeatReceive = 8820;
/**
* 没有到充值奖励领取时间
*/
const pay_rewardReceive_ts_limit = 8821;
/**
* 累计元宝数量不足无法领取奖励
*/
const pay_accumulateYuanBaoNotEnough = 8822;
/**
* 神秘商城 - 免费刷新时间未到
*/
const pay_secretshopt_freeRefresh_Time = 8823;
/**
* 支付失败(发货逻辑)
*/
const pay_fail_logic = 8824;
/**
* 支付失败(数据库写入)
*/
const pay_fail_db = 8825;
//
//
//
/**
* 金币不足
*/
const notenough_gold_msg = 3014;
/**
* 元宝不足
*/
const notenough_cash_msg = 3015;
/**
* 友情点不足
*/
const notenough_friendshippoint = 3016;
/**
* 玩家荣誉值不足[荣誉值兑换]
*/
const notenough_honour = 3032;
/**
* 元宝不足
*/
const notenought_yuanbao = 3040;
/**
* 玩家体力值不足
*/
const notenough_tili = 3046;
/**
* 晶石不足
*/
const notenough_spar = 3047;
/**
* 资源点不足
*/
const notenough_resPoint = 3048;
/**
* 道具数量不足
*/
const notenough_item = 3049;
//
//
//
/**
* 玩家未登录
*/
const user_login_err = 3101;
/**
* 玩家不存在
*/
const user_no_err = 3102;
/**
* 玩家数据损坏
*/
const user_data_broken_err = 3103;
/**
* 连续登录天数不够
*/
const user_contigiftno_msg = 3104;
/**
* 已经领取连续登录礼包
*/
const user_contigiftfalse_msg = 3105;
/**
* 设置新手引导进度失败
*/
const user_settutorialscompletedfail_err = 3106;
/**
* 玩家等级不足
*/
const user_levelnotenough_msg = 3107;
/**
* 找不到玩家的交互体数据
*/
const user_interact_no_err = 3108;
/**
* 找不到玩家的分区记录
*/
const user_zoneinfo_no_err = 3109;
/**
* 玩家昵称已经存在,请换一个再试
*/
const user_nicknameexist = 3110;
/**
* 没有这种奖励类型
*/
const user_reward_typeno = 3031;
//
//
// //
/**
* 没有玩家关卡信息
*/
const gate_NoUserGateInfo = 3201;
/**
* 当前关卡没有解锁
*/
const gate_GateNoUnlock = 3202;
/**
* 奖励已经被领取
*/
const gate_GatePriceHasReceive = 3203;
/**
* 不能扫荡
*/
const gate_NoSweep = 3204;
/**
* 今日扫荡已达最大次数
*/
const gate_SweepMaxNum_limit = 3205;
/**
* 挑战关卡: 今日挑战次数已用完
*/
const tower_timeNo = 3210;
/**
* 挑战关卡: 今日技能免费刷新次数已经用完
*/
const tower_refreshNo = 3211;
/**
* 挑战关卡: 没有奖励
*/
const tower_rewardNo = 3212;
/**
* 挑战关卡: 起始层id有误
*/
const tower_layerNum = 3213;
/**
* 排行榜荣誉榜奖励已经领取
*/
const rankReward_HasReceive = 3214;
/**
* 没有达到解锁等级
*/
const evolve_canotUnlock_levelLimit = 3215;
/**
* 关卡没有被胜利通关
*/
const evolve_GateNoPass = 3216;
//
//
// //
/**
* 不存在该装备
*/
const user_store_NoEquip = 3301;
/**
* 背包
*/
const user_store_NoItem = 3302;
/**
* 宝石不能被镶嵌
*/
const user_store_GemCanotSet = 3303;
/**
* 不存在可以替换的宝石
*/
const user_store_NoExistGemReplace = 3304;
/**
* 同一件装备无法镶嵌多个技能相同的宝石
*/
const user_store_SameGemCanotEquip = 3305;
/**
* 合成宝石条件不足无法合成
*/
const user_store_GemCanotCompose = 3306;
/**
* 背包不存在该宝石
*/
const user_store_NotExistGem = 3307;
/**
* 洗练石不足
*/
const user_store_XilianStoneNoEnough = 3308;
/**
* 没有找到对应词条信息
*/
const user_store_NoFindPredicate = 3309;
/**
* 装备等级已经达到最大值
*/
const user_store_equipLevelLimit = 3310;
/**
* 不存在该装备
*/
const user_store_NotExistEquip = 3311;
/**
* 装备部位与宝石部位不匹配
*/
const user_store_PositionNotFit = 3312;
/**
* 装备材料类型错误
*/
const user_store_equipMaterialTypeErr = 3313;
/**
* 装备材料品阶错误
*/
const user_store_equipMaterialQualErr = 3314;
/**
* 装备材料数量错误
*/
const user_store_equipMaterialNumErr = 3315;
/**
* 装备已经在最低等级
*/
const user_store_equip_minlevel = 3316;
/**
* 装备已经在最低品阶
*/
const user_store_equip_minQual = 3317;
/**
* 装备合成材料不能参与此次合成
*/
const user_store_equip_composeMaterialErr = 3318;
/**
* 该装备已达最高品阶
*/
const user_store_equip_qualMaxLimit = 3319;
//
//
// //
/**
* 商品不能重复购买
*/
const user_shop_NotRepeatBuy = 3401;
/**
* 购买次数已达最大值
*/
const user_shop_LimitNum = 3402;
/**
* 活动过期
*/
const user_shop_activeExpire = 3403;
/**
* 免费次数已达上限
*/
const user_shop_FreeNumLimit = 3404;
/**
* 购买次数已达上限
*/
const user_shop_buyTiliNumLimit = 3405;
/**
* 广告购买体力次数已达上限
*/
const user_shop_GuanggaoGetTiliNumLimit = 3406;
/**
* 广告获得次数已达上限
*/
const user_shop_GuanggaoFreeNumLimit = 3407;
/**
* 倒计时时间限制暂时无法购买
*/
const user_shop_DownTsLimit = 3408;
//
//
// //
/**
* 奖励已经领过
*/
const active_hasgetted = 3501;
/**
* 无效的时间内不能领取奖励
*/
const active_day7_expired = 3502;
/*
* 不存在活动配置信息
*/
const active_const_no_err = 3503;
/**
* 活动 - 激活码 无效
*/
const active_activecode_format = 3504;
/**
* 活动 - 激活码 渠道错误.
*/
const active_activecode_plat = 3505;
/**
* 激活码礼包已经过期
*/
const active_activecode_outtime = 3506;
/**
* 活动 - 兑换码已经使用过了
*/
const active_activecode_used = 3507;
/**
* 活动 - 此活动尚未开放
*/
const active_time = 3508;
/**
* 抽奖次数非法
*/
const active_lotteryNumErr = 3509;
/**
* 抽奖次数已经用完
*/
const active_lotteryNumLimit = 3510;
/*
* 抽奖券数据错误
*/
const active_lotteryCostErr = 3511;
/**
* 寻宝券数量充足不需要兑换
*/
const active_lottery_unwantedExchange = 3512;
/**
* 抽奖次数不足
*/
const active_lotteryNumNotEnough = 3513;
/**
* 兑换次数已经用完无法再次兑换
*/
const active_lotteryExchangeNumLimit = 3514;
/**
* 消耗体力值不足
*/
const active_costTiliNotEnough = 3515;
/**
* 活跃点数量不足
*/
const active_pointNotEnough = 3516;
//
//
// //
/**
* 任务不存在
*/
const task_NoExist = 3601;
/**
* 不能领取该任务奖励
*/
const task_CanotPriceReviced = 3602;
/**
* 任务奖励不能重复领取
*/
const task_PriceRepeatReviced = 3603;
/**
* 活跃点宝箱奖励领取条件不达标无法领取
*/
const task_CanotReviced_ActivePointBox = 3604;
/**
* 活跃点宝箱奖励重复领取
*/
const task_RepeatReviced_ActivePointBox = 3605;
/**
* 限时活动未开启不能领取任务奖励
*/
const task_NotOpen_Day7Happy = 3606;
/**
* 时间校验错误请检查当前时间是否
*/
const task_DownTsLimit = 3607;
//
//
//
/**
* 邮件 - 错误的邮件id
*/
const email_wrongid = 3701;
/**
* 邮件 - 未找到指定邮件
*/
const email_not_found = 3702;
/**
* 邮件 - 不存在附件
*/
const email_no_appendix = 3703;
/**
* 邮件 - 附件已领取
*/
const email_appendix_drawed = 3704;
//
//
//
/**
* 辅助方法, 将所有错误码信息转换到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__ . "/ErrCode.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);
}
/**
* 辅助方法, 将所有错误码信息转换到CS文件中.
* 用法: 先在本文件中用ctrl + H 全部替换掉 'c onst ' -> 's tatic $'
* 然后再调用本方法,即可在同目录下生成ErrCode.cs, 里面包含了所有错误信息.
* @throws \Exception
* @author gwang
*/
static function M() {
$class = new \ReflectionClass(__CLASS__); # 建立这个类的反射对象
$properties = $class->getProperties(\ReflectionProperty::IS_STATIC); # 拉取所有静态属性
$fileName = __DIR__ . "/ErrCode.cs"; # 输出文件名
$fd = fopen($fileName, "w");
if (false === $fd) { # 打开文件失败
throw new \Exception("打开$fileName 失败");
}
$classHead = <<
/// 错误码
///
class ErrCode
{
HEAD;
$classEnd = <<getDocComment()); # 提取注释
$pname = $p->getName(); # 字段名称
$pvalue = $p->getValue(); # 错误码
$filed = <<
/// {$d}
///
public {$cst} int {$pname} = {$pvalue};
FILED;
$n = fputs($fd, $filed); # 写入错误编号
if (false === $n) { # 写入时失败
throw new Exception("写入$fileName 时失败");
}
}
fputs($fd, $classEnd); # 类尾
fclose($fd);
}
//
}
//ErrCode::L();
//ErrCode::M();