export const TURBO_CORE_URL = 'https://coresrv.tgamebox.cn';
export const APP_ID = 'AXaXmIHPs9eONvzrBesD8aSKQNXYdALF';
export const TURBO_PARM_SECRET = 'ipqw05du6ob4x130w89t31yrqd6xs005zzltcmg2zpqnvrjp1s';

export const ENCRYPT_IV = 'f7182j5f04e377ux';
export const ENCRYPT_KEY = 'fiqaxijabbantusmprc234fj';

export const TEL_ENCRYPT_IV = 'f7182j5f04e377ux';
export const TEL_ENCRYPT_KEY = 'fiqaxijabbantusm';

export const DEBUG_MAGIC_WORD = 'zyz666server518';

export const AUTH_SMS_CNT_PER_DAY = 8;

export const ADULT_AGE = 18;
export const GUEST_MAX_TIME = 60 * 60; // 游客体验时间
export const TEEN_HOLIDAY_MAX_TIME = 3 * 60 * 60; // 未成年人节假日每天3小时
export const TEEN_DAILY_MAX_TIME = 1.5 * 60 * 60; // 未成年人工作日每天1.5小时
export const GUEST_DAY = 15; // 同一设备15天内不得重复体验游客模式

export const REFRESH_TIME = 5; // 统一一天刷新时间
export const REF_CIRCLE_MAIL_TIME = 6; // 统一一天刷新定期邮件时间
export const PUSH_BATCH = 100; // 推送分批人数
export const PUSH_INTERVAL = 5 * 1000; // 分批时间，5秒一批

export enum TIME_OUTPUT_TYPE {
    DATE = 1,
    STAMP_10 = 2,
    STAMP_13 = 3
}

export const COUNTER = {
    UID: { name: 'uid', def: 1 },
    GMUID: { name: 'gmuid', def: 1 },
    API: { name: 'api', def: 1 },
    GM_GROUP: { name: 'gmgroup', def: 1 },
    HID: { name: 'hid', def: 10000 },
    EID: { name: 'eid', def: 1 },
    JEWEL_ID: { name: 'jid', def: 1 },
    ROLE: { name: 'role', def: 1 },
    ACTIVITY: { name: 'aid', def: 1 },
    ACTIVITY_GROUP: { name: 'agid', def: 1 },
    SERVER_STATEGY: { name: 'stategy', def: 1 },
    SERVER_GROUP: { name: 'group', def: 1 },
    SERVER_BY_TYPE: { name: 'serverby', def: 1 },
    SERVER: { name: 'server', def: 1 },
    ACTIVITY_GROUP_TYPE: { name: 'actgrptype', def: 1 },
    NOTICE: { name: 'notice', def: 1 },
    GIFT_CODE: { name: 'giftCode', def: 1 },
    PVP_SEASON_NUM: { name: 'pvpSeason', def: 1 },
    REGION: { name: 'region', def: 1 },
    GATE_ACTIVITY: { name: 'guildAct', def: 1 },
    CITY_ACTIVITY: { name: 'cityAct', def: 1 },
    RACE_ACTIVITY: { name: 'raceAct', def: 1 },
    HIDDEN_DATA: { name: 'hiddendata', def: 1 },
    ARTIFACT_ID: { name: 'artid', def: 1 },
    GVG_CONFIG: { name: 'gvg', def: 1 },
};

export const DEFAULT_HEROES = [19, 53,];
// export const DEFAULT_HEROES = [19, 53, 46, 40, 22, 56, 32, 28, 18];
export const DEFAULT_ITEMS = [
    // { "id": 11004, "count": 150000 },
    // { "id": 11013, "count": 99 },
    // { "id": 11014, "count": 99 },
    // { "id": 11015, "count": 99 },
    // { "id": 11003, "count": 2000 },
    // { "id": 17001, "count": 500 },
    // { "id": 17002, "count": 99 },
    // { "id": 17003, "count": 500 },
    // { "id": 17004, "count": 500 },
    // { "id": 17005, "count": 500 },
    // { "id": 17006, "count": 500 },
    // { "id": 17007, "count": 500 },
    // { "id": 17008, "count": 500 },
    // { "id": 17009, "count": 500 },
    // { "id": 17010, "count": 500 },
    // { "id": 17011, "count": 500 },
    // { "id": 17012, "count": 500 },
    // { "id": 17013, "count": 500 },
    // { "id": 17014, "count": 500 },
    // { "id": 17015, "count": 500 },
    // { "id": 17016, "count": 500 },
    // { "id": 17017, "count": 500 },
    // { "id": 17018, "count": 500 },
    // { "id": 17019, "count": 500 },
    // { "id": 17020, "count": 500 },
    // { "id": 17021, "count": 500 },
    // { "id": 17022, "count": 500 },
    // { "id": 17023, "count": 500 },
    // { "id": 17024, "count": 500 },
    // { "id": 17025, "count": 500 },
    // { "id": 17026, "count": 500 },
    // { "id": 17027, "count": 500 },
    // { "id": 17028, "count": 500 },
    // { "id": 17029, "count": 500 },
    // { "id": 17030, "count": 500 },
    // { "id": 17031, "count": 500 },
    // { "id": 17032, "count": 500 },
    // { "id": 17033, "count": 500 },
    // { "id": 17037, "count": 500 },
    // { "id": 17038, "count": 500 },
    // { "id": 17039, "count": 500 },
    // { "id": 17040, "count": 500 },
    // { "id": 17041, "count": 500 },
    // { "id": 17042, "count": 500 },
    // { "id": 17043, "count": 500 },
    // { "id": 17044, "count": 500 },
    // { "id": 17045, "count": 500 },
    // { "id": 17046, "count": 500 },
    // { "id": 17047, "count": 500 },
    // { "id": 17048, "count": 500 },
    // { "id": 17049, "count": 500 },
    // { "id": 17050, "count": 500 },
    // { "id": 17051, "count": 500 },
    // { "id": 17052, "count": 500 },

    // { "id": 21018, "count": 3000 },
    // { "id": 21019, "count": 3000 },
    // { "id": 21022, "count": 3000 },
    // { "id": 21028, "count": 3000 },
    // { "id": 21040, "count": 3000 },
    // { "id": 21053, "count": 3000 },
    // { "id": 21056, "count": 3000 },
    // { "id": 21032, "count": 3000 },
    // { "id": 21046, "count": 3000 },

    // { "id": 42176, "count": 200 },
    // { "id": 42175, "count": 200 },
    // { "id": 42126, "count": 200 },
    // { "id": 50059, "count": 1 },
    // { "id": 50060, "count": 1 },
    // { "id": 50061, "count": 1 },
    // { "id": 50062, "count": 1 },
    // { "id": 50089, "count": 1 },
    // { "id": 50090, "count": 1 },
    // { "id": 50091, "count": 1 },
    // { "id": 50107, "count": 1 },
    // { "id": 50108, "count": 1 },
    // { "id": 50109, "count": 1 },

    // { "id": 60001, "count": 500 },
    // { "id": 60002, "count": 100 },
    // { "id": 60004, "count": 100 },
    // { "id": 60005, "count": 100 },
    // { "id": 60006, "count": 100 },
    // { "id": 60007, "count": 100 },
    // { "id": 60008, "count": 88 },
    // { "id": 60009, "count": 88 },
    // { "id": 60011, "count": 88 },
    // { "id": 60012, "count": 88 },
    // { "id": 60013, "count": 88 },
    // { "id": 60014, "count": 88 },
    // { "id": 60015, "count": 88 },
    // { "id": 60016, "count": 88 },
    // { "id": 60017, "count": 88 },
    // { "id": 60018, "count": 888 },
    // { "id": 60019, "count": 888 },
    // { "id": 60021, "count": 888 },
    // { "id": 60033, "count": 888 },
    // { "id": 60034, "count": 888 },
    // { "id": 60037, "count": 88 },
    // { "id": 60038, "count": 88 },
    // { "id": 60039, "count": 100 },
    // { "id": 60041, "count": 100 },
    // { "id": 60042, "count": 88 },
    // { "id": 60043, "count": 88 },
    // { "id": 60044, "count": 88 },
    // { "id": 60051, "count": 100 },
    // { "id": 60054, "count": 100 },
    // { "id": 60055, "count": 88 },
    // { "id": 60056, "count": 88 },
    // { "id": 60059, "count": 88 },
    // { "id": 60060, "count": 88 },
];

export const DEFAULT_EQUIPS = [
    // { "id": 8, "count": 1 },
    // { "id": 25, "count": 1 },
    // { "id": 308, "count": 1 },
    // { "id": 408, "count": 1 },
    // { "id": 505, "count": 1 },
    // { "id": 607, "count": 1 },
    // { "id": 707, "count": 1 },
    // { "id": 2008, "count": 1 },
    // { "id": 2208, "count": 1 },
    // { "id": 3008, "count": 1 },
    // { "id": 3201, "count": 1 },
    // { "id": 3208, "count": 1 },
    // { "id": 4008, "count": 1 },
    // { "id": 2026, "count": 1 },
    // { "id": 2126, "count": 1 },
    // { "id": 2226, "count": 1 },
    // { "id": 3026, "count": 1 },
    // { "id": 3126, "count": 1 },
    // { "id": 3226, "count": 1 },
    // { "id": 4026, "count": 1 },
    // { "id": 4126, "count": 1 },
    // { "id": 5025, "count": 1 },
    // { "id": 5126, "count": 1 },
    // { "id": 6026, "count": 1 },
];
export const DEFAULT_GOLD = 0;
export const DEFAULT_COIN = 0;
export const DEFAULT_LV = 1;
export const DEFAULT_HERO_LV = 1;


