syntax = "proto3";
option go_package = ".;pb";

enum ErrorCode {
  Success = 0;                  //成功
  NoFindService = 10;           //没有找到远程服务器
  NoFindServiceHandleFunc = 11; //远程服务器未找到执行方法
  RpcFuncExecutionError = 12;   // Rpc方法执行错误
  CacheReadError = 13;          //缓存读取失败
  SqlExecutionError = 14;       //数据库执行错误
  ReqParameterError = 15;       //请求参数错误
  SignError = 16;               //签名错误
  InsufficientPermissions = 17; //权限不足
  NoLogin = 18;                 //未登录
  UserSessionNobeing = 19;      //用户不存在
  StateInvalid = 20;            //无效状态
  DBError = 21;                 //数据库操作失败
  SystemError = 22;             //通用错误
  Exception = 100;              //程序执行异常
  Unknown = 101;                //未知错误
  ResNoEnough = 102;            //资源不足
  ConfigurationException = 103; //配置异常
  ConfigNoFound = 104;          //配置未找到

  // user
  SecKeyInvalid = 1000;   //秘钥无效
  SecKey = 1001;          //秘钥格式错误
  BindUser = 1002;        //用户绑定错误
  GoldNoEnough = 1003;    // 金币不足
  DiamondNoEnough = 1004; // 钻石不足
  RoleCreated = 1005;     //已创角
  NameExist = 1006;       //昵称已存在

  // friend
  FriendNotSelf = 1100;         //不能是自己
  FriendSelfMax = 1101;         //超出好友最大数量
  FriendTargetMax = 1102;       //超出目标好友最大数量
  FriendSelfNoData = 1103;      //无好友记录
  FriendTargetNoData = 1104;    //无目标好友记录
  FriendYet = 1105;             //已是好友
  FriendApplyYet = 1106;        //已申请该好友
  FriendSelfBlackYet = 1107;    //已在自己黑名单中
  FriendTargetBlackYet = 1108;  //已在对方的黑名单中
  FriendApplyError = 1109;      //申请失败
  FriendBlackMax = 1110;        //黑名单最大数量
  FriendSearchNameEmpty = 1111; //查询昵称为空

  // item
  ItemsNoEnough = 1200;        //背包物品不足
  ItemsNoFoundGird = 1201;     //背包未找到物品格子
  ItemsGridNumUpper = 1202;    //背包格子数量已达上限
  ItemsGirdAmountUpper = 1203; //背包格子容量已达上限

  // hero
  HeroNoExist = 1300;         //英雄不存在
  HeroNoEnough = 1301;        //英雄数量不足
  HeroMaxLv = 1302;           //英雄达到最大等级
  HeroInitCreat = 1303;       //初始化英雄
  HeroColorErr = 1304;        // 品质不匹配
  HeroSkillUpErr = 1305;      // 技能升级失败
  HeroMaxResonate = 1306;     // 达到最大共鸣次数
  HeroNoResonate = 1307;      // 没有共鸣
  HeroNotNeedResonate = 1308; // 不需要重置共鸣
  HeroNoEnergy = 1309;        // 没有能量点数
  HeroCreate = 1310;          // 创建卡失败
  HeroEquipUpdate = 1311;     // 更新装备失败
  HeroMaxAwaken = 1312;       // 达到最大觉醒等级
  HeroIsLock = 1313;          // 英雄被锁定不能被消耗

  // equipment
  EquipmentOnFoundEquipment = 1400; // 未找到武器
  EquipmentLvlimitReached = 1401;   // 武器等级已达上限
  // mainStory
  StoryNotFindChapter = 1500; // 没有找到主线关卡信息
  StoryIDFailed = 1501;       // 关卡ID 错误

  // task
  TaskInit = 1600;           //初始化失败
  TaskReset = 1601;          //重置任务失败
  TaskHandle = 1602;         //任务处理失败
  TaskReceived = 1603;       //已领取
  TaskActiveInit = 1606;     //初始化活跃度失败
  TaskActiveNofound = 1604;  //未找到用户活跃度配置
  TaskActiveNoenough = 1605; //活跃值未达标
}