import { isArray, isBoolean, isNumber, isString } from "underscore";
import { BLOCK_OPEATE, DEBUG_MAGIC_WORD, GM_MAIL_TYPE, GUILD_AUTH, GUILD_STRUCTURE, GVG_RESOURCE_TYPE, GVG_SEED_TYPE, LEAGUE_JOB, LINEUP_NUM, MSG_TYPE } from "../consts";
import { pvpEndParamInter } from "../pubUtils/interface";
import { isDevelopEnv } from "./utilService";

export function checkRouteParam(route: string, msg: any) {
    switch(route) {
        case 'activity.activityHandler.getAllOpenActivity':
        case 'activity.gachaHandler.getGachaList':
        case 'activity.gachaHandler.getVisitedHero':
        case 'activity.gachaHandler.getGuideGachaData':
        case 'activity.selfServiceShopHandler.getSelfServiceShopActivity':
        case "battle.comBattleHandler.cancelSearch":
        case "battle.comBattleHandler.getTeamRec":
        case "battle.comBattleHandler.getAssistCnt":
        case "battle.comBattleHandler.getComBtlCnt":
        case "battle.comBattleHandler.getRecentTeammates":
        case "battle.comBattleHandler.getTeamInvitation":
        case "battle.dailyBattleHandler.getData":
        case "battle.dungeonBattleHandler.getData":
        case "battle.eventBattleHandler.getEvents":
        case "battle.expeditionBattleHandler.getStatus":
        case "battle.expeditionBattleHandler.resetStatus":
        case "battle.normalBattleHandler.getMainStarBox":
        case "battle.pvpHandler.getData":
        case "battle.pvpHandler.refreshOppPlayer":
        case "battle.pvpHandler.getRank":
        case "battle.pvpHandler.getRec":
        case "battle.ladderHandler.getData":
        case "battle.ladderHandler.refreshOppPlayers":
        case "battle.ladderHandler.getRec":
            
        case "battle.towerBattleHandler.getStatus":
        case "battle.towerBattleHandler.checkHangUpRewards":
        case "battle.towerBattleHandler.recHangUpRewards":
        case "battle.towerBattleHandler.getTasks":
        case "battle.towerBattleHandler.refreshTasks":
        case "chat.chatHandler.getRecentPrivateChats":
        case "chat.chatHandler.getGroupMessages":
        case "connector.entryHandler.getData":
        case "connector.entryHandler.refresh":        
        case "gate.gateHandler.queryEntry":
        case "guild.auctionHandler.checkDividend":
        case "guild.auctionHandler.myWatching":
        case "guild.cityActivityHandler.getCityActivity":
        case "guild.cityActivityHandler.resetChallengeTime":
        case "guild.donateHandler.getDonation":
        case "guild.gateActivityHandler.getGateActivity":
        case "guild.guildBossHandler.getBossInstance":
        case "guild.guildBossHandler.openBossInstance":
        case "guild.guildBossHandler.battleBoss":
        case "guild.guildHandler.getMyGuildInfo":
        case "guild.guildHandler.getInviteMemberList":
        case "guild.guildHandler.getActiveRank":
        case "guild.guildRefineHandler.getRefine":
        case "guild.guildTrainHandler.getTrainInstance":
        case "guild.guildTrainHandler.getTrainReports":
        case "guild.guildTrainHandler.getTrainBoxs":
        case "guild.raceActivityHandler.getRaceActivity":
        case "guild.raceActivityHandler.join":
        case "guild.raceActivityHandler.getRace":
        case "guild.wishPoolHandler.getWishPool":
        case "guild.wishPoolHandler.getReports":
        case "role.friendHandler.getRecommend":
        case "role.friendHandler.getApplyList":
        case "role.friendHandler.getFriendList":
        case "role.friendHandler.getBlackList":
        case "role.itemHandler.getAp":
        case "role.mailHandler.getMails":
        case "role.rankHandler.getGeneralRank":
        case "role.rankHandler.getRankReward":
        case "role.roleHandler.roleTitleLevelUp":
        case "role.roleHandler.getSchoolList":
        case "role.taskHandler.getPvpTaskList":
        case "role.taskHandler.getTaskList":
        case "role.taskHandler.receiveActiveReward":
        case "role.artifactHandler.composeAll":
        case "guild.gvgHandler.getData":
        case "guild.gvgHandler.getMap":
        case "guild.gvgHandler.getRec":
        case "guild.gvgHandler.getContribute":
        case "guild.gvgHandler.getTech":
        case "guild.gvgManageHandler.getApplies":
        case "guild.gvgManageHandler.getLeagueInvitations":
        case "guild.gvgFightHandler.getLeagueRank":
        case "guild.gvgFightHandler.getLeagueDetailRank":
        case "guild.gvgFightHandler.receiveBox":
            {
                break;
            }
        case 'activity.activityMonopolyHandler.getMonopolyActivity':
        case 'activity.dailyChallengeHandler.getDailyChallengesActivity':
        case 'activity.dailyCoinHandler.getDailyCoinActivity':
        case 'activity.dailyGiftsHandler.getDailyGiftsActivity':
        case 'activity.dailyGKHandler.getDailyGKActivity':
        case 'activity.dailyMealHandler.getDailyMealActivity':
        case 'activity.dailyRMBGiftsHandler.getDailyRMBGiftsActivity':
        case 'activity.firstGiftHandler.getFirstGiftActivity':
        case 'activity.growthFundHandler.getGrowthFundActivity':
        case 'activity.growthHandler.getGrowthActivity':
        case 'activity.guildPayHandler.getGuildPayData':
        case 'activity.limitPackageHandler.getNewPlayerLimitPackageActivity':
        case 'activity.luckyTurntableHandler.getTurntableData':
        case 'activity.monthlyTicketHandler.getMonthlyTicketActivity':
        case 'activity.newHeroGachaHandler.getNewHeroGachaActivity':
        case 'activity.newHeroGiftsHandler.getNewHeroGiftsActivity':
        case 'activity.newHeroGKHandler.getNewHeroGKActivity':
        case 'activity.popUpShopHandler.getPopUpShopActivity':
        case 'activity.rechargeMoneyHandler.getRechargeMoneyActivity':
        case 'activity.refreshShopHandler.getRefreshShopActivity':
        case 'activity.refreshTaskHandler.getRefreshTaskActivity':
        case 'activity.sevenDaysHandler.getSevenDaysActivity':
        case 'activity.signInHandler.getSignInActivity':
        case 'activity.taskPassHandler.getTaskPassData':
        case 'activity.thirtyDaysHandler.getThirtyDaysActivity':
        case 'activity.timeLimitRankHandler.getTimeLimitRankData':
        case 'activity.treasureHuntHandler.getTreasureHuntActivity':
        case 'activity.vipRechargeMoneyHandler.getVipRechargeMoneyActivity':
        case 'activity.yuanbaoShopHandler.getShopActivity':
        case 'activity.groupShopHandler.getGroupShopPage':
        case 'activity.groupShopHandler.leaveGroupShopPage':
            {
                if(!checkNaturalNumbers(msg.activityId)) return false;
                break;
            }
        case 'activity.activityMonopolyHandler.move':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.step)) return false;
                if(msg.step < 0 || msg.step > 7) return false;
                break;
            }
        case 'activity.activityMonopolyHandler.bank':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.addCount)) return false;
                break;
            }
        case 'activity.activityMonopolyHandler.getRefreshShopActivity':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.shopActivityId)) return false;
                break;
            }
        case 'activity.activityMonopolyHandler.buyGood':
            {
                let {monopolyActivityId, shopActivityId, roundIndex, id, pageIndex} = msg;
                if(!checkNaturalNumbers(monopolyActivityId, shopActivityId, roundIndex, id, pageIndex)) return false;
                break;
            }
            case 'activity.dailyChallengeHandler.getDailyChallengeReward':
            case 'activity.sevenDaysHandler.getDailyChallengeReward':
            {
                let {activityId, dayIndex, cellIndex, type} = msg;
                if(!checkNaturalNumbers(activityId, dayIndex, cellIndex, type)) return false;
                break;
            }
        case 'activity.dailyCoinHandler.exchangeCoin':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.count)) return false;
                break;
            }
        case 'activity.dailyCoinHandler.receiveExtraReward':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.cellIndex)) return false;
                break;
            }
        case 'activity.dailyGiftsHandler.buyDailyGiftsCell':
        case 'activity.sevenDaysHandler.buyDailyGiftsCell':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.dayIndex, msg.cellIndex)) return false;
                break;
            }
        case 'activity.dailyGKHandler.getGK':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.dayIndex)) return false;
                break;
            }
        case 'activity.dailyMealHandler.getDailyMealReward':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.type)) return false;
                break;
            }
        case 'activity.dailyRMBGiftsHandler.getDailyRMBGiftsReward':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.id)) return false;
                break;
            }
        case 'activity.firstGiftHandler.getFirstGiftReward':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.pageIndex)) return false;
                break;
            }
        case 'activity.gachaHandler.pull':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.gachaId, msg.count)) return false;
                break;
            }
        case 'activity.gachaHandler.setHope':
            {
                if(!checkNaturalNumbers(msg.gachaId)) return false;
                if(!checkNaturalArray(msg.hope)) return false;
                for(let { id, hid } of msg.hope) {
                    if(!checkNaturalNumbers(id, hid)) return false;
                }
                break;
            }
        case 'activity.gachaHandler.drawTurnTable':
            {
                if(!checkNaturalNumbers(msg.gachaId)) return false;
                break;
            }
        case 'activity.gachaHandler.setPickHero':
            {
                if(!checkNaturalNumbers(msg.gachaId, msg.activityId, msg.pickHero)) return false;
                break;
            }
        case 'activity.gachaHandler.visitHero':
            {
                if(!checkNaturalNumbers(msg.hid)) return false
                break;
            }
        case 'activity.gachaHandler.guidePull':
            {
                if(!checkNaturalNumbers(msg.activityId)) return false;
                break;
            }
        case 'activity.gachaHandler.saveToCandidates':
        case 'activity.gachaHandler.decide':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.id)) return false;
                break;
            }
        case 'activity.growthFundHandler.getGrowthFundCellReward':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.pageIndex, msg.cellIndex)) return false;
                break;
            }
        case 'activity.growthHandler.getGrowthCellReward':
        case 'activity.sevenDaysHandler.getGrowthCellReward':
            {
                let {activityId, dayIndex, cellIndex, type} = msg;
                if(!checkNaturalNumbers(activityId, dayIndex, cellIndex, type)) return false;
                break;
            }
        case 'activity.growthHandler.getGrowthDayReward':
        case 'activity.sevenDaysHandler.getGrowthDayReward':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.id)) return false;
                break;
            }
        case 'activity.guildPayHandler.receiveItems':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.cellIndex)) return false;
                break;
            }
        case 'activity.limitPackageHandler.getLimitPackageActivity':
            {
                if(!checkNaturalNumbers(msg.activityId)) return false;
                break;
            }
        case 'activity.limitPackageHandler.buyGood':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.roundIndex, msg.id)) return false;
                break;
            }
        case 'activity.luckyTurntableHandler.pull':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.count)) return false;
                break;
            }
        case 'activity.luckyTurntableHandler.receiveBox':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.boxCount)) return false;
                break;
            }
        case 'activity.monthlyTicketHandler.getMonthlyTicketReward':
            {
                if(!checkNaturalNumbers(msg.activityId)) return false;
                break;
            }
        case 'activity.newHeroGachaHandler.selectedHero':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.hid)) return false;
                break;
            }
        case 'activity.newHeroGachaHandler.pull':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.hid, msg.count)) return false;
                break;
            }
        case 'activity.newHeroGiftsHandler.exchangePoint':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.index)) return false;
                break;
            }
        case 'activity.newHeroGKHandler.getGK':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.pageIndex, msg.index)) return false;
                break;
            }
        case 'activity.popUpShopHandler.checkPopUpCondition':
            {
                if(!checkNaturalNumbers(msg.conditionType)) return false;
                break;
            }
        case 'activity.popUpShopHandler.buyGift':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.id)) return false;
                if(!checkNaturalStrings(msg.code)) return false;
                break;
            }
        case 'activity.rechargeMoneyHandler.pull':
            {
                if(!checkNaturalNumbers(msg.activityId)) return false;
                break;
            }
        case 'activity.refreshShopHandler.buyGood':
            {
                let { activityId, roundIndex, id, pageIndex, count } = msg;
                if(!checkNaturalNumbers(activityId, roundIndex, id, pageIndex, count)) return false;
                break;
            }
        case 'activity.refreshTaskHandler.getReward':
            {
                let {activityId, roundIndex, pageIndex, id, type} = msg;
                if(!checkNaturalNumbers(activityId, roundIndex, id, pageIndex, type)) return false;
                break;
            }
        case 'activity.refreshTaskHandler.exchangePoint':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.roundIndex)) return false;
                break;
            }
        case 'activity.selfServiceShopHandler.buyGift':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.roundIndex, msg.index)) return false;
                break;
            }
        case 'activity.selfServiceShopHandler.saveGood':
            {
                let { data = [] } = msg;
                for(let { activityId, roundIndex, index, cellIndex, rewardIndex } of data) {
                    if(!checkNaturalNumbers(activityId, roundIndex, index, cellIndex, rewardIndex)) return false;
                }
                break;
            }
        case 'activity.selfServiceShopHandler.buyRecources':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.roundIndex)) return false;
                break;
            }
        case 'activity.selfServiceShopHandler.getWarId':
            {
                if(!checkNaturalNumbers(msg.activityId)) return false;
                break;
            }
        case 'activity.signInHandler.getSignInReward':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.dayIndex)) return false;
                break;
            }
        case 'activity.taskPassHandler.receiveItems':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.pageIndex, msg.lv)) return false;
                break;
            }
        case 'activity.taskPassHandler.speedUp':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.count)) return false;
                break;
            }
        case 'activity.thirtyDaysHandler.getThirtyDaysCellReward':
            {
                let { activityId, pageIndex, cellIndex, tab } = msg;
                if(!checkNaturalNumbers(activityId, pageIndex, cellIndex, tab)) return false;
                break;
            }
        case 'activity.thirtyDaysHandler.getThirtyDaysPointReward':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.cellIndex)) return false;
                break;
            }
        case 'activity.timeLimitRankHandler.getRank':
            {
                if(!checkNaturalNumbers(msg.activityId)) return false;
                break;
            }
        case 'activity.treasureHuntHandler.getFirstPageReward':
            {
                if(!checkNaturalNumbers(msg.activityId)) return false;
                break;
            }
        case 'activity.treasureHuntHandler.buyGoods':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.cellIndex, msg.count)) return false;
                break;
            }
        case 'activity.treasureHuntHandler.getTaskReward':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.cellIndex)) return false;
                break;
            }
        case 'activity.treasureHuntHandler.challenge':
            {
                if(!checkNaturalNumbers(msg.activityId)) return false;
                break;
            }
        case 'activity.treasureHuntHandler.buyTreasureShopGoods':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.cellIndex, msg.count)) return false;
                break;
            }
        case 'activity.vipRechargeMoneyHandler.getVipRechargeMoneyReward':
            {
                if(!checkNaturalNumbers(msg.activityId, msg.id)) return false;
                break;
            }
        case 'activity.vipRechargeMoneyHandler.getOrderList':
            {
                if(!checkNaturalNumbers(msg.begin, msg.count)) return false;
                if(msg.count < 0 && msg.count > 100) return false
                break;
            }
        case 'activity.groupShopHandler.buy':
            {
                let { activityId, price, itemId, buyCnt } = msg;
                if(!checkNaturalNumbers(activityId, price, itemId, buyCnt)) return false;
                break;
            }
        case "battle.barrageHandler.getBarrageList":
            {
                if(!checkNaturalStrings(msg.rid)) return false;
                break;
            }
        case "battle.barrageHandler.sendBarrage":
            {
                let { warId, rid, index, content } = msg;
                if(!checkNaturalNumbers(warId)) return false;
                if(!checkNaturalStrings(rid, index, content)) return false;
                break;
            }
        case "battle.comBattleHandler.createTeam":
            {
                let { blueprtId, pub, ceLimit } = msg;
                if(!checkNaturalNumbers(blueprtId, ceLimit)) return false;
                if(!checkBoolean(pub)) return false;
                break;
            }
        case "battle.comBattleHandler.searchTeam":
            {
                let { lv, magicWord } = msg;
                if(!checkNumberArray(lv)) return false;
                if(!!magicWord && magicWord != DEBUG_MAGIC_WORD) return false;
                break;
            }
        case "battle.comBattleHandler.joinTeam":
            {
                if(!checkNaturalStrings(msg.teamCode)) return false;
                if(!checkBoolean(msg.isFrd)) return false;
                break;
            }
        case "battle.comBattleHandler.setFrdAssistance":
            {
                if(!checkNaturalStrings(msg.teamCode)) return false;
                if(!checkBoolean(msg.isFrd)) return false;
                break;
            }
        case "battle.comBattleHandler.setupHeroes":
            {
                let { teamCode, heroes, battleCode } = msg;
                if(!checkNaturalStrings(teamCode, battleCode)) return false;
                if(!checkNumberArray(heroes)) return false;
                break;
            }
        case "battle.comBattleHandler.rmTeammate":
            {
                if(!checkNaturalStrings(msg.teamCode, msg.roleIdToRm)) return false;
                break;
            }
        case "battle.comBattleHandler.dismiss":
        case "battle.comBattleHandler.startBattle":
        case "battle.comBattleHandler.autoInvite":
        case "battle.comBattleHandler.comBattleEnd":
        case "battle.comBattleHandler.getComBtlStatus":
            {
                if(!checkNaturalStrings(msg.teamCode)) return false;
                break;
            }
        case "battle.comBattleHandler.action":
            {
                let { teamCode, bossHurts, killed, curRnd } = msg;
                if(!checkNaturalStrings(teamCode)) return false;
                if(!checkNumberArray(killed)) return false;
                if(!checkNaturalNumbers(curRnd)) return false;
                if(!checkArrayCanEmpty(bossHurts)) return false;
                for(let { hid, dataId, hurtHp } of bossHurts) {
                    if(hid && !checkNaturalNumbers(hid)) return false;
                    if(!checkNaturalNumbers(dataId)) return false;
                    if(!isNumber(hurtHp)) return false
                }
                break;
            }
        case "battle.comBattleHandler.getBlueprtCount":
            {
                if(!checkNumberArray(msg.ids)) return false;
                break;
            }
        case "battle.comBattleHandler.sendTeamMsg":
            {
                let { teamCode, type, content, targetRoleId, targetMsgCode } = msg;
                if(!checkNaturalStrings(teamCode, content)) return false;
                if(!checkStringIfExist(targetRoleId, targetMsgCode)) return false;
                if(!checkNaturalNumbers(type)) return false;
                break;
            }
        case "battle.comBattleHandler.inviteTeammate":
            {
                if(!checkNaturalStrings(msg.teamCode, msg.targetRoleId)) return false;
                break;
            }
        case "battle.dailyBattleHandler.buyNum":
            {
                if(!checkNaturalNumbers(msg.type, msg.count)) return false;
                break;
            }
        case "battle.dungeonBattleHandler.buyNum":
            {
                if(!checkNaturalNumbers(msg.count)) return false;
                break;
            }
        case "battle.dungeonBattleHandler.getFirstInfo":
            {
                if(!checkNaturalNumbers(msg.movePoint)) return false;
                break;
            }
        case "battle.eventBattleHandler.checkAnswer":
            {
                let {eventId, eventCode, questionId, answer} = msg;
                if(!checkNaturalNumbers(eventId, questionId, answer)) return false;
                if(!checkNaturalStrings(eventCode)) return false;
                break;
            }
        case "battle.eventBattleHandler.receiveEventReward":
            {
                if(!checkNaturalNumbers(msg.eventId)) return false;
                if(!checkNaturalStrings(msg.eventCode)) return false;
                break;
            }
        case "battle.expeditionBattleHandler.getEnemies":
            {
                if(!checkNaturalNumbers(msg.expeditionId)) return false;
                if(!checkNaturalStrings(msg.expeditionCode)) return false;
                break;
            }
        case "battle.expeditionBattleHandler.checkBattle":
            {
                let { expeditionCode, expeditionId, battleId, heroes } = msg;
                if(!checkNaturalStrings(expeditionCode)) return false;
                if(!checkNaturalNumbers(expeditionId, battleId)) return false;
                if(!checkNumberArray(heroes)) return false
                break;
            }
        case "battle.expeditionBattleHandler.battleEnd":
            {
                let { expeditionCode, expeditionId, battleCode, battleId, isSuccess, heroes, enemies, star, stars } = msg;
                if(!checkNaturalStrings(expeditionCode, battleCode)) return false;
                if(!checkNaturalNumbers(expeditionId, battleId)) return false;
                if(!checkBoolean(isSuccess)) return false;
                if(!checkExpeditionBattleHeroFormat(heroes, enemies)) return false;
                if(!checkNumberArray(stars)) return false;
                break;
            }
            case "battle.expeditionBattleHandler.pointReward":
                {
                    if(!checkNaturalNumbers(msg.point)) return false;
                    break;
                }
            case "battle.expeditionBattleHandler.skipExpedition":
                {
                    if(!checkNaturalStrings(msg.expeditionCode)) return false;
                    if(!checkNaturalNumbers(msg.expeditionId, msg.battleId)) return false;
                    break;
                }
        case "battle.normalBattleHandler.checkBattle":
            {
                let { battleId, heroes } = msg;
                if(!checkNaturalNumbers(battleId)) return false;
                if(!checkNumberArray(heroes)) return false
                break;
            }
        case "battle.normalBattleHandler.getBattleList":
            {
                if(!checkNumberArray(msg.types)) return false;
                break;
            }
        case "battle.normalBattleHandler.battleEnd":
            {
                let { battleCode, battleId, isSuccess, heroes, stars, activityId = 0, pageIndex = 0 } = msg;
                if(!checkNaturalStrings(battleCode)) return false;
                if(!checkNaturalNumbers(battleId, activityId, pageIndex)) return false;
                if(!checkBoolean(isSuccess)) return false;
                if(!checkNumberArray(heroes, stars)) return false;
                break;
            }
        case "battle.normalBattleHandler.battleSweep":
            {
                if(!checkNaturalNumbers(msg.battleId, msg.count)) return false;
                break;
            }
        case "battle.normalBattleHandler.saveScript":
            {
                if(!checkNaturalNumbers(msg.battleId, msg.type)) return false;
                if(!checkNaturalStrings(msg.script)) return false;
                break;
            }
        case "battle.normalBattleHandler.getScriptByBattle":
            {
                if(!checkNumberArray(msg.battleIds)) return false;
                break;
            }
        case "battle.normalBattleHandler.getRegretCnt":
            {
                if(!checkNaturalNumbers(msg.warId)) return false;
                if(!checkNaturalStrings(msg.battleCode)) return false;
                break;
            }
        case "battle.normalBattleHandler.incRegretCnt":
            {
                if(!checkNaturalNumbers(msg.warId, msg.count)) return false;
                if(!checkNaturalStrings(msg.battleCode)) return false;
                break;
            }
        case "battle.normalBattleHandler.receiveChapterBox":
            {
                if(!checkNaturalNumbers(msg.chapter, msg.id, msg.warType)) return false;
                break;
            }
        case "battle.normalBattleHandler.receiveWarReward":
            {
                if(!checkNaturalNumbers(msg.chapter, msg.warType)) return false;
                break;
            }
        case "battle.pvpHandler.getOppPlayer":
        case "battle.pvpHandler.getPlayerDetail":
            {
                if(!checkNaturalStrings(msg.roleId)) return false;
                break;
            }
        case "battle.pvpHandler.pvpStart":
            {
                if(!checkNaturalNumbers(msg.warId)) return false;
                if(!checkNaturalStrings(msg.roleId)) return false;
                break;
            }
        case "battle.pvpHandler.pvpEnd":
            {
                let { battleCode, isSuccess, myHeroes, oppHeroes } = msg;
                if(!checkNaturalStrings(battleCode)) return false;
                if(!checkBoolean(isSuccess)) return false;
                if(!checkPvpEndHeroFormat(myHeroes, oppHeroes)) return false
                break;
            }
        case "battle.pvpHandler.buyAttackCnt":
            {
                if(!checkNaturalNumbers(msg.count)) return false;
                break;
            }
        case "battle.pvpHandler.saveAttack":
            {
                let { heroes } = msg;
                if(!checkNaturalArray(heroes)) return false;
                if (heroes.length > LINEUP_NUM) return false;
                for(let { actorId, order } of heroes) {
                    if(!checkNaturalNumbers(actorId)) return false;
                    if(!checkNumberIfExist(order)) return false;
                }
                break;
            }
        case "battle.pvpHandler.saveDefense":
            {
                let { heroes, warId, buff } = msg;
                if(!checkNaturalArray(heroes)) return false;
                if(!checkNaturalNumbers(warId, buff)) return false;
                if (heroes.length > LINEUP_NUM) return false;
                for(let { actorId, dataId, order, ai } of heroes) {
                    if(!checkNaturalNumbers(actorId, dataId, order, ai)) return false;
                }
                break;
            }
        case "battle.pvpHandler.receiveBox":
            {
                if(!checkNaturalNumbers(msg.id)) return false;
                break;
            }
        case "battle.ladderHandler.getOppLineup":
            {
                if(!checkNaturalStrings(msg.roleId)) return false;
                if(!checkNaturalNumbers(msg.rank)) return false;
                break;
            }
        case "battle.ladderHandler.chooseOpp":
            {
                if(!checkNaturalStrings(msg.roleId)) return false;
                if(!checkNaturalNumbers(msg.rank, msg.myRank)) return false;
                break;
            }
        case "battle.ladderHandler.chooseOpp":
            {
                if(!checkNaturalStrings(msg.roleId)) return false;
                if(!checkNaturalNumbers(msg.rank, msg.myRank)) return false;
                break;
            }
        case "battle.ladderHandler.giveupCheck":
        case "battle.ladderHandler.getOppData":
            {
                if(!checkNaturalStrings(msg.battleCode)) return false;
                break;
            }
        case "battle.ladderHandler.checkBattle":
            {
                if(!checkNaturalStrings(msg.battleCode)) return false;
                if(!checkNaturalNumbers(msg.battleId)) return false;
                if(!checkArrayCanEmpty(msg.heroes)) return false;
                for(let { actorId, order } of msg.heroes) {
                    if(!checkNaturalNumbers(actorId, order)) return false;
                }
                break;
            }
        case "battle.ladderHandler.battleEnd":
            {
                if(!checkNaturalStrings(msg.battleCode)) return false;
                if(!checkBoolean(msg.isSuccess)) return false;
                break;
            }
        case "battle.ladderHandler.battleSweep":
            {
                if(!checkNaturalStrings(msg.roleId)) return false;
                if(!checkNaturalNumbers(msg.rank, msg.count)) return false;
                break;
            }
        case "battle.ladderHandler.saveDefense":
            {
                if(!checkNaturalNumbers(msg.warId)) return false;
                if(!checkArrayCanEmpty(msg.heroes)) return false;
                for(let { actorId, dataId, order } of msg.heroes) {
                    if(!checkNaturalNumbers(actorId, dataId, order)) return false;
                }
                break;
            }
        case "battle.ladderHandler.buyCnt":
            {
                if(!checkNaturalNumbers(msg.count)) return false;
                break;
            }
        case "battle.towerBattleHandler.resetLv":
            {
                if(!checkNaturalNumbers(msg.towerLv)) return false;
                break;
            }
        case "battle.towerBattleHandler.skipTower":
            {
                if(!checkNaturalNumbers(msg.toLv)) return false;
                break;
            }
        case "battle.towerBattleHandler.hangUpSpeedUp":
            {
                if(!checkNaturalNumbers(msg.speedUpCnt)) return false;
                break;
            }
        case "battle.towerBattleHandler.sendTaskHero":
            {
                let { batchCode, tasks } = msg;
                if(!checkStringIfExist(batchCode)) return false;
                if(!checkNaturalArray(tasks)) return false;
                for(let { taskCode, heroes } of tasks) {
                    if(!checkNaturalStrings(taskCode)) return false;
                    if(!checkNumberArray(heroes)) return false;
                }
                break;
            }
        case "battle.towerBattleHandler.settleTask":
            {
                if(!checkStringIfExist(msg.batchCode, msg.taskCode)) return false;
                break;
            }
        case "battle.towerBattleHandler.receiveBox":
            {
                if(!checkNaturalNumbers(msg.id)) return false;
                break;
            }
        case "chat.chatHandler.sendGroupMessage":
            {
                let { channel, type, content, targetRoleId, targetMsgCode} = msg;
                if(!checkNaturalNumbers(type) || !checkIsInEnum(MSG_TYPE, type)) return false;
                if(!checkNaturalStrings(channel)) return false;
                if(type == MSG_TYPE.IMG) {
                    if(!checkNaturalNumbers(content)) return false;
                } else {
                    if(!checkNaturalStrings(content)) return false;
                }
                if(!checkStringIfExist(targetRoleId, targetMsgCode)) return false;
                break;
            }
        case "chat.chatHandler.sendPrivateMessage":
            {
                let { type, content, targetRoleId, targetMsgCode} = msg;
                if(!checkNaturalNumbers(type) || !checkIsInEnum(MSG_TYPE, type)) return false;
                if(type == MSG_TYPE.IMG) {
                    if(!checkNaturalNumbers(content)) return false;
                } else {
                    if(!checkNaturalStrings(content)) return false;
                }
                if(!checkStringIfExist(targetRoleId, targetMsgCode)) return false;
                break;
            }
        case "chat.chatHandler.getPrivateMessage":
            {
                let { targetRoleId, fromSeqId, count } = msg;
                if(!checkNaturalStrings(targetRoleId)) return false;
                if(!checkNumberIfExist(fromSeqId)) return false;
                if(!checkNaturalNumbers(count)) return false;
                if(count < 0 || count > 1000) return false;
                break;
            }
        case "chat.chatHandler.readPrivateMessage":
        case "chat.chatHandler.delPrivateMessage":
            {
                if(!checkNaturalStrings(msg.targetRoleId)) return false;
                break;
            }
        case "chat.chatHandler.setPrivateMessageTop":
            {
                if(!checkNaturalStrings(msg.targetRoleId)) return false;
                if(!checkBoolean(msg.isTop)) return false;
                break;
            }
        case "chat.chatHandler.accuse":
            {
                if(!checkStringIfExist(msg.targetRoleId, msg.targetMsgCode)) return false;
                if(!checkNumberIfExist(msg.reason)) return false;
                break;
            }
        case "connector.entryHanddler.enter":
            {
                if(!checkNaturalStrings(msg.token)) return false;
                if(!checkNaturalNumbers(msg.serverId)) return false;
                break;
            }
        case "connector.entryHandler.gmEnter":
            {
                if(!checkNaturalStrings(msg.token)) return false;
                break;
            }
        case "gm.gmHandler.sendSingleMail":
        case "gm.gmHandler.sendSingleMailTxt":
        case "gm.gmHandler.sendServerMail":
        case "gm.gmHandler.sendServerMailTxt":
            {
                if(!checkNaturalStrings(msg.id)) return false;
                if(!checkBoolean(msg.isPass)) return false;
                break;
            }
        case "gm.gmHandler.reloadResource":
            {
                break;
            }
        case "gm.gmHandler.updateActivity":
            {
                let { groupId, beginTime, endTime, type, data, timeType, days, delayDay, interval, name, hideDayByServer, effectDay } = msg;
                if(!checkNumberIfExist(groupId, beginTime, endTime, type, timeType, days, delayDay, interval, hideDayByServer, effectDay)) return false
                if(!checkStringIfExist(data, name)) return false;
                break;
            }
        case "gm.gmHandler.switchActivity":
            {
                let { activityId, isEnable } = msg;
                if(!checkNaturalNumbers(activityId)) return false;
                if(!checkBoolean(isEnable)) return false;
                break;
            }
        case "gm.gmHandler.deleteActivity":
            {
                if(!checkNaturalNumbers(msg.activityId)) return false;
                break;
            }
        case "gm.gmHandler.updateActivityGroup":
            {
                let { groupId, groupName, serverIds, activityIds, groupType } = msg;
                if(!checkNaturalNumbers(groupId, groupType)) return false;
                if(!checkNaturalStrings(groupName)) return false;
                if(!checkNumberArray(serverIds, activityIds)) return false;
                break;
            }
        case "gm.gmHandler.saveSingleActivityToGroup":
            {
                let { groupId, index, activityId } = msg;
                if(!checkNaturalNumbers(groupId, index, activityId)) return false;
                break;
            }
        case "gm.gmHandler.setGuildActivityDebug":
            {
                let { aid, day, startActivity = 0, endActivity = 0, startGuildAuction = 0, endGuildAuction = 0, startWorldAuction = 0, endWorldAuction = 0, startNextDay = 0 } = msg;
                if(!checkNaturalNumbers(aid, day, startActivity, endActivity, startGuildAuction, endGuildAuction, startWorldAuction, endWorldAuction, startNextDay)) return false;
                break;
            }
        case "gm.gmHandler.cancelGuildActivityDebug":
        case "gm.gmHandler.taflus":
            {
                break;
            }
        case "gm.gmHandler.updateSurvey":
            {
                let { code, surveyId, beginTime, endTime, isEnable, surveyLink, surveyName, roleIndex, goods, mailContent } = msg;
                if(!checkNaturalStrings(code, surveyId, surveyLink, surveyName, goods, mailContent)) return false;
                if(!checkStringIfExist(surveyName)) return false
                if(!checkNaturalNumbers(beginTime, endTime, roleIndex)) return false;
                if(!checkBoolean(isEnable)) return false;
                break;
            }
        case "gm.gmHandler.deleteSurvey":
            {
                if(!checkNaturalStrings(msg.code)) return false;
                break;
            }
        case "gm.gmOrderHandler.getActivitiesCanBuy":
            {
                if(!checkNaturalNumbers(msg.serverId)) return false;
                break;
            }
        case "gm.gmOrderHandler.applyOrder":
            {
                let { serverId, activityId, receiver } = msg;
                if(!checkNaturalNumbers(serverId)) return false;
                if(!checkNaturalArray(activityId)) return false;
                if(!checkNaturalNumbers(activityId[1])) return false;
                if(!checkNaturalStrings(activityId[2])) return false;
                if(!checkNaturalArray(receiver)) return false;
                for(let { env, serverId, roleId, roleName } of receiver) {
                    if(!checkNaturalStrings(env)) return false;
                    if(!checkNaturalNumbers(serverId)) return false;
                    if(!checkStringIfExist(roleId, roleName)) return false;
                }
                break;
            }
        case "gm.gmRoleHandler.addItems":
        case "gm.gmRoleHandler.deleteHero":
        case "gm.gmRoleHandler.dismissGuild":
        case "gm.gmRoleHandler.handleBlock":
        case "gm.gmRoleHandler.setGuildLeader":
        case "gm.gmRoleHandler.setHero":
        case "gm.gmRoleHandler.skipEpilogue":
        case "gm.gmRoleHandler.updateGuild":
        case "gm.gmServerHandler.cancelMarquee":
        case "gm.gmServerHandler.createNewServer":
        case "gm.gmServerHandler.saveRegionConf":
        case "gm.gmServerHandler.sendMarquee":
        case "gm.gmServerHandler.startMaintenance":
        case "gm.gmServerHandler.startRegionMaintenance":
        case "gm.gmServerHandler.stopMaintenance":
        case "gm.gmServerHandler.stopRegionMaintenance":
            {
                break;
            }
        case "guild.auctionHandler.getAuction":
        case "guild.auctionHandler.leaveAuction":
            {
                if(!!msg.magicWord && msg.magicWord != DEBUG_MAGIC_WORD) return false;
                break;
            }
        case "guild.auctionHandler.offer":
            {
                const { code, max, auctionStage, magicWord } = msg;
                if(!checkNaturalStrings(code)) return false;
                if(!checkBoolean(max)) return false;
                if(!checkNaturalNumbers(auctionStage)) return false;
                if(!!magicWord && magicWord != DEBUG_MAGIC_WORD) return false;
                break;
            }
        case "guild.auctionHandler.unWatchLot":
        case "guild.auctionHandler.watchLot":
        case "guild.auctionHandler.getDividend":
            {
                if(!checkNaturalStrings(msg.code)) return false;
                break;
            }
        case "guild.auctionHandler.offerRecs":
        case "guild.auctionHandler.guildLotRecs":
            {
                if(!checkNaturalNumbers(msg.count)) return false;
                if(msg.count < 0 || msg.count > 1000) return false;
                break;
            }
        case "guild.cityActivityHandler.getCityStatus":
        case "guild.cityActivityHandler.declareCity":
            {
                if(!checkNaturalNumbers(msg.cityId)) return false;
                break;
            }
        case "guild.cityActivityHandler.checkBattle":
            {
                if(!checkNaturalNumbers(msg.cityId)) return false;
                if(!checkNumberArray(msg.heroes)) return false;
                break;
            }
        case "guild.cityActivityHandler.hitGate":
            {
                let { cityId, code, damage, hid, round } = msg;
                if(!checkNaturalNumbers(cityId, damage, hid, round)) return false;
                if(!checkNaturalStrings(code)) return false;
                break;
            }
        case "guild.cityActivityHandler.battleEnd":
            {
                let { cityId, code, isSuccess } = msg;
                if(!checkNaturalNumbers(cityId)) return false;
                if(!checkNaturalStrings(code)) return false;
                if(!checkBoolean(isSuccess)) return false;
                break;
            }
        case "guild.donateHandler.donate":
        case "guild.donateHandler.receiveBox":
            {
                if(!checkNaturalNumbers(msg.id)) return false;
                break;
            }
        case "guild.gateActivityHandler.checkBattle":
            {
                if(!checkNumberArray(msg.heroes)) return false;
                break;
            }
        case "guild.gateActivityHandler.action":
            {
                let { code, round, record } = msg;
                if(!checkNaturalStrings(code)) return false;
                if(!checkNaturalNumbers(round)) return false;
                if(!checkArrayCanEmpty(record)) return false;
                for(let { round, dataId } of record) {
                    if(!checkNaturalNumbers(round, dataId)) return false;
                }
                break;
            }
        case "guild.gateActivityHandler.battleEnd":
            {
                let { code, isSuccess } = msg;
                if(!checkNaturalStrings(code)) return false;
                if(!checkBoolean(isSuccess)) return false;
                break;
            }
        case "guild.guildBossHandler.getBossInstanceByBattleCode":
            {
                if(!checkNaturalStrings(msg.battleCode)) return false;
                break;
            }
        case "guild.guildBossHandler.action":
            {
                if(!checkNaturalStrings(msg.bossCode, msg.battleCode)) return false;
                if(!checkNaturalNumbers(msg.damage)) return false;
                break;
            }
        case "guild.guildBossHandler.battleBossEnd":
            {
                if(!checkNaturalStrings(msg.bossCode, msg.battleCode)) return false;
                break;
            }
        case "guild.guildBossHandler.encourage":
            {
                if(!checkNaturalNumbers(msg.count)) return false;
                break;
            }
        case "guild.guildHandler.createGuild":
            {
                let { name, icon, notice } = msg;
                if(!checkNaturalStrings(name)) return false;
                if(!checkNaturalNumbers(icon)) return false;
                if(!checkStringIfExist(notice)) return false;
                break;
            }
        case "guild.guildHandler.getGuildList":
            {
                let { page = 1, showPeopleMax, name } = msg;
                if(!checkStringIfExist(name)) return false;
                if(!checkNaturalNumbers(page)) return false;
                if(!checkBoolean(showPeopleMax)) return false;
                break;
            }
        case "guild.guildHandler.setGuildInfo":
            {
                let { code, name, notice, introduce, ceLimit, isAuto, icon } = msg;
                if(!checkNaturalStrings(code)) return false;
                if(!checkStringIfExist(name, notice, introduce)) return false;
                if(!checkNumberIfExist(ceLimit, icon)) return false;
                if(!checkBooleanIfExist(isAuto)) return false;
                break;
            }
        case "guild.guildHandler.getGuildInfo":
        case "guild.guildHandler.applyGuild":
        case "guild.guildHandler.dismiss":
        case "guild.guildHandler.quit":
        case "guild.guildHandler.getRec":
            {
                if(!checkNaturalStrings(msg.code)) return false;
                break;
            }
        case "guild.guildHandler.setAuth":
            {
                if(!checkNaturalStrings(msg.roleId)) return false;
                if(!checkNaturalNumbers(msg.auth)) return false;
                if(!checkIsInEnum(GUILD_AUTH, msg.auth)) return false;
                break;
            }
        case "guild.guildHandler.getApplyList":
            {
                if(!checkNaturalStrings(msg.code)) return false;
                if(!checkStringIfExist(msg.lastApplyCode)) return false;
                break;
            }
        case "guild.guildHandler.receiveApply":
            {
                if(!checkNaturalStrings(msg.code)) return false;
                if(!checkStringArray(msg.applyCodeList)) return false;
                if(!checkBoolean(msg.isReceived)) return false;
                break;
            }
        case "guild.guildHandler.inviteMember":
            {
                if(!checkNaturalStrings(msg.code)) return false;
                if(!checkStringArray(msg.roleIds)) return false;
                break;
            }
        case "guild.guildHandler.getInvitationList":
            {
                if(!checkStringIfExist(msg.lastApplyCode)) return false;
                break;
            }
        case "guild.guildHandler.receiveInvitation":
            {
                if(!checkStringIfExist(msg.lastApplyCode)) return false;
                if(!checkBoolean(msg.isReceived)) return false;
                break;
            }
        case "guild.guildHandler.getGuildMember":
            {
                if(!checkNaturalStrings(msg.code)) return false;
                if(!checkStringIfExist(msg.sort)) return false;
                break;
            }
        case "guild.guildHandler.kick":
        case "guild.guildHandler.impeach":
            {
                if(!checkNaturalStrings(msg.code, msg.roleId)) return false;
                break;
            }
        case "guild.guildHandler.upStructure":
            {
                if(!checkNaturalStrings(msg.code)) return false;
                if(!checkNaturalNumbers(msg.id)) return false;
                if(!checkIsInEnum(GUILD_STRUCTURE, msg.id)) return false;
                break;
            }
        case "guild.guildHandler.sendMail":
        case "guild.guildHandler.recruit":
            {
                if(!checkNaturalStrings(msg.code, msg.info)) return false;
                break;
            }
        case "guild.guildHandler.receiveActiveBox":
            {
                if(!checkNaturalStrings(msg.code)) return false;
                if(!checkNaturalNumbers(msg.id)) return false;
                break;
            }
        case "guild.guildRefineHandler.refine":
            {
                if(!checkNaturalNumbers(msg.id, msg.count)) return false;
                break;
            }
        case "guild.guildRefineHandler.lightUpTree":
        case "guild.guildRefineHandler.assistRefine":
            {
                if(!checkNaturalNumbers(msg.id)) return false;
                break;
            }
        case "guild.guildTrainHandler.trainBattleStart":
            {
                let { hid, difficulty, trainId, battleId } = msg;
                if(!checkNaturalNumbers(hid, difficulty, trainId, battleId)) return false;
                break;
            }
        case "guild.guildTrainHandler.trainBattleEnd":
            {
                let { battleCode, isSuccess } = msg;
                if(!checkNaturalStrings(battleCode)) return false;
                if(!checkBoolean(isSuccess)) return false;
                break;
            }
        case "guild.guildTrainHandler.getTrainInstanceBox":
            {
                let { trainId, hid, index } = msg;
                if(!checkNaturalNumbers(trainId, hid, index)) return false;
                break;
            }
        case "guild.guildTrainHandler.getTrainLvUpRewards":
            {
                if(!checkNaturalNumbers(msg.trainId)) return false;
                break;
            }
        case "guild.guildTrainHandler.purchaseTrainCount":
            {
                if(!checkNaturalNumbers(msg.count)) return false;
                break;
            }
        case "guild.raceActivityHandler.useItem":
            {
                if(!checkNaturalNumbers(msg.id, msg.count)) return false;
                if(!checkNaturalStrings(msg.toGuild)) return false;
                break;
            }
        case "guild.raceActivityHandler.battleEnd":
            {
                if(!checkNaturalStrings(msg.code)) return false;
                if(!checkBoolean(msg.isSuccess)) return false;
                break;
            }
        case "guild.wishPoolHandler.wishGoods":
            {
                if(!checkNaturalNumbers(msg.goodId, msg.type)) return false;
                break;
            }
        case "guild.wishPoolHandler.donateGoods":
            {
                if(!checkNaturalStrings(msg.wishRoleId, msg.id)) return false;
                break;
            }
        case "guild.wishPoolHandler.receiveGoods":
            {
                if(!checkNaturalStrings(msg.id)) return false;
                break;
            }
        case "guild.gvgHandler.chooseJob":
            {
                if(msg.job != LEAGUE_JOB.FIGHTER && msg.job != LEAGUE_JOB.PRODUCER) return false;
                break;
            }
        case "guild.gvgHandler.receiveBox":
            {
                if(!checkNaturalNumbers(msg.boxId)) return false;
                break;
            }
        case "guild.gvgHandler.receiveLvReward":
            {
                if(!checkNaturalNumbers(msg.lv)) return false;
                break;
            }
        case "guild.gvgHandler.receiveLvReward":
            {
                if(!checkNaturalNumbers(msg.receiveTask)) return false;
                break;
            }
        case "guild.gvgHandler.unlockTech":
            {
                if(!checkNaturalNumbers(msg.techId)) return false;
                break;
            }
        case "guild.gvgHandler.activate":
            {
                if(!checkNaturalNumbers(msg.techId, msg.battleFeats)) return false;
                break;
            }
        case "guild.gvgManageHandler.createLeague":
            {
                let { name, icon, notice } = msg;
                if(!checkNaturalStrings(name)) return false;
                if(!checkStringIfExist(notice)) return false;
                if(!checkNaturalNumbers(icon)) return false;
                break;
            }
        case "guild.gvgManageHandler.getLeagues":
        case "guild.gvgManageHandler.getInviteGuilds":
            {
                let { name, page } = msg;
                if(!checkStringIfExist(name)) return false;
                if(!checkNumberIfExist(page)) return false;
                break;
            }
        case "guild.gvgManageHandler.getLeagueInfo":
        case "guild.gvgManageHandler.getGuilds":
        case "guild.gvgManageHandler.getMembers":
        case "guild.gvgManageHandler.dismiss":
        case "guild.gvgManageHandler.getCandidate":
            {
                if(!checkNaturalStrings(msg.leagueCode)) return false;
                break;
            }
        case "guild.gvgManageHandler.applyLeague":
            {
                if(!checkStringArray(msg.leagueCodes)) return false;
                break;
            }
        case "guild.gvgManageHandler.handleApply":
            {
                if(!checkNaturalStrings(msg.guildCode)) return false;
                if(!checkBoolean(msg.isReceive)) return false;
                break;
            }
        case "guild.gvgManageHandler.inviteGuild":
            {
                if(!checkStringArray(msg.guildCodes)) return false;
                break;
            }
        case "guild.gvgManageHandler.handleInvitation":
            {
                if(!checkNaturalStrings(msg.leagueCode)) return false;
                if(!checkBoolean(msg.isReceive)) return false;
                break;
            }
        case "guild.gvgManageHandler.kick":
        case "guild.gvgManageHandler.quit":
            {
                if(!checkNaturalStrings(msg.guildCode)) return false;
                break;
            }
        case "guild.gvgManageHandler.abdicate":
            {
                if(!checkNaturalStrings(msg.roleId)) return false;
                break;
            }
        case "guild.gvgManageHandler.setLeagueInfo":
            {
                if(!checkNaturalStrings(msg.leagueCode)) return false;
                if(!checkStringIfExist(msg.name, msg.notice)) return false;
                if(!checkNumberIfExist(msg.icon)) return false;
                break;
            }
        case "guild.gvgManageHandler.sendMail":
        case "guild.gvgManageHandler.recruit":
            {
                if(!checkNaturalStrings(msg.content)) return false;
                break;
            }
        case "guild.gvgProduceHandler.exchangeItem": 
            {
                if(!checkNaturalNumbers(msg.id, msg.count)) return false;
                break;
            }
        case "guild.gvgProduceHandler.getProduceList": 
            {
                if(!checkIsInEnum(GVG_RESOURCE_TYPE, msg.type)) return false;
                break;
            }
        case "guild.gvgProduceHandler.getOtherFarms": 
        case "guild.gvgProduceHandler.getMyFarm": 
        case "guild.gvgProduceHandler.getOtherMines": 
            {
                if(!checkNaturalNumbers(msg.farmId)) return false;
                break;
            }
        case "guild.gvgProduceHandler.plant": 
            {
                if(!checkNaturalNumbers(msg.farmId)) return false;
                if(!checkArrayCanEmpty(msg.seeds)) return false;
                for(let { fieldId, seedType, index } of msg.seeds) {
                    if(!checkNaturalNumbers(fieldId, seedType, index)) return false;
                    if(!checkIsInEnum(GVG_SEED_TYPE, seedType)) return false;
                }
                break;
            }
        case "guild.gvgProduceHandler.harvest": 
            {
                if(!checkNaturalNumbers(msg.farmId)) return false;
                if(!checkNumberArray(msg.fieldIds)) return false;
                break;
            }
        case "guild.gvgProduceHandler.plantEnd": 
            {
                if(!checkNaturalNumbers(msg.farmId)) return false;
                break;
            }
        case "guild.gvgProduceHandler.helpHarvest": 
            {
                if(!checkNaturalNumbers(msg.farmId)) return false;
                if(!checkNaturalStrings(msg.roleId)) return false;
                break;
            }
        case "guild.gvgProduceHandler.mineStart": 
        case "guild.gvgProduceHandler.forestryStart": 
            {
                if(!checkNaturalNumbers(msg.farmId, msg.itemId)) return false;
                break;
            }
        case "guild.gvgProduceHandler.mineEnd": 
            {
                if(!checkNaturalNumbers(msg.farmId, msg.fieldId)) return false;
                if(!checkArrayCanEmpty(msg.result)) return false;
                for(let { type, count } of msg.result) {
                    if(!checkNaturalNumbers(type, count)) return false;
                }
                break;
            }
        case "guild.gvgProduceHandler.forestryEnd": 
            {
                if(!checkNaturalNumbers(msg.farmId, msg.fieldId, msg.result)) return false;
                break;
            }
        case "guild.gvgFightHandler.getVestige": 
        case "guild.gvgFightHandler.refreshOpp": 
        case "guild.gvgFightHandler.getRec": 
        case "guild.gvgFightHandler.getPlayerRank": 

        
            {
                if(!checkNaturalNumbers(msg.vestigeId)) return false;
                break;
            }
        case "guild.gvgFightHandler.saveLineup": 
            {
                if(!checkNaturalNumbers(msg.vestigeId)) return false;
                if(!checkArrayCanEmpty(msg.lineup)) return false;
                for(let { actorId, dataId, order } of msg.lineup) {
                    if(!checkNaturalNumbers(actorId, dataId, order)) return false;
                }
                break;
            }
        case "guild.gvgFightHandler.getOppLineup": 
            {
                if(!checkNaturalNumbers(msg.vestigeId, msg.rank)) return false;
                if(!checkNaturalStrings(msg.roleId)) return false;
                break;
            }
        case "guild.gvgFightHandler.chooseOpp": 
            {
                if(!checkNaturalNumbers(msg.vestigeId, msg.rank, msg.myRank)) return false;
                if(!checkNaturalStrings(msg.roleId)) return false;
                break;
            }
        case "guild.gvgFightHandler.giveupCheck": 
        case "guild.gvgFightHandler.getOppData": 
            {
                if(!checkNaturalStrings(msg.battleCode)) return false;
                break;
            }
        case "guild.gvgFightHandler.checkBattle": 
            {
                if(!checkNaturalStrings(msg.battleCode)) return false;
                if(!checkArrayCanEmpty(msg.heroes)) return false;
                for(let { actorId, dataId, order } of msg.heroes) {
                    if(!checkNaturalNumbers(actorId, dataId, order)) return false;
                }
                break;
            }
        case "guild.gvgFightHandler.battleEnd": 
            {
                if(!checkNaturalStrings(msg.battleCode)) return false;
                if(!checkBoolean(msg.isSuccess)) return false;
                break;
            }
        case "guild.gvgBattleHandler.saveTeam": 
            {
                if(!checkNaturalNumbers(msg.index, msg.head, msg.frame, msg.spine)) return false;
                if(msg.lineup) {
                    for(let { actorId, dataId, order } of msg.lineup) {
                        if(!checkNaturalNumbers(actorId, dataId, order)) return false;
                    }
                }
                break;
            }
        case "guild.gvgBattleHandler.getCity": 
        case "guild.gvgBattleHandler.enterCity": 
        case "guild.gvgBattleHandler.leaveCity": 
            {
                if(!checkNaturalNumbers(msg.cityId)) return false;
                break;
            }
        case "guild.gvgBattleHandler.startMove": 
        case "guild.gvgBattleHandler.stopMove": 
            {
                if(!checkNaturalNumbers(msg.cityId, msg.areaId)) return false;
                if(!checkNaturalStrings(msg.teamCode)) return false;
                break;
            }
        case "guild.gvgBattleHandler.teamSettle": 
            {
                if(!checkNaturalNumbers(msg.cityId, msg.areaId, msg.pointId)) return false;
                if(!checkNaturalStrings(msg.teamCode)) return false;
                break;
            }
        case "guild.gvgBattleHandler.teamLeave": 
            {
                //TODO
                break;
            }
        case "guild.gvgBattleHandler.battleStart": 
            {
                if(!checkNaturalStrings(msg.teamCode, msg.oppoTeamCode)) return false;
                break;
            }
        case "guild.gvgBattleHandler.battleEnd": 
            {
                if(!checkNaturalStrings(msg.battleCode)) return false;
                if(!checkBoolean(msg.isSuccess)) return false;
                break;
            }
        case "guild.gvgBattleHandler.useItem": 
            {
                if(!checkNaturalNumbers(msg.cityId, msg.itemId)) return false;
                if(!checkNaturalStrings(msg.teamCode, msg.oppoTeamCode)) return false;
                break;
            }
        case "guild.gvgBattleHandler.reviveTeam": 
            {
                if(!checkNaturalStrings(msg.teamCode)) return false;
                break;
            }
        case "guild.gvgBattleHandler.getRecs": 
            {
                if(!checkNaturalNumbers(msg.type)) return false;
                break;
            }
        case "guild.gvgBattleHandler.getOverview": 
            {
                break;
            }
        case "guild.gvgBattleHandler.getAreaTeams":
            {
                if(!checkNaturalNumbers(msg.cityId)) return false;
                if(!checkNumberArray(msg.areaIds)) return false;
                break;
            }
        case "order.orderHandler.applyOrder":
            {
                let { productID, payType, activityId, paramStr, useVoucher } = msg;
                if(!checkNaturalNumbers(payType, activityId)) return false;
                if(!checkNaturalStrings(productID)) return false;
                if(!checkStringIfExist(paramStr)) return false;
                if(!checkBoolean(useVoucher)) return false;
                break;
            }
        case "order.orderHandler.checkOrder":
            {
                if(!checkNaturalStrings(msg.localOrderID)) return false;
                break;
            }
        case "role.equipHandler.composeEquip":
        case "role.equipHandler.putOffJewel":
            {
                if(!checkNaturalNumbers(msg.hid, msg.ePlaceId)) return false;
                break;
            }
        case "role.equipHandler.strengthen":
        case "role.equipHandler.qualityUp":
        case "role.equipHandler.starUp":
            {
                if(!checkNaturalNumbers(msg.hid, msg.ePlaceId)) return false;
                if(!checkBoolean(msg.isOneClick)) return false;
                break;
            }
        case "role.equipHandler.strengthenAll":
            {
                if(!checkNaturalNumbers(msg.hid, msg.lv)) return false;
                break;
            }
        case "role.equipHandler.putOnJewel":
            {
                if(!checkNaturalNumbers(msg.hid, msg.ePlaceId, msg.jewel)) return false;
                break;
            }
        case "role.equipHandler.putOnOrOffStone":
            {
                if(!checkNaturalNumbers(msg.hid, msg.ePlaceId, msg.stonesId, msg.gid)) return false;
                break;
            }
        case "role.equipHandler.lockRandSe":
            {
                if(!checkNaturalNumbers(msg.seqId, msg.randSeId, msg.type)) return false;
                if(msg.type != 0 && msg.type != 1) return false;
                break;
            }
        case "role.equipHandler.previewRandSe":
        case "role.equipHandler.resetRandSe":
        case "role.equipHandler.giveupPreview":
        case "role.equipHandler.quench":
            {
                if(!checkNaturalNumbers(msg.seqId)) return false;
                break;
            }
        case "role.equipHandler.chooseQuench":
            {
                if(!checkNaturalNumbers(msg.seqId, msg.randSeId)) return false;
                break;
            }
        case "role.equipHandler.decomposeItem":
            {
                if(!checkNaturalArray(msg.origin)) return false;
                for(let { id, count } of msg.origin) {
                    if(!checkNaturalNumbers(id, count)) return false;
                }
                break;
            }
        case "role.equipHandler.decomposeJewel":
            {
                if(!checkNumberArray(msg.origin)) return false;
                break;
            }
        case "role.equipHandler.composeStone":
            {
                if(!checkNaturalNumbers(msg.id, msg.count)) return false;
                break;
            }
        case "role.equipHandler.inheritJewel":
            {
                if(!checkNaturalNumbers(msg.originJewel, msg.targetJewel)) return false;
                break;
            }
        case "role.artifactHandler.putOn":
            {
                if(!checkNaturalNumbers(msg.seqId, msg.hid)) return false;
                break;
            }
        case "role.artifactHandler.putOff":
            {
                if(!checkNaturalNumbers(msg.seqId)) return false;
                break;
            }
        case "role.artifactHandler.lvUp":
            {
                if(!checkNaturalNumbers(msg.seqId)) return false;
                if(!checkBoolean(msg.isOneClick)) return false;
                break;
            }
        case "role.artifactHandler.compose":
            {
                if(!checkNaturalNumbers(msg.seqId)) return false;
                if(!checkNumberArray(msg.material)) return false;
                if(!checkArrayCanEmpty(msg.generalItems)) return false;
                for(let { id, count } of msg.generalItems) {
                    if(!checkNaturalNumbers(id, count)) return false;
                }
                break;
            }
        case "role.artifactHandler.transfer":
            {
                if(!checkNaturalNumbers(msg.seqId, msg.type)) return false;
                break;
            }
        case "role.artifactHandler.previewRebuild":
        case "role.artifactHandler.rebuild":
        case "role.artifactHandler.decompose":
            {
                if(!checkNumberArray(msg.seqIds)) return false;
                break;
            }
        case "role.friendHandler.searchUser":
            {
                if(!checkNaturalStrings(msg.value)) return false;
                break;
            }
        case "role.friendHandler.applyFriend":
            {
                if(!checkStringArray(msg.roleIds)) return false;
                break;
            }
        case "role.friendHandler.handleApply":
            {
                if(!checkStringArray(msg.applyCodeList)) return false;
                if(!checkBoolean(msg.isPass)) return false;
                break;
            }
        case "role.friendHandler.setBlackList":
            {
                if(!checkNaturalStrings(msg.roleId)) return false;
                if(!checkNaturalNumbers(msg.type)) return false;
                if(!checkIsInEnum(BLOCK_OPEATE, msg.type)) return false;
                break;
            }
        case "role.friendHandler.sendHeart":
        case "role.friendHandler.receiveHeart":
            {
                if(!checkStringIfExist(msg.roleId)) return false;
                break;
            }
        case "role.friendHandler.getPlayerSimpleInfo":
        case "role.friendHandler.getPlayerDetail":
            {
                if(!checkNaturalStrings(msg.roleId)) return false;
                break;
            }
        case "role.friendHandler.sendPresent":
            {
                if(!checkNaturalStrings(msg.roleId)) return false;
                if(!checkNaturalArray(msg.items)) return false;
                for(let { id, count } of msg.items) {
                    if(!checkNaturalNumbers(id, count)) return false;
                }
                break;
            }
        case "role.friendHandler.getHeroDetail":
            {
                if(!checkNaturalStrings(msg.roleId)) return false;
                if(!checkNumberArray(msg.hids)) return false;
                break;
            }
        case "role.heroHandler.compose":
            {
                if(!checkNaturalNumbers(msg.hid)) return false;
                break;
            }
        case "role.heroHandler.lvUp":
            {
                if(!checkNaturalNumbers(msg.hid, msg.type)) return false;
                break;
            }
        case "role.heroHandler.starUp":
            {
                let { hid, star, starStage, isOneClick } = msg;
                if(!checkNaturalNumbers(hid, star, starStage)) return false;
                if(!checkBoolean(isOneClick)) return false;
                break;
            }
        case "role.heroHandler.qualityUp":
            {
                let { hid, quality } = msg;
                if(!checkNaturalNumbers(hid, quality)) return false;
                break;
            }
        case "role.heroHandler.wakeUp":
            {
                let { hid, colorStar, colorStarStage, isOneClick } = msg;
                if(!checkNaturalNumbers(hid, colorStar, colorStarStage)) return false;
                if(!checkBoolean(isOneClick)) return false;
                break;
            }
        case "role.heroHandler.heroJobTrain":
            {
                let { hid, isOneClick, canReplace } = msg;
                if(!checkNaturalNumbers(hid)) return false;
                if(!checkBoolean(isOneClick, canReplace)) return false;
                break;
            }
        case "role.heroHandler.heroJobStageUp":
            {
                if(!checkNaturalNumbers(msg.hid)) return false;
                break;
            }
        case "role.heroHandler.heroGiveFavor":
            {
                if(!checkNaturalNumbers(msg.hid, msg.shipId, msg.type)) return false;
                break;
            }
        case "role.heroHandler.heroWearSkin":
            {
                if(!checkNaturalNumbers(msg.id)) return false;
                break;
            }
        case "role.heroHandler.previewRebirth":
        case "role.heroHandler.rebirth":
        case "role.heroHandler.resetTalent":
            {
                if(!checkNaturalNumbers(msg.hid)) return false;
                break;
            }
        case "role.heroHandler.unlockTalent":
        case "role.heroHandler.upgradeTalent":
            {
                if(!checkNaturalNumbers(msg.hid, msg.id)) return false;
                break;
            }
        case "role.itemHandler.useItem":
            {
                if(!checkNaturalNumbers(msg.id, msg.count)) return false;
                if(!checkNumberArray(msg.selected)) return false;
                break;
            }
        case "role.itemHandler.useApItem":
        case "role.itemHandler.buyApItem":
            {
                if(!checkNaturalNumbers(msg.id, msg.count)) return false;
                break;
            }
        case "role.itemHandler.useGiftCode":
            {
                if(!checkNaturalStrings(msg.code)) return false;
                break;
            }
        case "role.itemHandler.getApByLv":
            {
                if(!checkNaturalNumbers(msg.lv)) return false;
                break;
            }
        case "role.mailHandler.readMail":
            {
                if(!checkNaturalStrings(msg.id)) return false;
                if(!checkMailType(msg.mailType)) return false;
                break;
            }
        case "role.mailHandler.delMails":
        case "role.mailHandler.getMailRewards":
            {
                if(!checkStringIfExist(msg.id)) return false;
                if(!checkMailType(msg.mailType)) return false;
                if(msg.type != 1 && msg.type != 2) return false;
                break;
            }
        case "role.rankHandler.getRank":
        case "role.rankHandler.getGuildRank":
            {
                if(!checkNaturalNumbers(msg.type)) return false;
                break;
            }
        case "role.rankHandler.getHeroRank":
            {
                if(!checkNaturalNumbers(msg.type, msg.hid)) return false;
                break;
            }
        case "role.rankHandler.receiveReward":
            {
                if(!checkNaturalNumbers(msg.type, msg.id)) return false;
                break;
            }
        case "role.roleHandler.initRole":
        case "role.roleHandler.rename":
            {
                if(!checkNaturalStrings(msg.roleName)) return false;
                break;
            }
        case "role.roleHandler.getRoleInfo":
            {
                if(!checkNaturalStrings(msg.targetRoleId)) return false;
                break;
            }
        case "role.roleHandler.roleTeraphStrengthen":
            {
                if(!checkNaturalNumbers(msg.id, msg.count)) return false;
                break;
            }
        case "role.roleHandler.roleTeraphQualityUp":
            {
                if(!checkNaturalNumbers(msg.id)) return false;
                break;
            }
        case "role.roleHandler.changeSchoolHero":
            {
                let { schoolId, positionId, hid } = msg;
                if(!checkNaturalNumbers(schoolId, positionId, hid)) return false;
                break;
            }
        case "role.roleHandler.unlockSchoolPosition":
            {
                if(!checkNaturalNumbers(msg.schoolId, msg.positionId)) return false;
                break;
            }
        case "role.roleHandler.activeHeroScroll":
            {
                if(!checkNaturalNumbers(msg.hid)) return false;
                break;
            }
        case "role.roleHandler.saveShowLineup":
            {
                if(!checkArrayCanEmpty(msg.showLineup)) return false;
                for(let hid of msg.showLineup) {
                    if(!checkNaturalNumbers(hid)) return false;
                }
                break;
            }
        case "role.roleHandler.setHead":
        case "role.roleHandler.setFrame":
        case "role.roleHandler.setSpine":
            {
                if(!checkNaturalNumbers(msg.id)) return false;
                break;
            }
        case "role.roleHandler.saveGuide":
            {
                if(!checkNumberArray(msg.ids)) return false;
                break;
            }
        case "role.shopHandler.getShopList":
        case "role.shopHandler.readShop":
            {
                if(!checkNaturalNumbers(msg.shop, msg.type)) return false;
                break;
            }
        case "role.shopHandler.purchase":
            {
                if(!checkNaturalNumbers(msg.shopItemId, msg.count)) return false;
                break;
            }
        case "role.shopHandler.recycleSoul":
            {
                if(!checkNaturalNumbers(msg.goodsId, msg.count)) return false;
                break;
            }
        case "role.taskHandler.receiveTask":
            {
                if(!checkNaturalNumbers(msg.type, msg.id)) return false;
                break;
            }
        case "role.taskHandler.receiveBox":
            {
                if(!checkNaturalNumbers(msg.type, msg.id)) return false;
                break;
            }
        case "role.taskHandler.receiveMainStage":
            {
                if(!checkNaturalNumbers(msg.stage)) return false;
                break;
            }
        case "battle.ladderHandler.getRec":
            {
                if(!checkNaturalStrings(msg.name)) return false;
                if(!checkStringIfExist(msg.notice)) return false;
                if(!checkNaturalNumbers(msg.icon)) return false;
                break;
            }
        case "role.heroHandler.addItem":
            {
                if(!isDevelopEnv() && !checkNaturalNumbers(msg.id, msg.count)) return false;
                break;
            }
        case 'activity.activityHandler.debugActivityMemory':
        case 'activity.popUpShopHandler.debugPushPopUpShop':
        case 'activity.popUpShopHandler.debugPushPopUpInterval':
        case 'activity.popUpShopHandler.debugStopPupUpInterval':
        case 'activity.popUpShopHandler.debugSendMail':
        case 'activity.popUpShopHandler.debugTakeSnapshot':
        case "battle.dailyBattleHandler.debugResetNum":
        case "battle.dungeonBattleHandler.debugResetRefTime":
        case "battle.eventBattleHandler.debugRefEvent":
        case "battle.expeditionBattleHandler.debugResetResetNum":
        case "battle.pvpHandler.addRoleScore":
        case "battle.pvpHandler.debugAddChallengeCnt":
        case "battle.pvpHandler.debugPvpSeasonResetTime":
        case "battle.pvpHandler.debugResetAttackCnt":
        case "battle.pvpHandler.debugResetBox":
        case "battle.pvpHandler.debugResetRefOppCnt":
        case "connector.entryHandler.debugGetRole":
        case "connector.entryHandler.debugPushRefToOnlineUsers":
        case "connector.entryHandler.debugQueryToken":
        case "connector.entryHandler.debugQueryTokenById":
        case "connector.entryHandler.debugQueryTokenByTel":
        case "guild.auctionHandler.debugAddLots":
        case "guild.auctionHandler.debugScheduleSendUngotDividend":
        case "guild.auctionHandler.debugScheduleStartGuild":
        case "guild.auctionHandler.debugScheduleStartWorld":
        case "guild.auctionHandler.debugScheduleStopAuction":
        case "guild.auctionHandler.debugSetDividendStatus":
        case "guild.auctionHandler.debugSetLotStage":
        case "guild.auctionHandler.debugSetPlayTime":
        case "guild.cityActivityHandler.debugResetCity":
        case "guild.gateActivityHandler.debugAddParticipants":
        case "guild.gateActivityHandler.debugDelRedis":
        case "guild.gateActivityHandler.debugEndActivity":
        case "guild.gateActivityHandler.debugGetPrivate":
        case "guild.gateActivityHandler.debugIncChallengeCnt":
        case "guild.gateActivityHandler.debugSetDay":
        case "guild.gateActivityHandler.debugStartActivity":
        case "guild.gateActivityHandler.test":
        case "guild.guildHandler.debugAddActive":
        case "guild.guildHandler.debugAdddFund":
        case "guild.guildHandler.debugClearQuitGuildTime":
        case "guild.guildHandler.debugJoinGuild":
        case "guild.guildBossHandler.debugAddBattleTimes":
        case "guild.guildBossHandler.debugAddOpenTimes":
        case "guild.guildHandler.debugLeaderLeaveTime":
        case "guild.guildHandler.debugWeeklyRask":
        case "order.orderHandler.debugOrder":
        case "role.heroHandler.debugGetAllHeroes":
        case "role.heroHandler.debugSetHero":
        case "guild.guildTrainHandler.debugAddTrainCount":
        case "guild.guildTrainHandler.debugResetTrainInstance":
        case "role.heroHandler.testCleanUp":
        case "role.itemHandler.debugIncAp":
        case "role.itemHandler.debugResetBuyTimes":
        case "role.roleHandler.debugClearRole":
        case "role.roleHandler.debugPlayerTime":
        case "role.roleHandler.debugRoleLvUp":
        case "role.roleHandler.debugSetRole":
        case "role.roleHandler.debugTreatRoleName":
        case "role.roleHandler.test":
        case "role.taskHandler.test":
        case "role.taskHandler.debugCompleteMainStage":
        case "role.taskHandler.debugCompleteRandTask":
        case "role.taskHandler.debugGetDicTask":
        case "role.taskHandler.debugIncPoint":
        case "role.taskHandler.debugRefTask":
        case "role.shopHandler.debugClearPurchaseLimit":
        case "guild.raceActivityHandler.settleReward":
        case "battle.ladderHandler.resetCnt":
        case "battle.ladderHandler.setMyRank":
        case "battle.ladderHandler.setMyOpp":
        case "guild.raceActivityHandler.debugAddHorse":
        case "activity.gachaHandler.debugClearGachaRecord":
        case "battle.eventBattleHandler.debugRefEvent":
        // case "guild.raceActivityHandler.debugResetJoin":
        case "guild.cityActivityHandler.debugStartHitGate":
        case "guild.cityActivityHandler.debugStopHitGate":
        case "guild.cityActivityHandler.debugTestAutoDeclare":
        case "activity.groupShopHandler.debugRefund":
        case "activity.groupShopHandler.debugSetSum":
        case "activity.groupShopHandler.debugClearCnt":
        case "activity.groupShopHandler.debugAddLeagueItem":
        case "activity.groupShopHandler.debugHandleCost":
        case "guild.gvgProduceHandler.debugAddResource":
        case "guild.gvgFightHandler.debugCalRec":
        case "guild.gvgFightHandler.debugSaveScore":
        case "guild.gvgBattleHandler.createCity":
        case "guild.gvgProduceHandler.debugAdjustHarvest":
        case "guild.gvgFightHandler.debugSetMyRank":
        case "guild.gvgFightHandler.debugSetMyOpp":
        case "guild.gvgBattleHandler.debugAddRobots":
        case "guild.gvgBattleHandler.debugMoveRobots":
        case "guild.gvgBattleHandler.debugStopMoveRobot":
        
            {
                if (msg.magicWord !== DEBUG_MAGIC_WORD || !isDevelopEnv()) return false;
                break;
            }
        case "battle.comBattleHandler.getTeams":
        case "battle.comBattleHandler.teammateReady":
        case "battle.comBattleHandler.battleEnd":
        case "connector.entryHandler.addSession":
        case "connector.entryHandler.getIp":
        case "chat.chatHandler.getInitMessage":
        case "connector.entryHandler.onGmUserLeave":
        case "connector.entryHandler.onUserLeave":
        case "gm.gmHandler.sendMail":
        case "gm.gmHandler.saveGroupToServer":
        case "gm.gmHandler.saveActivitiesToGroup":
        case "role.mailHandler.refrshMails":
            {
                return false
            }
    }
    return true;
}