export const FIX_SMS_CODE_TELS = ['18855953630', '13911134885', '15167549151', '15618654010', '15167549151', '18342915387', '15000250967'];

export enum REDIS_KEY {
    USER_INFO ="userInfo",  // 玩家缓存信息
    TOWER_RANK ="towerRank", // 天梯排行榜
    COM_TEAM_SEARCH_PRE ='comTeamSerQ', // 匹配中的玩家，按品质分
    COM_TEAM_CREATED_TEAM ='comTeamCreate', // 匹配中的队伍，按品质分
    PVP_RANK ="pvpRank", // pvp排行榜
    GUILD_INFO ="guildInfo", // 公会信息
    GUILD_ACTIVE_RANK ="guildActiveRank", // 公会周活跃排行榜
    SERVER ='server',                // 服务器列表
    SERVER_OPEN_TIME = 'serverOpenTime', // 服务器开服时间
    ONLINE_USERS ='onlineUsers',        // 在线用户情况
    ONLINE_TIME ='onlineTime',          // 玩家在线时间
    ONLINE_CNT ='onlineCnt',          // 在线次数
    CHANNEL_SERVERS ='chat:channelServers',        // 渠道对应的 chat 服务器 Id,
    USER_GATE_ACTIVITY ='usrGateAct',     // 蛮夷入侵玩家排行
    GATE_ACTIVITY ='gateAct',             // 蛮夷入侵军团排行
    USER_CITY_ACTIVITY ='usrCityAct',     // 诸侯混战玩家排行
    CITY_ACTIVITY ='cityAct',             // 诸侯混战军团排行
    RACE_ACTIVITY ='raceAct',             // 粮草先行军团排行
    TOP_LINEUP_INFO ='topLineInfo',         // 最强阵容数据
    TOP_LINEUP_RANK ='topLineRank',        // 最强阵容排行
    TOP_HERO_RANK ='topHeroRank',          // 最强武将排行 
    HERO_INFO ='heroInfo',           // 最强武将信息
    HERO_NUM_RANK ='heroNum',            // 武将数量排行
    USER_LV ='usrLv',                  // 主公等级排行榜
    SUM_CE_RANK ='sumCeRank',          // 总战力排名
    DUNGEON_RANK ='dungeonRank',        // 秘境排名
    DUNGEON_LINEUP ='dungeonLineup',   // 秘境通关阵容
    MAIN_RANK ='mainRank',   // 主线通关排名
    MAIN_ELITE_RANK ='mainEliteRank',   // 精英通关排名
    GUILD_LV_RANK ="guildLvRank", // 公会等级排行榜
    HERO_RANK ="heroRank", // 武将排行榜
    SHOW_LINEUP ="showLineup",       // 展示阵容
    SYS_SERVER ='sysServer',           // 全服connector服
    PAY_CHANNEL = 'pay',                // 支付订阅频道
    REFUND_CHANNEL = 'refund',          // 退款频道
    TREAT_ROLE_CHANNEL = 'treatRole',   // 处理玩家账号名频道
    TREAT_GUILD_CHANNEL = 'treatGuild',  // 处理公会账号名频道
    GUILD_FUND = 'guildFund',     // 限时排行
    SUM_CE_SNAPSHOT = "sumCeTL", // 限时战力排行榜 
    TOP_LINE_SNAPSHOT = "topLineTL", // 限时战力排行榜 
    SURVEY_CHANNEL = 'survey',  // 文件频道
    USER_CHANNEL = 'userChannel', // 玩家登录频道
    USER_CODE = 'userCode',  // 玩家userCode对应roleId
    LADDER = 'ladder',       // 名将擂台
    LADDER_DEFCE = 'ladderDefCe',  // 名将擂台的防守战力
    GA_HISTORY_CITY = 'gaHisCity', // 诸侯混战打开过的城池页面
    GVG_VESTIGE_MEMBER = 'vestigeUsr', // 玩家一个遗迹的积分
    GVG_VESTIGE_MEMBER_ALL = 'vestigeUsrAll',  // 玩家所有遗迹积分
    GVG_VESTIGE_LEAGUE = 'vestigeLeague',  // 联军所有遗迹积分
    LEAGUE_INFO ="leagueInfo", // 联军信息
    GVG_BATTLE_RANK ="gvgBattleUsr", // 激战期个人排行榜
    GVG_BATTLE_LEAGUE_RANK = "gvgBattleLeague", // 激战期联军排行榜
    GVG_BATTLE_LEAGUE_RANK_BY_CITY = "gvgBattleLeagueByCity", // 激战期联军排行榜
    GVG_HISTORY_AREA ='gvgHisArea',        // gvg激战期玩家加入的区域
    GVG_HISTORY_AREA_TEAM ='gvgHisAreaTeam',        // gvg激战期玩家加入的区域
    GVG_HISTORY_CITY ='gvgHisCity',        // gvg激战期玩家进入的城池
}

// 各排行榜对应hash的key
export function getInfoKeyByRedisKey(redisKey: REDIS_KEY) {
    switch(redisKey) {
        case REDIS_KEY.TOWER_RANK:        // 天梯排行榜
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
        case REDIS_KEY.PVP_RANK:          // pvp排行榜
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
        case REDIS_KEY.TOP_LINEUP_RANK:   // 最强阵容排行
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [REDIS_KEY.TOP_LINEUP_INFO] };
        case REDIS_KEY.TOP_HERO_RANK:     // 最强武将排行 
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [REDIS_KEY.HERO_INFO] };
        case REDIS_KEY.HERO_NUM_RANK:     // 武将数量排行
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
        case REDIS_KEY.USER_LV:           // 主公等级排行榜
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
        case REDIS_KEY.SUM_CE_RANK:       // 总战力排名
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
        case REDIS_KEY.DUNGEON_RANK:      // 秘境排名
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [REDIS_KEY.DUNGEON_LINEUP] };
        case REDIS_KEY.MAIN_RANK:         // 主线通关排名
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
        case REDIS_KEY.MAIN_ELITE_RANK:   // 精英通关排名
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
        case REDIS_KEY.HERO_RANK:         // 武将排行榜
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [REDIS_KEY.HERO_INFO] };
  
        case REDIS_KEY.GUILD_ACTIVE_RANK: // 公会周活跃排行榜
            return { infoKey: REDIS_KEY.GUILD_INFO, extraKey: [] };
        case REDIS_KEY.GUILD_LV_RANK:     // 公会等级排行榜
            return { infoKey: REDIS_KEY.GUILD_INFO, extraKey: [] };
        case REDIS_KEY.GUILD_FUND:         // 军团资金
            return { infoKey: REDIS_KEY.GUILD_INFO, extraKey: [] };

        case REDIS_KEY.GATE_ACTIVITY:      // 蛮夷入侵军团排行
            return { infoKey: REDIS_KEY.GUILD_INFO, extraKey: [] };
        case REDIS_KEY.USER_GATE_ACTIVITY: // 蛮夷入侵玩家排行
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
        case REDIS_KEY.CITY_ACTIVITY:      // 诸侯混战军团排行
            return { infoKey: REDIS_KEY.GUILD_INFO, extraKey: [] };
        case REDIS_KEY.USER_CITY_ACTIVITY: // 诸侯混战玩家排行
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
        case REDIS_KEY.RACE_ACTIVITY:     // 粮草先行军团排行
            return { infoKey: REDIS_KEY.GUILD_INFO, extraKey: [] };

        case REDIS_KEY.SUM_CE_SNAPSHOT:   // 战力限时排行榜的快照
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
        case REDIS_KEY.TOP_LINE_SNAPSHOT:   // 战力限时排行榜的快照
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
        case REDIS_KEY.GVG_VESTIGE_MEMBER:       // 单遗迹玩家排行榜
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
        case REDIS_KEY.GVG_VESTIGE_MEMBER_ALL:   // 全遗迹玩家排行榜
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
        case REDIS_KEY.GVG_VESTIGE_LEAGUE:    // 遗迹联军排行榜
            return { infoKey: REDIS_KEY.LEAGUE_INFO, extraKey: [] };
        case REDIS_KEY.GVG_BATTLE_RANK:          // 激战期玩家排行榜
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
        case REDIS_KEY.GVG_BATTLE_LEAGUE_RANK:   // 激战期联军排行榜
            return { infoKey: REDIS_KEY.LEAGUE_INFO, extraKey: [] };
        case REDIS_KEY.GVG_BATTLE_LEAGUE_RANK_BY_CITY:   // 激战期联军排行榜
            return { infoKey: REDIS_KEY.LEAGUE_INFO, extraKey: [] };
            
        default:
            return { infoKey: REDIS_KEY.USER_INFO, extraKey: [] };
    }
}

// 排行榜类型
export enum RANK_TYPE {
    TOP_LINTUP = 1,                   // 最强阵容战力
    TOP_HERO = 2,                     // 最强武将
    HERO_NUM = 3,                     // 武将数量
    USER_LV = 4,                      // 主公等级
    SUM_CE = 5,                       // 总战力
    TOWER = 6,                        // 镇念塔
    MAIN = 7,                         // 主线
    MAIN_ELITE = 8,                   // 精英
    GUILD_LV = 9,                     // 军团按等级排序
    LADDER = 10,                     // 名将擂台
    GUILD_ACTIVE = 11,                // 军团活跃度排序
    HERO = 12,                        // 武将排行
    GUILD_FUND = 13,                 // 军团积分排行，限时类型的排行榜，仅计算期限内增加的值
}

// 接口中的排行榜类型对应的redis中的key
export function getRedisKeyByRankType(rankType: RANK_TYPE, isTimelimit = false) {
    switch(rankType) {
        case RANK_TYPE.TOP_LINTUP:      // 最强阵容战力
            return isTimelimit? REDIS_KEY.TOP_LINE_SNAPSHOT: REDIS_KEY.TOP_LINEUP_RANK;
        case RANK_TYPE.TOP_HERO:        // 最强武将
            return REDIS_KEY.TOP_HERO_RANK;
        case RANK_TYPE.HERO_NUM:        // 武将数量
            return REDIS_KEY.HERO_NUM_RANK;
        case RANK_TYPE.USER_LV:         // 主公等级
            return REDIS_KEY.USER_LV;
        case RANK_TYPE.SUM_CE:          // 总战力
            return isTimelimit? REDIS_KEY.SUM_CE_SNAPSHOT: REDIS_KEY.SUM_CE_RANK;
        case RANK_TYPE.TOWER:           // 镇念塔
            return REDIS_KEY.TOWER_RANK;
        case RANK_TYPE.MAIN:            // 主线
            return REDIS_KEY.MAIN_RANK;
        case RANK_TYPE.MAIN_ELITE:      // 精英
            return REDIS_KEY.MAIN_ELITE_RANK;
        case RANK_TYPE.GUILD_LV:        // 军团按等级排序
            return REDIS_KEY.GUILD_LV_RANK;
        case RANK_TYPE.GUILD_ACTIVE:    // 军团活跃度排序
            return REDIS_KEY.GUILD_ACTIVE_RANK;
        case RANK_TYPE.HERO:            // 武将排行
            return REDIS_KEY.HERO_RANK;
        case RANK_TYPE.GUILD_FUND:      // 军团积分排行，限时类型的排行榜，仅计算期限内增加的值
            return REDIS_KEY.GUILD_FUND;
        case RANK_TYPE.LADDER:      // 军团积分排行，限时类型的排行榜，仅计算期限内增加的值
            return REDIS_KEY.LADDER;
    }
}

export const RANK_TYPE_TO_KEY = new Map();

// field处理方法
export enum COMPOSE_FIELD_TYPE {
    ROLE = 1,
    GUILD = 2,
    ROLE_HERO = 3,
    LEAGUE = 4
}

// 各个key的field如何处理
export const KEY_TO_COMPOSE_FIELD = new Map([
    [REDIS_KEY.USER_INFO, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.TOWER_RANK, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.PVP_RANK, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.GUILD_INFO, COMPOSE_FIELD_TYPE.GUILD],
    [REDIS_KEY.GUILD_ACTIVE_RANK, COMPOSE_FIELD_TYPE.GUILD],
    [REDIS_KEY.GUILD_LV_RANK, COMPOSE_FIELD_TYPE.GUILD],
    [REDIS_KEY.USER_GATE_ACTIVITY, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.GATE_ACTIVITY, COMPOSE_FIELD_TYPE.GUILD],
    [REDIS_KEY.USER_CITY_ACTIVITY, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.CITY_ACTIVITY, COMPOSE_FIELD_TYPE.GUILD],
    [REDIS_KEY.RACE_ACTIVITY, COMPOSE_FIELD_TYPE.GUILD],
    [REDIS_KEY.TOP_LINEUP_INFO, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.TOP_LINEUP_RANK, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.TOP_HERO_RANK, COMPOSE_FIELD_TYPE.ROLE_HERO],
    [REDIS_KEY.HERO_INFO, COMPOSE_FIELD_TYPE.ROLE_HERO],
    [REDIS_KEY.HERO_NUM_RANK, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.USER_LV, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.DUNGEON_RANK, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.DUNGEON_LINEUP, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.MAIN_RANK, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.MAIN_ELITE_RANK, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.HERO_RANK, COMPOSE_FIELD_TYPE.ROLE_HERO],
    [REDIS_KEY.SHOW_LINEUP, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.SUM_CE_RANK, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.PVP_RANK, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.GUILD_FUND, COMPOSE_FIELD_TYPE.GUILD],
    [REDIS_KEY.SUM_CE_SNAPSHOT, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.TOP_LINE_SNAPSHOT, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.LADDER, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.GVG_VESTIGE_MEMBER, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.GVG_VESTIGE_MEMBER_ALL, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.GVG_VESTIGE_LEAGUE, COMPOSE_FIELD_TYPE.LEAGUE],
    [REDIS_KEY.LEAGUE_INFO, COMPOSE_FIELD_TYPE.LEAGUE],
    [REDIS_KEY.GVG_BATTLE_RANK, COMPOSE_FIELD_TYPE.ROLE],
    [REDIS_KEY.GVG_BATTLE_LEAGUE_RANK, COMPOSE_FIELD_TYPE.LEAGUE],
    [REDIS_KEY.GVG_BATTLE_LEAGUE_RANK_BY_CITY, COMPOSE_FIELD_TYPE.LEAGUE]
]);


export const FUNC_OPT_TYPE = {
    LEVEL_UP: 1,
    BATTLE_END: 2
}

export const FUNCS_ID = {
    EVENT: 1,
    PVP: 2,
    MAIN_TASK: 3,
    DAILY_TASK: 4,
    ACHIEVEMENT: 4
}

export const FRIEND_DROP_TYPE = {
    COM_BATTLE: 1,
    SEND_GIFT: 2
}

// 每日情谊点上限
export const FRIEND_DROP_MAX = {
    COM_BTL: 150
}