function checkNaturalNumbers(...params: number[]) {
    for(let param of params) {
        if(param == undefined || !isNumber(param) || param < 0) return false;
    }
    return true
}

function checkNaturalArray<T>(array: T[]) {
    return isArray(array) && array.length > 0;  
}

function checkArrayCanEmpty<T>(array: T[]) {
    return isArray(array);  
}

function checkNaturalStrings(...params: string[]) {
    for(let param of params) {
        if(param == undefined || !isString(param) || param == '') return false;
    }
    return true;
}

function checkStringIfExist(...params: string[]) {
    for(let param of params) {
        if(!!param && !isString(param)) return false;
    }
    return true;
}

function checkNumberIfExist(...params: number[]) {
    for(let param of params) {
        if(!!param && !isNumber(param)) return false;
    }
    return true;
}

function checkNumberArray(...params: number[][]) {
    for(let array of params) {
        if(array == undefined || !isArray(array)) return false;
        if(!checkNaturalNumbers(...array)) return false;
    }
    return true;
}

function checkStringArray(...params: string[][]) {
    for(let array of params) {
        if(array == undefined || !isArray(array)) return false;
        if(!checkNaturalStrings(...array)) return false;
    }
    return true;
}

function checkBoolean(...params: boolean[]) {
    for(let param of params) {
        if(!isBoolean(param)) return false;
    }
    return true;
}

function checkBooleanIfExist(...params: boolean[]) {
    for(let param of params) {
        if(param != undefined && !isBoolean(param)) return false;
    }
    return true;
}

function checkExpeditionBattleHeroFormat(...params: { dataId: number, hp: number, ap: number }[][]) {
    for(let param of params) {
        if(!checkArrayCanEmpty(param)) return false;
        for(let { dataId, hp, ap } of param) {
            if(!checkNaturalNumbers(dataId, ap)) return false;
            if(!isNumber(hp)) return false;
        }
    }
    return true;
}

function checkPvpEndHeroFormat(...params: pvpEndParamInter[][]) {
    for(let param of params) {
        if(!checkArrayCanEmpty(param)) return false;
        for(let { hid, damage, heal, underDamage } of param) {
            if(!checkNaturalNumbers(hid, damage, heal, underDamage)) return false;
        }
    }
    return true;
}

function checkIsInEnum<T>(someEnum: T, value: T) {
    return Object.values(someEnum).includes(value)
}

function checkMailType(mailType: any) {
    if(!checkNaturalNumbers(mailType)) return false;
    if(!checkIsInEnum(GM_MAIL_TYPE, mailType)) return false;
    return true;
}