export const FILENAME = {
    DIC_EXPEDITION: 'dic_expedition',
    DIC_EXPEDITION_POINT: 'dic_expedition_point',
    DIC_GOODS: 'dic_goods',
    DIC_DAILY: 'dic_zyz_daily',
    DIC_EVENT: 'dic_zyz_event',
    DIC_FASHIONS: 'dic_zyz_fashions',
    DIC_FRIEND_SHIP: 'dic_zyz_friend_ship',
    DIC_FRIEND_SHIP_LEVEL: 'dic_zyz_friend_ship_level',
    DIC_GK_BRANCH: 'dic_zyz_gk_branch',
    DIC_GK_DAILY: 'dic_zyz_gk_daily',
    DIC_GK_DUNGEON: 'dic_zyz_gk_dungeon',
    DIC_GK_DUNGEON_ELITE: 'dic_zyz_gk_dungeonElite',
    DIC_GK_EVENT: 'dic_zyz_gk_event',
    DIC_GK_EXPEDITION: 'dic_zyz_gk_expedition',
    DIC_GK_MAIN: 'dic_zyz_gk_main',
    DIC_GK_MAIN_ELITE: 'dic_zyz_gk_mainElite',
    DIC_GK_TOWER: 'dic_zyz_gk_tower',
    DIC_GK_TREASURE: 'dic_zyz_gk_treasure',
    DIC_GK_ARMY_TRAIN: 'dic_zyz_gk_armytrain',
    DIC_GK_ARMY_BOSS: 'dic_zyz_gk_armyboss',
    DIC_HERO: 'dic_zyz_hero',
    DIC_HERO_QUALITY_UP: 'dic_zyz_hero_quality_up',
    DIC_HERO_STAR: 'dic_zyz_hero_star',
    DIC_HERO_WAKE: 'dic_zyz_hero_wake',
    DIC_HERO_TALENT: 'dic_zyz_hero_talent',
    DIC_JOB: 'dic_zyz_job',
    DIC_KING_EXP: 'dic_zyz_kingexp',
    DIC_CHAR_EXP: 'dic_zyz_charexp',
    DIC_SE: 'dic_zyz_se',
    DIC_TOWER_TASK: 'dic_zyz_search',
    DIC_TOWER: 'dic_zyz_tower',
    DIC_QUESTION: 'Questions',
    DIC_RANDOM_EFFECT_POOL: 'dic_zyz_randomEffectPool',
    DIC_RANDOM_EFFECT_POOL_PLAN: 'dic_zyz_randomEffectPoolPlan',
    DIC_TITLE: 'dic_zyz_title',
    DIC_TERAPH: 'dic_zyz_teraph',
    DIC_SCHOOL: 'dic_zyz_school',
    DIC_SCHOOL_RATE: 'dic_zyz_schoolRate',
    DIC_HERO_SCROLL: 'dic_zyz_heroScroll',
    DIC_PVP_OPPONENT: 'dic_pvp_opponent',
    DIC_PVP_TEAM_LEVEL: 'dic_pvp_teamLevel',
    DIC_GK_PVP: 'dic_zyz_gk_pvp',
    DIC_PVP_REFRESH_CONSUME: 'dic_pvp_refreshConsume',
    DIC_PVP_HERO_REWARD: 'dic_pvp_heroAccountReward',
    DIC_PVP_RANK_REWARD: 'dic_pvp_rankReward',
    DIC_PVP_BOX: 'dic_pvp_boxReward',
    DIC_GUILD_AUTH: 'dic_army_authority',
    DIC_GUILD_STRUCTURE_CENTER: 'dic_army_structureCentre',
    DIC_GUILD_EQUIP_PRODUCE_BASE: 'dic_army_equipProduceBase',
    DIC_GUILD_BOSS_BASE: 'dic_army_bossBase',
    DIC_GUILD_TRAIN_BASE: 'dic_army_trainBase',
    DIC_GUILD_DONATE_BASE: 'dic_army_donateBase',
    DIC_GUILD_WISH_POOL_BASE: 'dic_army_wishPool',
    DIC_GUILD_STORE_BASE: 'dic_army_storeBase',
    DIC_GUILD_POSITION: 'dic_army_position',
    DIC_ACTIVE_DAY_REWARD: 'dic_army_activeDayReward',
    DIC_ACTIVE_WEEK_REWARD: 'dic_army_activeWeekReward',
    DIC_MAIL: 'dic_email_content',
    DIC_ARMY_TRAIN_JU_DIAN: 'dic_army_trainJuDian',
    DIC_ARMY_TRAIN_SOLO_REWARD: 'dic_army_trainSoloReward',
    DIC_ARMY_TRAIN_INFO: 'dic_army_trainGk_info',
    DIC_ARMY_ACTIVE_POINT_WAYS: 'dic_army_activePointWays',
    DIC_ARMY_DEVELOPMENTCONSUME: 'dic_army_developmentConsume',
    DIC_ARMY_BOSS_RANK_REWARD: 'dic_army_bossrankReward',
    DIC_ARMY_DONATE_BOX_REWARD: 'dic_army_donateBoxReward',
    DIC_ROLE_FRIEND: 'dic_zyz_friends',
    DIC_ROLE_FRIEND_LEVEL: 'dic_zyz_closelevel',
    DIC_GUILD_ACTIVITY: 'dic_zyz_guildActivity',
    DIC_GATE_ACTIVITY_POINT: 'dic_zyz_gateActivityPoint',
    DIC_GUILD_AUCTION: 'dic_zyz_guildAuction',
    DIC_CITY_ACTIVITY: 'dic_zyz_cityActivity',
    DIC_CHAT_ACCUSE: 'dic_zyz_chat_report',
    DIC_CITY_ACTIVITY_REWARD: 'dic_zyz_cityActivityReward',
    DIC_RACE_ACTIVITY: 'dic_zyz_raceActivity',
    DIC_SHOP: 'dic_zyz_shop',
    DIC_SHOP_TYPE: 'dic_zyz_shopType',
    DIC_RANK: 'dic_zyz_rankingType',
    DIC_RANK_REWARD: 'dic_zyz_rankingReward',
    DIC_MAIN_TASK: 'dic_zyz_mainTask',
    DIC_DAILY_TASK: 'dic_zyz_dailyTask',
    DIC_ACHIEVEMENT: 'dic_zyz_achievement',
    DIC_MAIN_TASK_STAGE: 'dic_zyz_mainTaskStage',
    DIC_TASK_BOX: 'dic_zyz_taskBox',
    DIC_ACHIEVEMENT_BOX: 'dic_zyz_achievementBox',
    DIC_GACHA: 'dic_zyz_gacha',
    DIC_GACHA_PLAN: 'dic_zyz_gachaPlan',
    DIC_GACHA_FLOOR: 'dic_zyz_gachaFloor',
    DIC_GIFT_PACKAGE: 'dic_zyz_giftPackage',
    DIC_GIFT_PACKAGE_PLAN: 'dic_zyz_giftPackagePlan',
    DIC_GIFT_PACKAGE_FLOOR: 'dic_zyz_giftPackageFloor',
    DIC_RECRUIT: 'dic_zyz_recruit',
    DIC_RMB: 'dic_zyz_rmb',
    DIC_ACTIVITY_TYPE: 'dic_zyz_activityType',
    DIC_TASK_TYPE: 'dic_zyz_taskType',
    DIC_GK_SZTM: 'dic_zyz_gk_activity_sztm',
    DIC_GK_MJSD: 'dic_zyz_gk_activity_mjsd',
    DIC_SERVER_NAME: 'dic_zyz_serverName',
    DIC_GK_FES: 'dic_zyz_gk_activity_festival',
    DIC_AP: 'dic_zyz_ap',
    DIC_AP_BUY_COST: 'dic_zyz_daliyAP',
    DIC_GK_NEWHERO: 'dic_zyz_gk_newhero',
    DIC_EXP_RATIO: 'dic_zyz_mainTaskExp',
    DIC_GK_PROBATION: 'dic_zyz_gk_probation',
    DIC_HOLIDAY: 'dic_holiday',
    DIC_EXPEDITION_SUB_ATTR: 'dic_expedition_subattr',
    DIC_AUCTION_BASIC_POOL: 'dic_zyz_auction_basicPool',
    DIC_AUCTION_REWARD: 'dic_zyz_auctionReward',
    DIC_PVP_DIFFICULTRATIO: 'dic_zyz_pvp_difficultRatio',
    DIC_PVP_DAILY_TASK: 'dic_zyz_pvp_dailyTask',
    DIC_WHITE_IP: 'dic_pay_white_ip',
    FILTER_WORDS: 'filterWords',
    DIC_GUILD_WISH_REWARD: 'dic_army_wishReward',
    DIC_API: 'dic_api',
    DIC_SERVER_CONST: 'server_const',
    DIC_EQUIP: 'dic_zyz_equip',
    DIC_EQUIP_SUIT: 'dic_zyz_equipSuit',
    DIC_EQUIP_STRENGTH: 'dic_zyz_equipStrength',
    DIC_EQUIP_QUALITY: 'dic_zyz_equipQuality',
    DIC_EQUIP_STAR: 'dic_zyz_equipStar',
    DIC_EQUIP_QUALITY_EXTRA: 'dic_zyz_equipQuality_extra',
    DIC_JEWEL: 'dic_zyz_jewel',
    DIC_STONE: 'dic_zyz_stone',
    DIC_JEWEL_CONDITION: 'dic_zyz_jewel_condition',
    DIC_MAIN_STAR_BOX: 'dic_zyz_main_star_reward',
    DIC_EQUIP_STRENGTH_ATTR: 'dic_zyz_equipStrengthAttr',
    DIC_TOWER_GIFT: 'dic_zyz_towerGift',
    DIC_TOWER_PVP_SUB_ATTR: 'dic_tower_pvp_subattr',
    DIC_SYSTEM_OPEN_TIME: 'dic_zyz_systemOpenTime',
    DIC_MAIN_WAR_REWARD: 'dic_zyz_mainCity_reward',
    DIC_LADDER_DIFFICULTRATIO: 'dic_zyz_ladder_difficultRatio',
    DIC_LADDER_RANKREWARD: 'dic_zyz_ladder_rankReward',
    DIC_GK_LADDER: 'dic_zyz_gk_ladder',
    DIC_LADDER_MATCH: 'dic_zyz_ladderMatch',
    DIC_GK_BRANCH_ELITE: 'dic_zyz_gk_branchElite',
    DIC_GENERAL_GOODS: 'dic_zyz_general_goods',
    DIC_ARTIFACT: 'dic_zyz_artifact',
    DIC_ARTIFACT_LV_PLAN: 'dic_zyz_artifactLvPlan',
    DIC_ARTIFACT_QUALITY_PLAN: 'dic_zyz_artifactQualityPlan',
    DIC_ARTIFACT_QUALITY: 'dic_zyz_artifactQuality',
    DIC_ARTIFACT_SEID: 'dic_zyz_artifactSeid',
    DIC_GVG_PERIOD: 'dic_zyz_GVGPeriod',
    DIC_GVG_TECH: 'dic_zyz_GVGTech',
    DIC_GVG_ITEM: 'dic_zyz_GVGItems',
    DIC_GVG_LEAGUE_LV: 'dic_zyz_GVGLeagueLv',
    DIC_GVG_RESOURCE_BASE: 'dic_zyz_GVGResourceBase',
    DIC_GVG_CONTRIBUTE_BOX: 'dic_zyz_GVGContributeBox',
    DIC_GVG_AREA: 'dic_zyz_GVGArea',
    DIC_GVG_CITY_ADD: 'dic_zyz_GVGCityAdd',
    DIC_GVG_TASK: 'dic_zyz_GVGTask',
    DIC_GVG_VESTIGE_TYPE: 'dic_zyz_GVGVestigeType',
    DIC_GVG_VESTIGE: 'dic_zyz_GVGVestige',
    DIC_GVG_VESTIGE_RANGE: 'dic_zyz_GVGVestigeRange',
    DIC_GVG_VESTIGE_LEAGUE_RANK: 'dic_zyz_GVGVestigeLeagueRank',
    DIC_GK_GVG_VESTIGE: 'dic_zyz_gk_GVGVestige',
    DIC_GVG_AREA_POINT: 'dic_zyz_GVGAreaPoint',
    DIC_GVG_BATTLE_RANK_REWARD: 'dic_zyz_GVGBattleRankReward',
    DIC_GK_GVGBATTLE: 'dic_zyz_gk_GVGBattle',
    DIC_GVG_VESTIGE_PLAYER_RANK: 'dic_zyz_GVGVestigePlayerRank',
}

export const WAR_RELATE_TABLES = [
    FILENAME.DIC_GK_BRANCH,
    FILENAME.DIC_GK_DAILY,
    FILENAME.DIC_GK_DUNGEON,
    FILENAME.DIC_GK_DUNGEON_ELITE,
    FILENAME.DIC_GK_EVENT,
    FILENAME.DIC_GK_EXPEDITION,
    FILENAME.DIC_GK_MAIN,
    FILENAME.DIC_GK_MAIN_ELITE,
    FILENAME.DIC_GK_TOWER,
    FILENAME.DIC_GK_TREASURE,
    FILENAME.DIC_GK_PVP,
    FILENAME.DIC_GK_SZTM,
    FILENAME.DIC_GK_MJSD,
    FILENAME.DIC_GK_FES,
    FILENAME.DIC_GK_NEWHERO,
    FILENAME.DIC_GK_PROBATION,
    FILENAME.DIC_GK_ARMY_TRAIN,
    FILENAME.DIC_GK_ARMY_BOSS,
    FILENAME.DIC_GK_LADDER,
    FILENAME.DIC_GK_BRANCH_ELITE,
    FILENAME.DIC_GK_GVG_VESTIGE,
    FILENAME.DIC_GK_GVGBATTLE,
]

// 装备栏强化类型
export const EQUIP_STRENGTHEN_TYPE = {
    SINGLE: 1, // 单件单级强化
    SINGLE_QUICK: 2, // 单件一键强化
    ALL_QUICK: 3 // 武将全部装备栏一键强化
}

export const CHAT_SERVER = 'chat-server-1';

export enum FRIEND_RELATION_TYPE {
    NORMAL = 1,
    HAS_FRIEND = 2,
    HAS_BLOCKED = 3,
    MYSELF = 4,
    ROBOT = 5
}

export enum POPULATE_TYPE {
    NOT = 0,
    FRIEND = 1,
    BLACKLIST = 2,
    FRIENDSHIP = 3,
    FRIEND_NAME_ONLY = 4
}

export enum BLOCK_OPEATE {
    ADD = 1,
    REMOVE_BLACK = 2,
    REMOVE_AND_APPLY = 3,
    REMOVE_FRIEND = 4
}

export enum ADDICTION_PREVENTION_CODE {
    FAIL = -1,
    SUCCESS = 1,     // 接口的返回
    GUEST = 1,       // 返回给客户端时，游客时间超时
    CURFEW = 2,      // 每日22时至次日8时,未成年禁止游戏
    HOLIDAY = 3,     // 法定节假日每日累计不得超过3小时
    WORKDAY = 4,     // 非法定节假日每日累计不得超过1.5小时
}

export enum GET_SMS_TYPE {
    LOGIN = 1,
    BIND = 2
}

export enum DEFAULT_DEVICE_ID {
    PC = 'pc'
}

// 阵容人数限制
export const LINEUP_NUM = 6;

// 商店刷新类型
export enum SHOP_REFRESH_TYPE {
    DAILY = 1,     // 每天刷新
    WEEKLY = 2,    // 每周
    MONTHLY = 3,   // 每月
    FOREVER = 4,    // 不重置
    PVP = 5,       // pvp赛季
}

// 任务的大类
export enum TASK_FUN_TYPE {
    MAIN = 1,        // 主线
    DAILY = 2,       // 每日
    ACHIEVEMENT = 3, // 成就
    PVP = 4,         // pvp任务
}

export enum TASK_TYPE {
    LOGIN_SUM = 1,                    // 累计登录
    LOGIN_SERIES = 2,                 // 连续登录
    ROLE_LV = 3,                      // 主公等级
    GACHA = 4,                        // 招募
    HERO_NUM = 5,                     // 武将数量
    HERO_STAR_UP = 6,                 // 升星次数
    HERO_QUALITY = 7,                 // 拥有品质
    HERO_QUALITY_STAR_UP = 8,         // 某品质升星
    HERO_LV = 9,                      // 武将升级
    HERO_TRAIN = 10,                  // 武将训练
    HERO_QUALITY_UP = 11,             // 武将升品
    HERO_WAKE_UP = 12,                // 武将觉醒
    HERO_TRAIN_SUM = 13,              // 武将总训练次数
    HERO_STAGE_UP = 14,               // 武将兵种进阶
    HERO_FAVOUR_LV = 15,              // 武将好感度升级
    HERO_CONNECT = 16,                // 激活武将羁绊
    ROLE_SCHOOL_UNLOCK = 17,          // 百家学宫解锁
    ROLE_SCHOOL_PUT_HERO = 18,        // 百家学宫放置武将
    ROLE_TITLE = 19,                  // 爵位
    ROLE_TERAPH_STRENGTHEN = 20,      // 神像强化
    ROLE_SCROLL_ACTIVE = 21,          // 名将谱激活
    // EQUIP_SUM = 22,                   // 总装备数
    // EQUIP_BY_HERO = 23,               // 各武将装备数量
    // EQUIP_QUALITY = 24,               // 装备品质
    // EQUIP_STRENGTHEN = 25,            // 装备栏强化
    // EQUIP_JEWEL = 26,                 // 多少装备镶嵌宝石
    // EQUIP_COMPOSE_SUIT = 27,          // 合成套装
    // EQUIP_SUIT = 28,                  // 拥有套装
    ROLE_SIGN = 29,                   // 签到 暂无
    // EQUIP_REFINE = 30,                // 成功精炼
    // EQUIP_RESTRENGTHEN = 31,          // 洗炼
    // EQUIP_JEWEL_STAGE = 32,           // 镶嵌几阶宝石
    // EQUIP_JEWEL_SUM = 33,             // 总计镶嵌多少宝石
    FRIEND_NUM = 34,                  // 好友人数
    FRIEND_SEND_HEART = 35,           // 赠送友情点
    CHAT = 36,                        // 发送消息
    BATTLE_COST_AP = 37,              // 消耗体力
    BATTLE_WITH_HERO = 38,            // 使用某武将挑战某关卡
    BATTLE_MAIN = 39,                 // 通关主线
    BATTLE_MAIN_SWEEP = 40,           // 扫荡主线
    BATTLE_EVENT = 41,                // 奇遇
    BATTLE_DAILY_STAR = 42,           // 每日x星通关
    BATTLE_DAILY = 43,                // 每日通关
    BATTLE_DUNGEON = 44,              // 秘境
    BATTLE_DUNGEON_WAR = 45,          // 通关秘境有些关卡
    BATTLE_TOWER_LV = 46,             // 镇念塔层数
    BATTLE_TOWER = 47,                // 镇念塔   
    BATTLE_VESTIGE = 48,              // 遗迹
    BATTLE_EXPEDITION = 49,           // 远征
    BATTLE_EXPEDITION_BOX = 50,       // 领取远征宝箱
    COM_BATTLE_CREATE_TEAM = 51,      // 寻宝招募队友
    // COM_BATTLE_BLUEPRT = 52,          // 合成藏宝图
    COM_BATTLE_ASSIST_TEAM = 53,      // 队友协助寻宝
    COM_BATTLE = 54,                  // 寻宝
    // COM_BATTLE_QUALITY = 55,          // 按品质寻宝
    // COM_BATTLE_DROP = 56,             // 寻宝掉落碎片
    PVP = 57,                         // PVP挑战
    PVP_WIN = 58,                     // PVP胜利
    PVP_RECEIVE_BOX = 59,             // 领取宝箱
    PVP_WIN_SERIES = 60,              // PVP连胜
    PVP_HERO_SCORE = 61,              // PVP武将积分
    PVP_RANK = 62,                    // PVP达到第几名
    GUILD_JOB = 63,                   // 军团官职
    GUILD_DONATE = 64,                // 军团捐献
    GUILD_RECEIVE_BOX = 65,           // 领取活跃宝箱
    // GUILD_REFINE = 66,                // 军团炼器
    GUILD_ASSIST_REFINE = 67,         // 军团助力加速
    GUILD_TRAIN_SUCESS = 68,          // 军团练兵场成功压制
    GUILD_BOSS = 69,                  // 军团演武台挑战
    GUILD_TRAIN = 70,                 // 挑战练兵场
    GUILD_ACTIVITY = 71,              // 军团活动
    GUILD_JOIN = 72,                   // 加入军团
    BATTLE_MAIN_ELITE = 73,            // 精英通关
    HERO_QUALITY_TO_QUALITY_COUNT = 74,// *名武将*品升*品
    HERO_QUALITY_WAKE_UP_COUNT = 75,   // *名武将*品觉醒
    HERO_WAKE_UP_STAR_UP_COUNT = 76,   // *名武将升至觉醒*星
    // EQUIP_REFINE_LV = 77,               // *件装备成功精炼到*级
    // EQUIP_SUIT_JEWEL_STAGE = 78,        // *次触发,一个武将满装备情况下，必须都镶嵌有相同阶的宝石(阶数大于等于x情况下都算达成)
    GUILD_TRAIN_COUNT = 79,             // 练兵场通关x层
    HERO_UNLOCK = 80,                   // 名将谱x阵营全部激活
    GACHA_QUALITY_COUNT = 81,           // 抽到*次品质*武将
    ROLE_TERAPH_STAGE_UP = 82,          // 神像进阶
    // EQUIP_QUALITY_COUNT = 83,           // 获得*件品质的*装备
    HERO_WAKE_UP_COUNT = 84,            // *名武将觉醒
    // GUILD_JOIN_ACTIVITY_END = 85,       // 参与*军团活动到结束
    ACTIVITY_RMB = 86,                  // 累计充值*元
    EQUIP_LV_TO = 87,                // x件装备强化至x级
    EQUIP_PUT_JEWEL = 88,              // 多少件装备多少阶天晶石
    EQUIP_PUT_STONE = 89,              // 多少件装备多少个地玉石
    EQUIP_STAR_UP_TO = 90,                 // 装备升到多少星
    EQUIP_STAR_UP_CNT = 91,             // 装备升星多少次
    EQUIP_SUIT_SEID_NUM = 92,          // 激活套装属性条数
    EQUIP_QUALITY_UP = 93,            // 多少件装备升品
    EQUIP_QUALITY_UP_CNT = 94,          // 装备升品多少次
    EQUIP_QUALITY_UP_TO = 95,           // 装备升到多少品
    EQUIP_COMPOSE = 96,                 // 合成
    EQUIP_COMPOSE_CNT = 97,            // 多少名武将有多少装备
    EQUIP_LV_UP = 98,                  // 装备等级
    EQUIP_PUT_JEWEL_CNT = 99,          // 多少装备镶嵌天晶
    EQUIP_PUT_STONE_CNT = 100,          // 多少装备镶嵌地玉
    EQUIP_STONE_CNT = 101,              // 镶嵌了多少地玉
    EQUIP_STONE_CNT_LV = 102,           // 多少装备镶嵌多少多少阶的地玉
    EQUIP_JEWEL_RANDSE_CNT = 103,       // 多少天晶的多少条词条激活
    STONE_COMPOSE = 104,               // 合成地玉石
    JEWEL_RESET = 105,                // 天晶洗练
    JEWEL_QUENCH = 106,               // 天晶淬炼
    JEWEL_QUENCH_SUCCESS = 107,           // 天晶淬炼成功
    COM_BATTLE_LV = 108,           // 军团寻宝
    GUILD_REFINE = 109,                // 军团兑换
    EQUIP_STAR_UP_CNT_SUM = 110,       // 装备总共升星x次
    BATTLE_MAIN_START = 111,           // 挑战主线x次
    BATTLE_TOWER_START = 112,          // 挑战镇念塔x次
    BATTLE_VESTIGE_START = 113,        // 挑战遗迹x次
    BATTLE_DAILY_START = 114,          // 挑战每日x次
    COM_BATTLE_CREATE_TEAM_WIN = 115,  // 创建寻宝并胜利x次
    COM_BATTLE_ASSIST_TEAM_WIN = 116,  // 协助寻宝并胜利x次
    COM_BATTLE_WIN = 117,              // 寻宝胜利x次
    BATTLE_EXPEDITION_START = 118,     // 挑战远征x次
    BATTLE_DUNGEON_START = 119,        // 挑战秘境x次
    GUILD_GOLD_DONATE = 120,            // 军团元宝捐献x次
    LADDER_CNT = 121,                   // 名将擂台挑战x次
    LADDER_SUCCESS_CNT = 122,           // 名将擂台挑战胜利x次
    LADDER_RANK = 123,                  // 名将擂台排名
    CONNECT_ONE_HERO_MAX_LV = 124,      // 羁绊最高等级的那一级达到x级
    CONNECT_ONE_HERO_SUM_LV = 125,      // 单个武将全部羁绊到达
    ARTIFACT_LV = 127,                  // 强化X件宝物至X级
    ARTIFACT_QUALITY_EQUIP = 128,       // 穿戴X件品质为X的宝物
    ARTIFACT_COMPOSE = 129,             // 合成X次宝物
    STAR_UP_SUM = 130,                  // 总计升星次数
    BATTLE_BRANCH_ELITE = 131,          // 通关梦魇支线关卡
    GVG_FARM = 132,                     // 农庄种植/矿山采集/木堆砍柴
    GVG_VESTIGE = 133,                  // 中原遗迹挑战
    GVG_TECH = 134,                     // 千机阁捐献
}

// 任务累积类型
export enum TASK_SUM_TYPE {
    SUM = 1,         // 累积型
    DO = 2,          // 去做型
}

// 卡池类型
export enum GACHA_TYPE {
    NORMAL = 1,          // 元宝招募
    FRDPOINT = 2,        // 友情点
    ASSIGN = 3,          // 指定卡池
    GUIDE = 4,           // 限时
    ACTIVITY = 5,        // 新武将活动
}

export enum GACHA_PLAN_TYPE {
    HERO = 1,           // 武将
    ASSIGN_HERO = 2,    // 指定武将
    ASSIGN_ITEM = 3,    // 指定武将
    ITEM = 4,           // 武将碎片
}

export enum GACHA_FLOOR_TYPE {
    MAIN_FLOOR = 1,     // 主要保底， 每 param 次必得 1个目标物，获得之后次数重计（如当前的元宝招募）
    ONLY_ONE = 2,       // 每 param 次有且仅有1次目标物（如当前的求贤若渴）
    TEN_MOST_HIGHER = 3,      // 每次10连最多获得 param 个目标物（不计单抽）向上替换（如：蓝色不超过9个=紫色保底）
    TEN_MOST_LOWER = 4,       // 每次10连最多获得 param 个目标物（不计单抽）向下替换 （如：橙色不超过3个）
    FIVE_MOST_LOWER = 5,       // 每次5连最多获得 param 个目标物（不计单抽）向下替换 （如：橙色不超过3个）
}

// 跑马灯显示类型
export enum MARQUEE_SHOW_TYPE {
    ONCE = 1,               // 一次性
    CIRCLE = 2,             // 循环
}

// 推送时间类型
export enum MARQUEE_TIME_TYPE {
    INSTANT = 1,              // 发送后立刻推送
    SCHEDULE = 2,             // 定时器
}

export enum SERVER_STATUS {
    NEW = 1,          // 新服
    HOT = 2,          // 火爆
    WILL_OPEN = 3,    // 即将开启
    MAINTENANCE = 4,  // 维护中 
    HIDE = 0,  // 隐藏 
}

export enum WHITE_LIST_TYPE {
    IP = 1,           // ip地址
    UID = 2,          // 玩家账号
}

// 获取道具类型
export enum HANDLE_REWARD_TYPE {
    RECEIVE = 1,      // 获取
    COST = 2          // 消耗
}

// 领取邮件类型
export enum RECEIVE_MAIL_TYPE {
    SINGLE = 1,      // 领取单个
    ALL = 2,         // 一件领取
}

export enum ROBOT_SYS_TYPE {
    COM_BTL = 1,
    PVP = 2
}

// 武将等级和经验比类型
export enum KING_EXP_RATIO_TYPE {
    TASK = 1,
    BATTLE = 2,
}

export enum RANK_FIRST_REWARD_STATUS {
    WAITING = 0,       // 不可领取
    CAN_RECEIVE = 1,   // 可领取
    RECEIVED = 2,      // 已领取
}

export enum THINKING_DATA_MODE_LIST {
    DEBUG = 'debug',
    BATCH = 'batch',
    LOGGING = 'logging',
}
export let THINKING_DATA_MODE = THINKING_DATA_MODE_LIST.LOGGING;


export enum BLOCK_TYPE {
    NOT = 0,
    BAN = 1,
    BLOCK = 2,
}

export enum SERVER_TIMER {
    FIVE_HALF = 1,   // 5:30
    TEN_HALF = 2,    // 10:30
    FIFTEEN_HALF = 3, // 15:30
    NINETEEN_HALF = 4, // 19:30
}

export enum GIFT_GENERATE_TYPE {
    ONE_TO_ONE = 1,   // 一人一码，一条码只能被用一次
    ONE_TO_MANY = 2,  // 通码，一条码能被多人使用，每个人只能用一次    
}

export enum ITEM_CHANGE_REASON {
    DEBUG = 0,                               // debug接口、后台
    RENAME = 1,                              // 重命名
    DEFAULT_ITEMS = 2,                       // 初始道具
    COMPOSE_HERO = 3,                        // 合成武将
    HERO_LV_UP = 4,                          // 武将升级
    HERO_STAR_UP = 5,                        // 武将升星
    HERO_QUALITY_UP = 6,                     // 武将升品
    HERO_WAKE_UP = 7,                        // 武将升彩星
    HERO_JOB_TRAIN = 8,                      // 武将训练
    HERO_JOB_STAGEUP = 9,                    // 武将职业进阶
    HERO_CONNECT_ACTIVE = 10,                // 武将激活羁绊
    HERO_GIVE_FAVOR = 11,                    // 武将升名望
    TITLE_LEVEL_UP = 12,                     // 升爵位
    TERAPH_STRENGTHEN = 13,                  // 神像强化
    TERAPH_QUALITY_UP = 14,                  // 神像进阶
    UNLOCK_SCHOOL_POSITION = 15,             // 解锁百家学宫位置
    EQUIP_STRENTHEN = 16,                    // 装备强化
    EQUIP_REFINE = 17,                       // 装备精炼
    EQUIP_LOCK_RANDSE = 18,                  // 装备洗练锁定
    EQUIP_RESTRENGTHEN = 19,                 // 装备洗练
    EQUIP_QUENCH = 20,                       // 装备淬火
    EQUIP_DIG_HOLE = 21,                     // 装备打孔
    EQUIP_FILL_HOLE = 22,                    // 装备镶嵌
    EQUIP_COMPOSE = 23,                      // 装备合成
    EQUIP_DEL_RETURN_JEWEL = 24,             // 装备合成的时候返回上面镶嵌的宝石
    EQUIP_DECOMPOSE = 25,                    // 装备分解
    EQUIP_PIECE_DECOMPOSE = 26,              // 装备碎片分解
    TAKE_OUT_JEWEL = 27,                     // 取下装备上的宝石
    JEWEL_COMPOSE = 28,                      // 合成宝石
    BLUEPRT_COMPOSE = 29,                    // 藏宝图合成
    BUY_MEAT = 30,                           // 购买烧肉
    USE_MEAT = 31,                           // 使用烧肉
    USE_GIFT_PACKAGE = 32,                   // 打开礼包（物品）
    ADD_SKIN_UNLOCK_FIGURE = 33,             // 获得皮肤解锁头像等
    GET_HERO_UNLOCK_FIGURE = 34,             // 获得武将解锁头像等
    HERO_FAVOR_UNLOCK_FIGURE = 35,           // 武将好感解锁头像等
    PVP_SERIES_UNLOCK_FIGURE = 36,           // pvp连胜解锁头像等
    GACHA_PULL = 37,                         // 抽卡
    GACHA_ITEMS = 38,                        // 抽卡中不是武将的那些道具
    VISIT_HERO = 39,                         // 拜访武将获得碎片
    HERO_TRANSFER_PIECE = 40,                // 获得重复的武将转换成的碎片
    FRIEND_SEND_PRESENT = 41,                // 好友间送礼物
    RECEIVE_FRIEND_HEART = 42,               // 领取好友的红心
    USE_GIFT_CODE = 43,                      // 礼包码兑换
    MAIL = 44,                               // 邮件
    RANK_REWARD = 45,                        // 排行榜奖励
    SHOP_PURCHASE = 46,                      // 商店购买
    RECYCLE_SOUL = 47,                       // 将魂回收
    TASK_REWARD = 48,                        // 领取任务奖励
    TASK_STAGE_REWARD = 49,                  // 主线任务阶段性奖励
    EVENT_REWARD = 51,                       // 奇遇领取奖励
    EXPEDITION_POINT_REWARD = 52,            // 过关斩将点数宝箱
    TOWER_HUNG_UP_REWARD = 53,               // 镇念塔挂机奖励
    TOWER_TASK_REWARD = 54,                  // 镇念塔任务奖励
    DAILY_BATTLE_BUY_CNT = 55,               // 每日关卡购买次数
    DUNGEON_BATTLE_BUY_CNT = 56,             // 秘境关卡购买次数
    PVP_BOX_REWARD = 57,                     // pvp巅峰之路
    PVP_REFRESH_OPP = 58,                    // pvp刷新对手
    PVP_BUY_ATTACK_CNT = 59,                 // pvp购买更新挑战次数
    TOWER_HUNG_UP_SDP_UP = 60,               // 镇念塔挂机加速消耗
    COM_BATTLE_USE_BLUEPRT = 61,             // 寻宝消耗藏宝图
    TASK_ACTIVE_REWARD = 62,                 // 每日任务活跃奖励
    TASK_BOX_REWARD = 63,                    // 每日任务每周奖励
    NORMAL_BATTLE_END = 64,                  // 主线关卡结算奖励
    COM_BATTLE_END = 50,                      // 寻宝
    PVP_BATTLE_END = 65,                     // pvp关卡结算奖励
    VESTIGE_BATTLE_END = 66,                 // 遗迹本结算奖励
    EVENT_BATTLE_END = 67,                   // 事件本结算奖励
    DAILY_BATTLE_END = 68,                   // 每日本结算奖励
    EXPEDITION_BATTLE_END = 69,              // 远征本结算奖励
    MYSTERY_BATTLE_END = 70,                 // 秘境本结算奖励
    WARLOARDS_BATTLE_END = 71,               // 群雄结算奖励
    TOWER_BATTLE_END = 72,                   // 镇念塔结算奖励
    MAIN_ELITE_BATTLE_END = 73,              // 主线精英结算奖励
    BRANCH_BATTLE_END = 74,                  // 支线结算奖励
    ACT_TREASURE_HUNT_BATTLE_END = 75,       // 神州探秘结算奖励
    ACT_SELF_SHOP_BATTLE_END = 76,           // 糜家商队结算奖励
    ACT_DAILY_GK_BATTLE_END = 77,            // 每日关卡活动结算奖励
    ACT_NEW_HERO_GK_BATTLE_END = 78,         // 新将演绎活动结算奖励
    TRY_BATTLE_END = 79,                     // 试用关卡结算奖励
    CREATE_GUILD = 80,                       // 创建军团
    GUILD_IMPEACH = 81,                      // 弹劾团长
    AUCTION_DIVIDEND = 82,                   // 拍卖行分红
    AUCTION_OFFER = 83,                      // 拍卖出价
    DONATE = 84,                             // 捐献奖励
    DONATE_BOX = 85,                         // 捐献累计宝箱奖励
    BOSS_BATTLE_END = 86,                    // 演武台战场结算奖励
    GUILD_ACTIVE_REWARD = 87,                // 军团活跃到达奖励
    REFINE_EQUIP = 88,                       // 炼器堂炼器
    TRAIN_BATTLE_END = 89,                   // 练兵场结算奖励
    TRAIN_BOX_REWARD = 90,                   // 练兵场宝箱
    TRAIN_LV_REWARD = 91,                    // 练兵场试炼等级奖励
    TRAIN_BATTLE_BUY_CNT = 92,               // 军团练兵场购买次数
    WISH_POOL_DONATE = 93,                   // 许愿池捐献
    WISH_POOL_RECEIVE = 94,                  // 许愿池领取
    GUILD_BOSS_ENCOURAGE = 95,               // 演武台敲鼓
    ASSIST_REFINE = 96,                      // 协助点亮科技树
    CITY_ACT_RESET_CHALLENGE_TIME = 97,      // 诸侯混战重置挑战次数
    MONOPOLY_MOVE = 98,                      // 活动 大富翁活动移动骰子
    MONOPOLY_BANK = 99,                      // 活动 大富翁活动存钱
    MONOPOLY_BUY_GOODS = 100,                // 活动 大富翁商店
    DAILY_COIN_EXCHANGE = 101,               // 活动 每日铜钱活动兑换
    DAILY_CHALLENGE_REWARD = 102,            // 活动 七天乐 每日挑战活动奖励
    BUY_DAILY_GIFTS = 103,                   // 活动 七天乐 购买每日特惠礼包
    DAILY_MEAL_RECEIVE_REPAIRE = 104,        // 活动 午餐晚餐补领
    DAILY_MEAL_RECEIVE = 105,                // 活动 午餐晚餐
    DAILY_RMB_GIFT = 106,                    // 活动 每日特惠礼包
    FIRST_GIFT = 107,                        // 活动 首充礼包
    GROWTH_FUND = 108,                       // 活动 成长基金奖励
    GROWTH_REWARD = 109,                     // 活动 成长任务奖励
    GROWTH_DAY_EXCHANGE = 110,               // 活动 七天乐 成长任务奖章兑换
    BUY_LIMIT_PACKAGE = 111,                 // 活动 购买新手限定礼包
    NEW_HERO_GACHA_PULL = 112,               // 活动 新武将抽卡获得
    NEW_HERO_EXCHANGE = 113,                 // 活动 新将好礼兑换点数
    POP_UP_BUY_GIFT = 114,                   // 活动 弹出礼包购买
    RECHARGE_REWARD = 115,                   // 活动 每日累计充值
    BUY_REFRESH_SHOP = 116,                  // 活动 购买通用的刷新商店
    REFRESH_TASK_REWARD = 117,               // 活动 通用刷新任务奖励
    REFRESH_TASK_EXCHANGE = 118,             // 活动 通用刷新任务兑换奖励
    SELF_SERVICE_SHOP_BUY_RESOURCE = 119,    // 活动 糜家商队买代币
    SELF_SERVICE_SHOP_BUY_GIFT = 120,        // 活动 糜家商队商店购买
    REPAIRE_SIGNIN = 121,                    // 活动 补签
    SIGNIN = 122,                            // 活动 签到
    THIRTHDAY_TASK = 123,                    // 活动 30天任务奖励
    THIRTHDAY_EXCHANGE = 124,                // 活动 30天点数兑换
    TREASURE_HUNT_FIRST_PAGE_REWARD = 125,   // 活动 神州探秘 首页奖励
    TREASURE_HUNT_SHOP_BUY = 126,            // 活动 神州探秘 商店购买
    TREASURE_HUNT_TASK_REWARD = 127,         // 活动 神州探秘 任务奖励
    TREASURE_HUNT_CHALLENGE = 128,           // 活动 神州探秘 大冒险
    TREASURE_HUNT_SP_SHOP_BUY = 129,         // 活动 神州探秘 天子宝库购买
    VIP_RECHARGE_MONEY = 130,                // 活动 vip累充奖励
    MONTHLY_TICKET_DAILY = 131,              // 活动 月卡每日奖励
    MONTHLY_TICKET_FIRST = 132,              // 活动 月卡首次奖励
    YUANBAO_SHOP_BUY = 133,                  // 活动 元宝商店购买
    GET_HERO_UNLOCK_SKIN = 134,              // 获得武将解锁皮肤
    AP_RECOVERY = 135,                       // 自然恢复体力
    LV_UP = 136,                             // 升级恢复
    EQUIP_QUALITYUP = 137,                   // 装备升品
    EQUIP_STARUP = 138,                      // 装备升星
    COMPOSE_STONE = 139,                     // 合成地玉石
    REBIRTH = 140,                           // 武将重生
    ACT_TURNTABLE_PULL = 141,                // 活动 幸运转盘抽奖
    ACT_TASK_PASS = 142,                     // 活动 战令奖励
    ACT_TASK_PASS_SPD_UP = 143,              // 活动 战令加速
    ACT_GUILD_PAY_REWARD = 144,              // 活动 军团人数奖励
    RECEIVE_CHAPTER_BOX = 145,               // 领取主线章节宝箱
    JEWEL_INHERIT = 146,                     // 天晶继承
    RESET_TALENT = 147,                      // 洗点
    RECEIVE_TOWER_BOX = 148,                 // 领取镇念塔节点奖励 
    ACT_DAILY_COIN_RECEIVE_BOX = 149,        // 招财进宝领取宝箱 
    USE_VOUCHER = 150,                       // 使用代金券
    LADDER_BUY_CNT = 151,                    // 名将擂台购买次数
    LADDER_BATTLE_REWARD = 152,              // 名将擂台关卡奖励
    ACT_GROUP_SHOP_BUY = 153,                // 团购
    ACT_TURNTABLE_RECEIVE_BOX = 154,         // 活动 幸运转盘领取宝箱
    ACT_BIND_PHONE = 155,                    // 活动 绑定手机奖励
    ARTIFACT_DECOMPOSE = 156,                // 宝物分解
    ARTIFACT_LV = 157,                       // 宝物升级
    ARTIFACT_QUALITY = 158,                  // 宝物升品
    ARTIFACT_TRANSFER = 159,                 // 宝物转换
    ARTIFACT_REBUILD = 160,                  // 宝物重铸
    GVG_ACTIVE_TECH = 161,                   // 千机阁解锁
    GVG_LOGIN = 162,                         // 每日登录
    GVG_EXCHANGE_SEEDS = 163,                // 兑换种子等
    PLANT = 164,                             // 种田
    PLANT_ROLLBACK = 165,                    // 种田的时候田已经被抢了回滚
    HARVEST = 166,                           // 收获
    MINE_END = 167,                          // 挖矿
    GVG_RECEIVE_BOX = 167,                   // 领取宝箱
    GVG_RECEIVE_LV = 168,                    // 领取等级奖励
    GVG_RECEIVE_TASK = 169,                  // 领取任务奖励
    GVG_VESTIGE_START = 170,                 // gvg征战中原挑战
    GVG_VESTIGE_END = 171,                   // gvg征战中原挑战
    GVG_VESTIGE_RECEIVE_RANK = 172,          // gvg征战中原领取排行榜奖励
    GVG_TECH_SEND_KNIFE = 173,               // gvg点科技树发放诸葛连弩
    GVG_REVIVE = 174,                        // gvg复活队伍
    GVG_USE_ITEM = 175,                      // gvg使用连弩
}

export enum TA_EVENT {
    REGISTER = 'register',                   // 注册
    CREATE_ROLE = 'create_role',             // 创建角色
    RECHARGE = 'recharge',                   // 发起充值
    RECHARGE_SUCCESS = 'recharge_success',   // 充值成功
    RECHARGE_FAIL = 'recharge_fail',         // 充值失败
    AP_GET = 'ap_get',                       // 获得体力
    // AP_CONSUME = 'ap_consume',               // 体力消耗
    PVP_SEASON_END = 'PVP_season_end',       // pvp赛季结算
    GUILD_DISMISS = 'guild_dissolute',       // 军团解散
    GUILD_QUIT = 'guild_quit',               // 军团退出
    GUILD_MASTER_CHANGE = 'guild_master_change',  // 军团长改变
    AUCTION_ITEM_GET = 'AH_item_get',        // 拍卖行拍品获得
    AUCTION_DIVIDEND = 'AH_bonus_get',       // 拍卖行分红领取
    ITEM_GET = 'item_get',                   // 道具获得
    ITEM_CONSUME = 'item_consume',           // 道具消耗
    GK_FIRST_PASS = 'gk_first_pass',         // 关卡首次通关
}

// 军团解散way字段
export enum GUILD_DISMISS_WAY {
    GAME = "游戏内",
    BACKEND = "后台",
}

export enum GUILD_MASTER_CHANGE_WAY {
    SET_AUTH = "转让",
    IMPEACH = "弹劾",
    BACKEND = "后台",
}

export enum GUILD_QUIT_WAY {
    QUIT = '主动退出',
    KICK = '踢出',
    DISMISS = '解散',
}

export function getAuctionSourceTypeName(sourceType: number) {
    switch(sourceType) {
        case 1: return '军团演武';
        case 2: return '蛮夷入侵';
        case 3: return '诸侯混战';
        case 4: return '粮草先行';
    }
}

export enum TA_USERSET_TYPE {
    SET = 1,
    SET_ONCE = 2,
    ADD = 3
}

// 试炼奖励类型
export enum TRAIN_REWARD_TYPE {
    SCORE = 1,  // 练兵场压制积分
    ITEM = 2,   // 练兵场物品奖励
}
    
export enum GM_API_TYPE {
    add = 'ad',     // 增
    del = 'del',     // 删
    update = 'update',  // 改
    find = 'find',    // 查
}

export enum LOG_TYPE {
    LOGIN = 'login',              // 登录
    LOGINOUT = 'logout',          // 登出
    CE_CHANGE = 'ceChange',       // 战力变化
    PAY = 'pay',                  // 充值
    ITEM_CHANGE = 'itemChange',   // 道具变动
    RECEIVE_MAIL = 'receiveMail', // 领取邮件
    GATE_HP = 'gateHp', // 诸侯混战城门
    BOSS_HP = 'bossHp', // 演武台boss血量
    REBIRTH = 'rebirth', // 演武台boss血量
    MEMORY = 'memory', // 保存内存
}

export enum MEMORY_LOG_TYPE {
    ACTIVITY = 'activity',        // 活动
    PVP_SEASON = 'pvpSeason',     // pvp赛季
    GA_INDEX = 'gaIndex',         // 军团活动index
    COMBATTLE = 'comBattle',      // 寻宝活动
}

export enum CE_CHANGE_REASON {
    HERO = 'hero',             // 武将
    
}

export enum TALENT_RELATION_TYPE {
    NORMAL = 1, // 正常
    CONFLICT = 2, // 冲突
    REPLACE = 3, // 替换
}

export const REFUND_PRICE_TO_GOLD = 10; // 退款以价格*10扣除元宝

//上传记录时加个枚举区分各模块
export enum GuideUnloadNum {
    UpNewFuncNum = 1000, //升级开启的新功能页面
    GkNewFuncNum = 2000, //关卡开启的新功能页面
    LvUpNum = 10000, //升级页面
}

// 功能开启id，写死
export enum SYSTEM_OPEN_ID {
    EXPEDITION = 36,   // 远征
}

export const DEBUG_PRICE = 0.01;

export enum PVP_SEASON_STATUS {
    START = 1,   // 已开始
    SUMMIT = 2,  // 结算中
    WAITING = 3, // 待新赛季
}